How to find the probability (between 0 and 1) of an observation knowing that follow a Normal dist. and knowing its mean and variance?

조회 수: 11 (최근 30일)
Hi All,
I know the mean and st. dev. of a Normal distribution and I would like to find the probability (between 0 and 1) of an observation.
where x is my observation value and mu and sigma the mean and st. dev. of the Gaussian.
I am getting extremely low values from different observations x.
I believe what I am doing is incorrect, how can I find the probability?
Thank you!
  댓글 수: 2
Image Analyst
Image Analyst 2020년 12월 6일
If the observation is a single number, wouldn't the probability be zero?
And if you want the probability of an observation being between one number and a different number, wouldn't you use the error function, erf()?
Gabriele Galli
Gabriele Galli 2020년 12월 6일
Thank you for the reply.
Yes, what you are saying makes perfectly sense.
I will try to explain better my issue, any help is really appreaciated!
I am trying to model the forward algorithm for hidden markov chain and the so called observation matrix B is continuous, for this reason it is described by a 2 by N matrix (N=number of hidden states) and 2 is related to mean and variance of a Normal distribution (the observation probability of each hidden state is assumed Normal).
In the screen shot attached there is the formula that is giving me the issue. I have to multiply the bracket term by b_j(O_t) which the observation matrix B term (mean and variance) of the j-th hidden state w.r.t. the observation O at time t (so it is a single observation).
I tried to model this using normpdf function where x is the observation at time t and mu and sigma are related to the state j. Doing so, I am obtained number that are really small (e-58) which I assumed they are not correct. Do you have any idea on how I can model this element b_j(O_t) of the matrix B?
Thank you so much!

댓글을 달려면 로그인하십시오.

답변 (1개)

John D'Errico
John D'Errico 2020년 12월 7일
편집: John D'Errico 2020년 12월 7일
You misunderstand what a PDF represents. This is a common mistake, suggesting you really want to do some reading about basic probability and statistics.
If you want to compute the probability of any exact event, such as the number 1 coming from a CONTINUOUS distribution, the probability is ZERO. You can compute the probability that a random variable will lie in some interval. But any exact value has measure zero.
As such, we can ask the probability that a standard normal random variable lies in the interval [0.9,1.1]...
diff(normcdf([0.9 1.1]))
ans = 0.0484
So 0.0484. You get that from the CDF, not the PDF. If you wish, you could compute it as an integral of the PDF. Thus,
integral(@(x) normpdf(x),0.9,1.1)
ans = 0.0484
And that is all the CDF gives you.

카테고리

Help CenterFile Exchange에서 Exploration and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by