how to check data fits gamma distribution in MATLAB ?

1k Views Asked by At

I have two vectors which also contain zeroes. I cannot remove the zeroes as that is also data.

I have to see whether my data fits gamma distribution or not. How can I check that?

1

There are 1 best solutions below

0
On BEST ANSWER

Use the chi-squared goodness of fit test:

http://db.cs.duke.edu/courses/cps111/spring07/notes/10.pdf

Algorithm:

  1. build a "histogram" for data based on observed values
  2. compute expected "histogram" based on gamma distribution
  3. run chi square test on deviations in occurrence frequency in each histogram bin

There is code in the reference, but try to build a prototype yourself first.