body>HTTP/1.1 200 OKServer: GlassFish Server Open Source Edition 4.1.2 X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition 4.1.2 Java/Oracle Corporation/1.8) Set-Cookie: JSESSIONID=c400b74358b39154849fccff9f77; Path=/; Secure; HttpOnly Set-Cookie: MW_Doc_Template=WEB||||||||||; Path=/help Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Expires: Mon, 09 Nov 2020 16:52:52 EST Content-Type: text/html;charset=utf-8 Date: Sun, 05 Dec 2021 20:19:06 GMT Transfer-Encoding: chunked 10042 Chi-Square Distribution - MATLAB & Simulink - MathWorks Benelux
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.


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


Chi-Square Distribution

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