Naive Bayes estimates with the assumption that within the class, the predictors are independent. Mathematically, for :
where is the density function of the predictor among observations in the class.
Naive Bayes is a good estimator where is not large enough relative to for us to effectively estimate the joint distribution of the predictors within each class.
The posterior probability of naive Bayes for is:
Estimate using training data using one of the following methods:
If is quantitative, then we can assume that
If is quantitative, use a non-parametric estimate for . Think of a histogram or a kernel density estimator (a smoothed version of a histogram)
If is qualitative, count the proportion of training observations for the predictor corresponding to each class.