필터 지우기
필터 지우기

How to display probabilities calculated for each data point

조회 수: 3 (최근 30일)
Silas Adiko
Silas Adiko 2013년 5월 4일
Dear Support,
I have a data sample x=(x1,....,xn)
suppose I want to fit negative binomial distribution to the data.
ie. X =NB(r,p)
However, for each data point in the sample, how do I display the probabilities calculated at each data point using Matlab.
Thanks in advance.
Silas
  댓글 수: 3
Silas Adiko
Silas Adiko 2013년 5월 5일
Hi Shashank,
May be I was not explaining myself properly so let me put it another way:
Supposing I have a raw sample data and trying to fit a distribution. After estimating the parameters for different likely probability distributions, I wanted to calculate the Expected as against the Observed from data. This can be done recursively though But I think it is the probabilities needed at each data point that enables the Expected values to be calculated. So how do I code and display this e.g. for Negative Binomial or Poisson distributions.
Shashank Prasanna
Shashank Prasanna 2013년 5월 6일
편집: Shashank Prasanna 2013년 5월 6일
This is still not clear, the expected value of NB is pr/(1-p) is this what you want? What do you plan to do recursively? Probability for each data is obtained by using the CDF as I mentioned. Please clarify your required approach and what how you want to do this.
Please use the comment option under the answer to reply to my answer instead of the question here.

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

답변 (1개)

Shashank Prasanna
Shashank Prasanna 2013년 5월 5일
Looks like you are interested in the negative binomial CDF. For your data X and for a given r and p maybe estimated from nbinfit you can use the CDF as described in the doc:

Community Treasure Hunt

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

Start Hunting!

Translated by