Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

On the Wikipedia page about naive bayes classifiers here there is this line "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.)" How can a value > 1 be OK? I thought all probability values were expressed in the range 0 <= p <= 1. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?

share|improve this question
1  
When I saw that i thought it might be the height of the probability density function which can be any positive number as long as when it is integrated over any interval, the integral is less than or equal to 1. Wikipedia should correct that entry. – Michael Chernick May 5 '12 at 2:05
Because this might help future readers, I offer a geometric translation of the general part of this question: "How can a shape whose area does not exceed $1$ possibly extend more than $1$ in any direction?" Specifically, the shape is that part of the upper half plane bounded above by the graph of the PDF and the direction in question is vertical. In the geometric setting (shorn of the probability interpretation) it's easy to think of examples, such as a rectangle of base no greater than $1/2$ and height $2$. – whuber May 29 '12 at 18:17
the Wikipedia article now uses lowercase p for probability density and uppercase P for probability – deathApril Apr 17 at 10:00

3 Answers

up vote 26 down vote accepted

That Wiki page is abusing language by referring to this number as a probability. You are correct that it is not. It is actually a probability per foot. Specifically, the value of 1.5789 (for a height of 6 feet) implies that the probability of a height between, say, 5.99 and 6.01 feet is close to 1.5789 [1/foot] * (6.01 - 5.99) [feet] = 0.0316 [unitless]. This value must not exceed 1, as you know. (The small range of heights (0.02 in this example) is a crucial part of the probability apparatus. It is the "differential" of height, which I will abbreviate $d(\text{height})$.) Probabilities per unit of something are called densities by analogy to other densities, like mass per unit volume.

Bona fide probability densities can have arbitrarily large values, even infinite ones.

Gamma distribution

This example shows the probability density function for a Gamma distribution (with shape parameter of $3/2$ and scale of $1/5$). Because most of the probability is less than $1$, the curve has to rise higher than $1$ in order to have a total area of $1$ as required for all probability distributions.

Beta distribution

This density (for a beta distribution with parameters $1/2, 1/10$) becomes infinite at $0$ and at $1$. The total area still is finite (and equals $1$)!


The value of 1.5789 /foot is obtained in that example by estimating that the heights of males have a normal distribution with mean 5.855 feet and variance 3.50e-2 square feet. (This can be found in a previous table.) The square root of that variance is the standard deviation, 0.18717 feet. We re-express 6 feet as the number of SDs from the mean:

$$z = (6 - 5.855) / 0.18717 = 0.7747$$

The division by the standard deviation produces a relation

$$dz = d(\text{height})/0.18717$$

The Normal probability density, by definition, equals

$$\frac{1}{\sqrt{2 \pi}}\exp(-z^2/2)dz = 0.29544\ d(\text{height}) / 0.18717 = 1.5789\ d(\text{height}).$$

(Actually, I cheated: I simply asked Excel to compute NORMDIST(6, 5.855, 0.18717, FALSE). But then I really did check it against the formula, just to be sure.) When we strip the essential differential $d(\text{height})$ from the formula only the number $1.5789$ remains, like the Cheshire Cat's smile. We, the readers, need to understand that the number has to be multiplied by a small difference in heights in order to produce a probability.

share|improve this answer
I note that the example given on that wiki page uses probability densities in lieu of actual probabilities for the calculation of posteriors, presumably because the per unit aspect is not necessary for comparative purposes if the units being compared are the same. Extending this, if one doesn't want to assume normality but instead one has empirical data from which density can be estimated, e.g. a kernel density estimate, would it be valid to use a reading at a given value on the x-axis from this kde as input to calculating posteriors in a naive bayes classifier, assuming equal per units? – babelproofreader Nov 7 '10 at 17:08
@babelproofreader I believe the posteriors are Bayesian updates, via the training data, of priors. It's unclear how a kde could be construed similarly, but I'm no expert in this area. Your question is interesting enough that you might consider posting it separately. – whuber Nov 7 '10 at 17:23
2  
@babelproofreader BTW, you ought to consider voting up the questions and answers that interest you (especially any valid answers provided to your own questions!). This not only generates goodwill but also is a good way to influence what appears on this site. If you check you will notice that most people with high reputations vote far more often than they ask or answer questions. – whuber Nov 7 '10 at 17:31
Thanks. I shall post a new question. – babelproofreader Nov 7 '10 at 19:17

This is a common mistake from not understanding the difference between probability mass functions, where the variable is discrete, and probability density functions, where the variable is continuous. See What is a probability distribution:

continuous probability functions are defined for an infinite number of points over a continuous interval, the probability at a single point is always zero. Probabilities are measured over intervals, not single points. That is, the area under the curve between two distinct points defines the probability for that interval. This means that the height of the probability function can in fact be greater than one. The property that the integral must equal one is equivalent to the property for discrete distributions that the sum of all the probabilities must equal one.

share|improve this answer
2  
The NIST is usually authoritative, but here it is technically incorrect (and ungrammatical to boot): having a probability defined at "an infinite number of points" does not imply the "probability at a single point is always zero." Of course they're just dodging a distraction about infinite cardinalities, but the reasoning here is misleading. It would be better for them just to omit the first sentence in the quotation. – whuber Nov 5 '10 at 15:20

The point value at a particular parameter value of a probability density plot would be a likelihood, right? If so, then the statement might be corrected by simply changing P(height|male) to L(height|male).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.