Main Content

Chi-Square Distribution

Evaluate and generate random samples from chi-square distribution

Statistics and Machine Learning Toolbox™ offers multiple ways to work with the chi-square distribution.

  • Use distribution-specific functions with specified distribution parameters. The distribution-specific functions can accept parameters of multiple chi-square distributions.

  • Use generic distribution functions (cdf, icdf, pdf, random) with a specified distribution name ('Chisquare') and parameters.

To learn about the chi-square distribution, see Chi-Square Distribution.

Functions

expand all

cdfCumulative distribution function
icdfInverse cumulative distribution function
pdfProbability density function
randomRandom numbers
chi2cdfChi-square cumulative distribution function
chi2pdfChi-square probability density function
chi2invChi-square inverse cumulative distribution function
chi2statChi-square mean and variance
chi2gofChi-square goodness-of-fit test
chi2rndChi-square random numbers

Topics

  • Chi-Square Distribution

    The chi-square distribution is commonly used in hypothesis testing, particularly the chi-square test for goodness of fit.