How to sample data that would follow gamma distribution?
5 views (last 30 days)
Show older comments
I have data (randomly distributed). From these data I would like to take a sample that would follow gamma distribution.
Is there an easy way to do this?
2 Comments
Patrik Ek
on 24 Jan 2014
Edited: Patrik Ek
on 24 Jan 2014
What do you mean? Should you not use the correct distribution? Gamma distribution is often used to calculate waiting time expected lifetime and in that case sample should be either lifetime of time for/between (or similar) an occurency. Is it something like this you are after? What I mean is what is the sample and what do you want to do with them?
Answers (2)
John D'Errico
on 24 Jan 2014
Edited: John D'Errico
on 24 Jan 2014
You need an explicit SUBSET? of your original data that follows a gamma distribution? Sorry, but this seems to be a pretty uncommon thing to do, and there is surely no simple way to do so. You need to be far more clear about your problem if you want a good answer.
If you already know the distribution, then just use a tool for that express purpose. Find it in the STATS toolbox. If you don't know the gamma distribution, just estimate the gamma parameters, then see above.
Of course, if you really need an explicit subset of the data you already have, then it does NOT follow a Gamma distribution, since that distribution is a continuous thing. ANY value can occur, at least any positive value. If you will insist on a sampling from the set you already have, this is a discrete set, so just use a sampling tool designed for that purpose. Again, see the Stats TB.
Again, you either need to think more carefully about what you are asking to do, or be more clear, since the crystal bar is so foggy today.
0 Comments
Image Analyst
on 24 Jan 2014
RANDRAW has nearly every probability distribution you could possibly ever want: http://www.mathworks.com/matlabcentral/fileexchange/7309-randraw
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!