Fit a Gamma distribution using Method of Moments
Version 1.0.0 (1.6 KB) by
Shruti Sathyanarayan Rao
For a given data, Gamma fit is computed using Method of Moments.
1. Gamma distribution is characterized by two parameters: Shape and scale.
2. For a given data, we can estimate shape and scale using Maximum likelihood or Method of Moments.
3. In this code, we use Method of Moments to estimate these parameters.
4. If plotit == 1, this function plots the histogram of the data along with the fit.
5. Distributions are normalized using matlab inbuilt trapz command.
Cite As
Shruti Sathyanarayan Rao (2026). Fit a Gamma distribution using Method of Moments (https://www.mathworks.com/matlabcentral/fileexchange/71450-fit-a-gamma-distribution-using-method-of-moments), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2015a
Compatible with R2006b to R2015b
Platform Compatibility
Windows macOS LinuxCategories
- AI and Statistics > Statistics and Machine Learning Toolbox > Probability Distributions and Hypothesis Tests > Continuous Distributions > Gamma Distribution >
Find more on Gamma Distribution in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
