Calculating a probability given a point for a continuous distribution?

Click For Summary
Calculating the probability at a specific point within a normal distribution requires understanding that P(x) for continuous variables is not directly meaningful, as the probability density function (pdf) evaluates to zero at any single point. Instead, probabilities should be calculated over an interval using the cumulative distribution function (CDF), which provides non-zero probabilities for ranges of values. The discussion emphasizes that precise measurements are impractical, and probabilities should reflect intervals, such as P(182.5<x<183.5) instead of P(X=183). Additionally, generating samples from a continuous distribution involves approximations, as computers can only represent finite numbers. Understanding these concepts is crucial for effectively applying Bayes' Theorem in continuous contexts.
TheOldHag
Messages
44
Reaction score
3
I thought I understood all the theory quite well and sat down to begin coding until I realized that calculating a probability at a point within a normal distribution in the application of bayes' rule you can't simply plug the point into the normal distribution and get the value since the probability is a density. How do you approach this from a numerical standpoint or am I incorrect? My guess is that you need to leverage the cumulative distribution function instead and calculate the probability over some small delta around the point.

My broader problem is now after having gone through a good part of probability and statistics and being able to wield the P notation quite deftly on paper, I'm finding that translating those theories to actual computation has its own challenges and I'm wondering how this is generally approached or if I'm completely misunderstanding something. I'm fairly certain that P(x) doesn't mean evaluating the pdf f(x) and just taking that value.

Appreciate any guidance.
 
Physics news on Phys.org
My guess is that you need to leverage the cumulative distribution function instead and calculate the probability over some small delta around the point.
Pretty much except you don't need the cumulative probability.

If X~N, P(X=x)=0
There is no such thing as an arbitrarily precise measurement.
When we say that someone is 183cm tall, we really mean they are between 182.5cm and 183.5cm or something like that. So the probability of someone being 183cm tall, in the same sense, is actually P(182.5<x<183.5).

I'm fairly certain that P(x) doesn't mean evaluating the pdf f(x) and just taking that value.
That is correct. P(x) has no formal meaning where a pdf is concerned. You can only compute P(a<x<b) ... i.e. you can only find a non-zero probability for a continuous random variable falling between a range of values.

In general we can say: $$\lim_{b-a\rightarrow 0}P(a<x<b)\rightarrow 0$$

You can work it out for yourself:$$P(x=a)=\lim_{\epsilon\rightarrow 0}P(a-\epsilon<x<a+\epsilon)=\int_a^a p(x)\; dx$$
 
  • Like
Likes 1 person
Adding to what Simon Bridge said, if you are trying to generate samples from a normal distribution then your computer program will produce a specific number - an "exact" real number one might say. But this type of sampling is only an approximation of the idea of sampling from a continuous distribution. The program is actually picking a number from a finite population of numbers - those that it can represent.

Are you familiar with the typical algorithms for generating pseudo-random samples?
 
If you can integrate the PDF from a to b, then you can use the PDF to calculate P(a < X < b). In practice, the integration can be very difficult. The CDF has already done the integration from -∞ up to any point, so P(a < X < b) = CDF(b) - CDF(a). There are very accurate tables for most the CDFs of the common distributions.
 
I think Simon's point was helpful to confirm and clear up some of my confusion regarding density functions and how to interpret the value of a density function. The other part that I needed to clear up was to go back and review the generalization of Bayes' Theorem to continuous distributions and then apply that to my current problem which is after all calculating values and summing etc directly from PDF because of that generalization. But also to distinguish when it is safe to use the value directly and when it doesn't make sense.
 
The standard _A " operator" maps a Null Hypothesis Ho into a decision set { Do not reject:=1 and reject :=0}. In this sense ( HA)_A , makes no sense. Since H0, HA aren't exhaustive, can we find an alternative operator, _A' , so that ( H_A)_A' makes sense? Isn't Pearson Neyman related to this? Hope I'm making sense. Edit: I was motivated by a superficial similarity of the idea with double transposition of matrices M, with ## (M^{T})^{T}=M##, and just wanted to see if it made sense to talk...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 25 ·
Replies
25
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
12
Views
3K
Replies
9
Views
3K
  • · Replies 7 ·
Replies
7
Views
5K