How to generate a certain number of random numbers from a gamma distribution that sum to a specific number
이전 댓글 표시
Hello,
Would anybody know how to generate a specific number of random numbers from a Gamma Distribution that sum to a particular value?
I have (1) the total distance that one travels in a day and (2) the number of journey that they make.
For example:
Total Distance = 40 miles No. Journeys = 3
I'm trying to generate 3 random numbers from a Gamma distribution that sum to 40.
Appreciate any help with this
Thank you
JOhn
답변 (1개)
Walter Roberson
2012년 6월 21일
0 개 추천
You could try adapting http://www.mathworks.com/matlabcentral/fileexchange/9700 but the infinite tail might give some problems.
The result might not have the same gamma distribution as you started with.
카테고리
도움말 센터 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!