gqqplot

GQQPLOT Display a generic Q-Q plot of sample vs. distribution
4K Downloads
Updated 11 Feb 2008

View License

GQQPLOT(X,DIST) makes an plot of the quantiles of the data set X versus the inverse of the cdf of a distribution specified in DIST, evaluated at probabilities equal to the quantiles of X. The parameters of the distribution are calculated from X.

The purpose of the QQ plot is to determine whether the sample in X is drawn from a given distribution. If it is, the plot will be linear. In the case of the Binomial distribution, an additional parameter is needed: N, number of trials, e.g. GQQPLOT(X,'binom',N).

The name of the distribution can be (case insensitive):

'norm' or 'normal'
'gam' or 'gamma'
'logn' or 'Lognormal',
'exp' or 'Exponential',
'wbl' or 'Weibull'.
'beta'
'bin' or 'Binomial'
'ev' or 'Extreme Value',
'gev' or 'Generalized Extreme Value',
'gp' or 'Generalized Pareto',
'nbin' or 'Negative Binomial',
'poiss' or 'poisson'
'unif' or 'uniform'
'rayl' or 'rayleigh'

EXAMPLE:
x= gamrnd(2,0.5,1000,1);
gqqplot(x,'normal') %Bad fit
gqqplot(x,'gamma') %Good fit

Cite As

Francisco de Castro (2024). gqqplot (https://www.mathworks.com/matlabcentral/fileexchange/18699-gqqplot), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Stair Plots in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0