# Probability of a value x in a Normal distribution is not zero but some value

I'm totally confused about the concept of Probability Distribution Function for continuous sample space.I read that probability of an event in continuous space is zero and it seems logical since we have an infinite number of points also as quoted by Wikipedia the absolute likelihood of an event exactly occurring is zero. But when we substitute a value x in the Normal distribution function we get a finite value . Can someone explain to me whether we can use PDF for a exact value or should we consider only a range to compute the probability of a range? Also when we substitute mean in the Gaussian the value seems to be very high indicating the mode and mean are the same.

Edit: Thank you for the answers but when we write the probability of data set given the mean and variance in the maximum likelihood function, we actually use the Normal distribution PDF directly for a input vector X which is N(x|mean,variance) , here we are using the PDF as if to represent the probabilities of the input vector.

• Having an infinite number of points in the space does not by itself produce the result that each point has zero probability. Consider the geometric distribution, which has positive probability on each of a countably infinite number of points. It's when you have an uncountably infinite number of points that you can't assign positive probability to each point. (You can still assign positive probability to a countable subset.)
– mef
Sep 25, 2017 at 15:04
• The PDF is a probability density. It is not a probability! Please see stats.stackexchange.com/questions/4220.
– whuber
Sep 25, 2017 at 15:38

But when we substitute a value x in the Normal distribution function we get a finite value .

This value is not a probability in itself, but rather the rate of change of some probabilities. If you want to think of it in terms of probabilities, then the PDF at $x$ is

$$\lim_{\Delta x \rightarrow 0} \frac{P(X < x + \Delta x) - P(X < x)}{\Delta x}.$$

This does not contradict $P(X = x) = 0$ for all values of $x$.

Can someone explain to me whether we can use PDF for a exact value or should we consider only a range to compute the probability of a range?

No and yes, respectively.

A continuous random variable has the Probability Density Function (PDF) or simply Density Function that helps us to calculate its probability for a certain range or interval. When we substitute x in the Density Function with a value from a random variable's range, then we just get a value of the Density Function which is not the probability. To calculate the probability, you need to take the integral of the Density Function for a given range. Hence, for continuous random variables, the probability of an exact value is equal to zero.

Likelihood function is not the same thing with probability. By definition the likelihood function is equal to, if the distribution is continuous, the product of the probability density functions calculated at the data points.

In some machine learning books, instead of using the likelihood function which is generally denoted by "L", they use probability which is actually not correct. If you look at the probability and statistics books, they explain this better.

In conclusion, you shouldn't use probability density function to calculate a probability of a point because by definiton the probability of a continuous distribution is the integral of the probability density function.

For example, if you want to calculate the probability of a point "a" in a continuous distribution, you can integrate the function between "a + 0.5" and "a - 0.5". When you do this, the result will be similar to the value that you will get if you calculate the probability density function at that point. This is because when you integrate the function over 1 unit difference [+0.5, -0.5], you actually calculate the area under the curve with a base length of 1 which doesn't change the value of the function. Only change between the values may stem from the fact that function's value changes over the interval [+0.5, -0.5]. But this change is generally relatively low.

• That this advice is problematic becomes evident when applied to, say, a Beta distribution.
– whuber
Aug 6, 2022 at 12:53