2
$\begingroup$

i was reading wikipedia article on Naive Bayes classifier

but i didn't understand some of the calculations. can anybody explain. how they have calculated this

P(height|male) = 1.5789 (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.) P(weight|male) = 5.9881e-06 P(foot size|male) = 1.3112e-3

  • 0
    Identical qn on stats.SE: http://stats.stackexchange.com/q/42202010-11-11

2 Answers 2

2

These are the probability densities of the assumed distributions, evaluated at the sample data. In this case, the distributions of height, weight and foot size are assumed to follow independent Gaussian distributions whose parameters are given in the second table. If you don't know the probability density function of a Gaussian distribution, look here.

For example, for the height, the assumed distribution is a Gaussian with mean $\mu = 5.855$ and variance $\sigma^2 = 3.5033\times 10^{-2}$. As the sample's value is $x = 6$, you can plug that in to the probability density function of the distribution to get $f(x) = 1.5789$.

0

Here is a write up. A point to note (and its usually confusing) is that the density function can return values > 1. It is only used as a way to estimate likelihood in the NB calculations. It is ok there because eventually we will be normalizing to get at probabilities that are < 1.