WOLFRAM

represents a distribution with ν degrees of freedom.

Details

  • The probability density for value in a distribution is proportional to for , and is zero for . »
  • For integer ν, the distribution with ν degrees of freedom gives the distribution of sums of squares of ν values independently sampled from a normal distribution.
  • ChiSquareDistribution allows ν to be any positive real number.
  • ChiSquareDistribution allows ν to be a dimensionless quantity. »
  • ChiSquareDistribution can be used with such functions as Mean, CDF, and RandomVariate. »

Background & Context

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

Probability density function:

Out[1]=1
Out[2]=2

Cumulative distribution function:

Out[1]=1
Out[2]=2

Mean and variance:

Out[1]=1
Out[2]=2

Median:

Out[1]=1

Scope  (8)Survey of the scope of standard use cases

Generate a sample of pseudorandom numbers from a distribution:

Compare its histogram to the PDF:

Out[2]=2

Distribution parameters estimation:

Estimate the distribution parameters from sample data:

Out[2]=2

Compare density histogram of the sample with the PDF of the estimated distribution:

Out[3]=3

Skewness:

Out[1]=1
Out[2]=2

For a large number of degrees of freedom, the distribution becomes symmetric:

Out[3]=3

Kurtosis:

Out[1]=1
Out[2]=2

The limiting value is the kurtosis of NormalDistribution:

Out[3]=3

Different moments with closed forms as functions of parameters:

Moment:

Out[2]=2

Closed form for symbolic order:

Out[3]=3

CentralMoment:

Out[4]=4

Closed form for symbolic order:

Out[5]=5

FactorialMoment:

Out[6]=6

Cumulant:

Out[7]=7

Cumulant has closed form:

Out[8]=8

Hazard function:

Out[1]=1
Out[2]=2

Quantile function:

Out[1]=1
Out[2]=2

Use dimensionless Quantity to specify the degree of freedom parameter ν:

Out[1]=1

Applications  (2)Sample problems that can be solved with this function

ChiSquareDistribution is used in exact (small) sampling theory. Define statistics:

If data comes from a NormalDistribution, then statistics follow ChiSquareDistribution, even for data that is a sample of small size (less than 30):

Out[2]=2

The weight in grams of a particular boxed cereal product is known to follow a normal distribution. A quality assurance team samples 15 boxes at random and records their weights. Test the hypothesis that the standard deviation of the product weight is less than 36:

Out[2]=2

Under the null hypothesis of , the following statistic follows ChiSquareDistribution:

Out[3]=3

The null hypothesis cannot be rejected at the 5% level:

Out[4]=4

Assuming that the standard deviation of the product weight equals 32, compute the probability of rejecting the null hypothesis, also known as the power of the test, at the 5% level as a function of sample size:

Out[6]=6

Find the sample size required for the power of the test to be at least 80%:

Out[7]=7

Properties & Relations  (23)Properties of the function, and connections to other functions

ChiSquareDistribution[ν] converges to a normal distribution as ν->:

Out[1]=1
Out[2]=2

Sum of -distributed variables follows distribution:

Out[1]=1

Relationships to other distributions:

NoncentralChiSquareDistribution simplifies to distribution:

Out[1]=1
Out[2]=2
Out[3]=3

distribution is a limiting case of FRatioDistribution:

Out[1]=1
Out[2]=2
Out[3]=3

The ratio of two -distributed variables follows FRatioDistribution:

Out[1]=1

Sum of squares of variables from NormalDistribution follows distribution:

Out[1]=1

distribution is a special case of GammaDistribution:

Out[1]=1
Out[2]=2
Out[3]=3

Scaled distribution follows GammaDistribution:

Out[1]=1

The square root of a variable follows the ChiDistribution:

Out[1]=1

Square of RayleighDistribution with is a special case of distribution:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4

Square of MaxwellDistribution with is a special case of distribution:

Out[2]=2
Out[3]=3
Out[4]=4

distribution and InverseChiSquareDistribution have an inverse relationship:

Out[1]=1

distribution is a special case of type 3 PearsonDistribution:

Out[1]=1
Out[2]=2
Out[3]=3

A transformation of distribution yields BetaDistribution:

Out[1]=1

is a transformation of UniformDistribution:

Out[2]=2
Out[3]=3
Out[4]=4

distribution is a transformation of LaplaceDistribution:

Out[2]=2
Out[3]=3
Out[4]=4

For sum of variables:

Out[6]=6
Out[7]=7
Out[8]=8

distribution is a transformation of ParetoDistribution:

Out[2]=2

distribution is a transformation of ParetoDistribution:

Out[2]=2

StudentTDistribution is a transformation of distribution:

Out[2]=2

StudentTDistribution can be obtained from ChiSquareDistribution and NormalDistribution:

Out[2]=2
Out[3]=3
Out[4]=4

NoncentralBetaDistribution can be obtained as a transformation of ChiSquareDistribution and NoncentralChiSquareDistribution:

Out[1]=1

NoncentralStudentTDistribution can be obtained from NormalDistribution and ChiSquareDistribution:

Out[2]=2

Possible Issues  (2)Common pitfalls and unexpected behavior

ChiSquareDistribution is not defined when ν is not a positive real number:

Out[1]=1

Substitution of invalid parameters into symbolic outputs gives results that are not meaningful:

Out[1]=1

Neat Examples  (1)Surprising or curious use cases

PDFs for different ν values with CDF contours:

Out[4]=4
Wolfram Research (2007), ChiSquareDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/ChiSquareDistribution.html (updated 2016).
Wolfram Research (2007), ChiSquareDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/ChiSquareDistribution.html (updated 2016).

Text

Wolfram Research (2007), ChiSquareDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/ChiSquareDistribution.html (updated 2016).

Wolfram Research (2007), ChiSquareDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/ChiSquareDistribution.html (updated 2016).

CMS

Wolfram Language. 2007. "ChiSquareDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/ChiSquareDistribution.html.

Wolfram Language. 2007. "ChiSquareDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/ChiSquareDistribution.html.

APA

Wolfram Language. (2007). ChiSquareDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ChiSquareDistribution.html

Wolfram Language. (2007). ChiSquareDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ChiSquareDistribution.html

BibTeX

@misc{reference.wolfram_2025_chisquaredistribution, author="Wolfram Research", title="{ChiSquareDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/ChiSquareDistribution.html}", note=[Accessed: 09-July-2025 ]}

@misc{reference.wolfram_2025_chisquaredistribution, author="Wolfram Research", title="{ChiSquareDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/ChiSquareDistribution.html}", note=[Accessed: 09-July-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_chisquaredistribution, organization={Wolfram Research}, title={ChiSquareDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/ChiSquareDistribution.html}, note=[Accessed: 09-July-2025 ]}

@online{reference.wolfram_2025_chisquaredistribution, organization={Wolfram Research}, title={ChiSquareDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/ChiSquareDistribution.html}, note=[Accessed: 09-July-2025 ]}