MATLAB Examples

Compute the Gamma Distribution pdf

Compute the pdf of a gamma distribution with parameters A = 100 and B = 10. For comparison, also compute the pdf of a normal distribution with parameters mu = 1000 and sigma = 100.

x = gaminv((0.005:0.01:0.995),100,10);
y = gampdf(x,100,10);
y1 = normpdf(x,1000,100);

Plot the pdfs of the gamma distribution and the normal distribution on the same figure.