Compound Poisson Distribution Model
이전 댓글 표시
Hey Everyone,
I have the probability density function of a Negative-binomial Distribution (Compound Poisson Distribution) and I would like to generate random numbers based on probability similar to how binornd function works. The following is the compound model written in matlab:
fun = @(lambda) (lambda.^k).*(exp(-1.*lambda)).* gampdf(lambda,alpha,beta)./factorial(k);
P(k)= integral(fun,0,Inf);
I assume the number of trials (k) from 0:7 and the output is the probability of each point P(k). So now I only need to choose random numbers from this distribution based on their probability values.
Thanks in advance.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Negative Binomial Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!