Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • System Modeler

    Multidomain modeling and simulation of complex systems

  • Compute ServicesUse with Mathematica and Wolfram|One
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Wolfram|Alpha

  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs

AI Products

  • Wolfram AI Ecosystem
  • Wolfram Foundation Tool
  • Wolfram Cloud MCP
  • Wolfram Local MCP
  • Agent One API
  • CAG Component APIs

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • Linguistic Understanding

Additional Deployment Options

  • Wolfram Cloud
  • Wolfram Web Engine
  • wolframscript
  • WSTPServer
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

Wolfram Consulting

Data Science, Finance & Business

  • Artificial Intelligence
  • Data Science
  • Healthcare
  • Real Estate

Engineering

  • Civil Engineering
  • Automotive Engineering
  • Sustainable Energy

Science & Technology

  • AgTech
  • Biosciences
  • Environmental Science
  • Food Science
  • Quantum Computation
  • Social and Behavioral Sciences

More Wolfram Solutions

Technology for Education

  • Research Universities
  • Colleges & Teaching Universities
  • High Schools
  • Resources for Students

Education Initiatives

  • Next-Gen EdTech
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
For AIs
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • System Modeler
    • Compute ServicesUse with Mathematica and Wolfram|One
    • AI AccessUse with Mathematica and Wolfram|One
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Wolfram|Alpha
      • Wolfram|Alpha Website
      • Wolfram|Alpha APIs
    • AI Products
      • Wolfram AI Ecosystem
      • Wolfram Foundation Tool
      • Wolfram Cloud MCP
      • Wolfram Local MCP
      • Agent One API
      • CAG Component APIs
    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • Linguistic Understanding
    • Additional Deployment Options
      • Wolfram Cloud
      • Wolfram Web Engine
      • wolframscript
      • WSTPServer
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions
    • Wolfram Consulting

    Data Science, Finance & Business

    • Artificial Intelligence
    • Data Science
    • Healthcare
    • Real Estate

    Engineering

    • Civil Engineering
    • Automotive Engineering
    • Sustainable Energy

    Science & Technology

    • AgTech
    • Biosciences
    • Environmental Science
    • Food Science
    • Quantum Computation
    • Social and Behavioral Sciences

    More Wolfram Solutions

    Technology for Education

    • Research Universities
    • Colleges & Teaching Universities
    • High Schools
    • Resources for Students

    Education Initiatives

    • Next-Gen EdTech
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • For AIs
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
ChiSquareDistribution
  • See Also
    • StudentTDistribution
    • FRatioDistribution
    • GammaDistribution
    • ChiDistribution
    • NoncentralChiSquareDistribution
    • InverseChiSquareDistribution
    • FindFit
  • Related Guides
    • Normal and Related Distributions
    • Mathematical Functions
    • Functions Used in Statistics
    • Distributions in Communication Systems
  • Tech Notes
    • Continuous Distributions
    • See Also
      • StudentTDistribution
      • FRatioDistribution
      • GammaDistribution
      • ChiDistribution
      • NoncentralChiSquareDistribution
      • InverseChiSquareDistribution
      • FindFit
    • Related Guides
      • Normal and Related Distributions
      • Mathematical Functions
      • Functions Used in Statistics
      • Distributions in Communication Systems
    • Tech Notes
      • Continuous Distributions

ChiSquareDistribution[ν]

represents a distribution with ν degrees of freedom.

Details
Details and Options Details and Options
Background & Context
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Tech Notes
Related Guides
Related Links
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • StudentTDistribution
    • FRatioDistribution
    • GammaDistribution
    • ChiDistribution
    • NoncentralChiSquareDistribution
    • InverseChiSquareDistribution
    • FindFit
  • Related Guides
    • Normal and Related Distributions
    • Mathematical Functions
    • Functions Used in Statistics
    • Distributions in Communication Systems
  • Tech Notes
    • Continuous Distributions
    • See Also
      • StudentTDistribution
      • FRatioDistribution
      • GammaDistribution
      • ChiDistribution
      • NoncentralChiSquareDistribution
      • InverseChiSquareDistribution
      • FindFit
    • Related Guides
      • Normal and Related Distributions
      • Mathematical Functions
      • Functions Used in Statistics
      • Distributions in Communication Systems
    • Tech Notes
      • Continuous Distributions

ChiSquareDistribution

ChiSquareDistribution[ν]

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

  • ChiSquareDistribution[ν] represents a statistical distribution parametrized by a positive value ν indicating the degrees of freedom of the distribution. ν determines the general shape of the probability density function (PDF) of a chi-square distribution, and, depending on the values of ν, the PDF may be either monotonic decreasing or may have a single "peak" (i.e. a global maximum) with a potential singularity approaching the lower boundary of its domain.
  • ChiSquareDistribution is the distribution followed by the square of a chi-distributed random variable. In other words, if is a random variable and (where denotes "is distributed as"), then . The sum of a collection , , …, of identically normally distributed independent random variables is also chi-square distributed. The chi-square distribution can be used to quantify the goodness of fit between a theoretical or empirical model and a collection of samples. Specific applications include magnetic resonance imaging and the analysis of possible associations between disease exposure and transmission.
  • RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a chi-square distribution. Distributed[x,ChiSquareDistribution[ν]], written more concisely as xChiSquareDistribution[ν], can be used to assert that a random variable x is distributed according to a chi-square distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
  • The probability density and cumulative distribution functions for chi-square distributions may be given using PDF[ChiSquareDistribution[ν],x] and CDF[ChiSquareDistribution[ν],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively.
  • DistributionFitTest can be used to test if a given dataset is consistent with a chi-square distribution, EstimatedDistribution to estimate a chi-square parametric distribution from given data, and FindDistributionParameters to fit data to a chi-square distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic chi-square distribution and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic chi-square distribution.
  • TransformedDistribution can be used to represent a transformed chi-square distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a chi-square distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving chi-square distributions.
  • ChiSquareDistribution is closely related to a number of other distributions. For example, several distributions, including GammaDistribution, ExponentialDistribution, InverseChiSquareDistribution, UniformDistribution, and LaplaceDistribution, can be obtained by transformations of ChiSquareDistribution, while NormalDistribution and FRatioDistribution are limiting values for transformed versions of ChiSquareDistribution. Moreover, ChiSquareDistribution can be viewed as a special case of a number of other more general distributions, including RayleighDistribution, MaxwellDistribution, PearsonDistribution, and ParetoDistribution. ChiSquareDistribution is also closely related to BetaDistribution, StudentTDistribution, UniformDistribution, and NoncentralChiSquareDistribution.

Examples

open all close all

Basic Examples  (4)

Probability density function:

Wolfram Language code: Plot[Table[PDF[ChiSquareDistribution[ν], x], {ν, {0.5, 3, 5}}]//Evaluate, {x, 0, 6}, Filling -> Axis]
Wolfram Language code: PDF[ChiSquareDistribution[ν], x]

Cumulative distribution function:

Wolfram Language code: Plot[Table[CDF[ChiSquareDistribution[ν], x], {ν, {0.5, 3, 5}}]//Evaluate, {x, 0, 6}, Filling -> Axis]
Wolfram Language code: CDF[ChiSquareDistribution[ν], x]

Mean and variance:

Wolfram Language code: Mean[ChiSquareDistribution[ν]]
Wolfram Language code: Variance[ChiSquareDistribution[ν]]

Median:

Wolfram Language code: Median[ChiSquareDistribution[ν]]

Scope  (8)

Generate a sample of pseudorandom numbers from a distribution:

Wolfram Language code: data = RandomVariate[ChiSquareDistribution[3], 10 ^ 4];

Compare its histogram to the PDF:

Wolfram Language code: Show[ Histogram[data, {0, 15, 1}, "PDF"], Plot[PDF[ChiSquareDistribution[3], x], {x, 0, 15}, PlotStyle -> Thick]]

Distribution parameters estimation:

Wolfram Language code: sample = RandomVariate[ChiSquareDistribution[13], 10 ^ 3];

Estimate the distribution parameters from sample data:

Wolfram Language code: edist = EstimatedDistribution[sample, ChiSquareDistribution[ν]]

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

Wolfram Language code: Show[Histogram[sample, Automatic, "PDF"], Plot[PDF[edist, x], {x, 0, 30}, PlotStyle -> Thick]]

Skewness:

Wolfram Language code: Plot[Skewness[ChiSquareDistribution[ν]], {ν, 0, 10}]
Wolfram Language code: Skewness[ChiSquareDistribution[ν]]

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

Wolfram Language code: Limit[Skewness[ChiSquareDistribution[ν]], ν -> ∞]

Kurtosis:

Wolfram Language code: Plot[Kurtosis[ChiSquareDistribution[ν]], {ν, 0, 10}]
Wolfram Language code: Kurtosis[ChiSquareDistribution[ν]]

The limiting value is the kurtosis of NormalDistribution:

Wolfram Language code: Limit[Kurtosis[ChiSquareDistribution[ν]], ν -> ∞]

Different moments with closed forms as functions of parameters:

Wolfram Language code: FormulaGrid[list_, type_] := Grid[...]

Moment:

Wolfram Language code: FormulaGrid[Table[Moment[ChiSquareDistribution[ν], k]//Together, {k, 5}], M]

Closed form for symbolic order:

Wolfram Language code: Moment[ChiSquareDistribution[ν], r]

CentralMoment:

Wolfram Language code: FormulaGrid[Table[CentralMoment[ChiSquareDistribution[ν], k]//Together, {k, 5}], CM]

Closed form for symbolic order:

Wolfram Language code: CentralMoment[ChiSquareDistribution[ν], r]

FactorialMoment:

Wolfram Language code: FormulaGrid[Table[FactorialMoment[ChiSquareDistribution[ν], k]//Together, {k, 5}], FM]

Cumulant:

Wolfram Language code: FormulaGrid[Table[Cumulant[ChiSquareDistribution[ν], k], {k, 5}], C]

Cumulant has closed form:

Wolfram Language code: Cumulant[ChiSquareDistribution[ν], r]

Hazard function:

Wolfram Language code: Plot[Table[HazardFunction[ChiSquareDistribution[ν], x], {ν, {3, 5, 7}}]//Evaluate, {x, 0, 4}, Filling -> Axis]
Wolfram Language code: HazardFunction[ChiSquareDistribution[ν], x]

Quantile function:

Wolfram Language code: Plot[Table[Quantile[ChiSquareDistribution[ν], q], {ν, {5, 10, 20}}]//Evaluate, {q, 0, 1}, Filling -> Axis]
Wolfram Language code: Quantile[ChiSquareDistribution[ν], q]

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

Wolfram Language code: ChiSquareDistribution[Quantity[2, "dozens"]]

Applications  (2)

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

Wolfram Language code: χSquare[data_, σ_] := Total[(data - Mean[data]) ^ 2] / σ ^ 2

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

Wolfram Language code: With[{n = 10}, Show[Histogram[Table[χSquare[RandomVariate[NormalDistribution[], n], 1], {i, 10 ^ 3}], 20, "PDF"], Plot[PDF[ChiSquareDistribution[n - 1], x], {x, 0, 40}, PlotStyle -> Thick]]]

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:

Wolfram Language code: weights = Quantity[{367.9, 384.7, 353.8, 334.7, 450.9, 390.6, 422.6, 352.2, 330.9, 342.0, 388.9, 386.7, 374.2, 388.5, 382.2}, "Grams"];
Wolfram Language code: {Mean[weights], StandardDeviation[weights]}

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

Wolfram Language code: σ0 = Quantity[36, "Grams"]; χ2stat = (15 - 1)Variance[weights] / σ0^2

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

Wolfram Language code: χ2stat < InverseCDF[ChiSquareDistribution[14], 0.05]

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:

Wolfram Language code: powerFunc[σ1_, n_] := CDF[ChiSquareDistribution[n - 1], (σ0^2/σ1^2) InverseCDF[ChiSquareDistribution[n - 1], 0.05]]
Wolfram Language code: DiscretePlot[powerFunc[Quantity[32, "Grams"], n], {n, 15, 300}]

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

Wolfram Language code: Ceiling[n] /. FindRoot[powerFunc[Quantity[32, "Grams"], n] == 0.8, {n, 200, 300}]

Properties & Relations  (23)

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

Wolfram Language code: {μ, σ} = {Mean[ChiSquareDistribution[ν]], StandardDeviation[ChiSquareDistribution[ν]]}
Wolfram Language code: Table[Plot[{PDF[ChiSquareDistribution[ν], x], PDF[NormalDistribution[μ, σ], x]}, {x, μ - 2σ, μ + 2σ}, AxesOrigin -> {μ - 2σ - σ, 0}, Ticks -> {{{μ - 2σ, HoldForm[μ - 2σ]}, {μ, HoldForm[μ]}, {μ + 2σ, HoldForm[μ + 2σ]}}, Automatic}, PlotLabel -> ν], {ν, {5, 10, 25, 100}}]

Sum of -distributed variables follows distribution:

Wolfram Language code: TransformedDistribution[u + v, {uChiSquareDistribution[ν1], vChiSquareDistribution[ν2]}]

Relationships to other distributions:

NoncentralChiSquareDistribution simplifies to distribution:

Wolfram Language code: PDF[NoncentralChiSquareDistribution[ν, 0], x]
Wolfram Language code: PDF[ChiSquareDistribution[ν], x]
Wolfram Language code: % - %%

distribution is a limiting case of FRatioDistribution:

Wolfram Language code: Limit[PDF[FRatioDistribution[1, m], x], m -> Infinity]
Wolfram Language code: PDF[ChiSquareDistribution[1], x]
Wolfram Language code: % - %%

The ratio of two -distributed variables follows FRatioDistribution:

Wolfram Language code: TransformedDistribution[(u / ν1) / (v / ν2), {uChiSquareDistribution[ν1], vChiSquareDistribution[ν2]}]

Sum of squares of variables from NormalDistribution follows distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[x ^ 2 + y ^ 2 + z ^ 2, {x, y, z}ProductDistribution[{NormalDistribution[], 3}]]

distribution is a special case of GammaDistribution:

Wolfram Language code: PDF[ChiSquareDistribution[ν], x]
Wolfram Language code: PDF[GammaDistribution[ν / 2, 2], x]
Wolfram Language code: % - %%

Scaled distribution follows GammaDistribution:

Wolfram Language code: TransformedDistribution[c * X, XChiSquareDistribution[a], Assumptions -> c > 0]

The square root of a variable follows the ChiDistribution:

Wolfram Language code: TransformedDistribution[Sqrt[u], uChiSquareDistribution[ν]]

Square of RayleighDistribution with is a special case of distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[u ^ 2, uRayleighDistribution[1]]
Wolfram Language code: PDF[𝒟, x]
Wolfram Language code: PDF[ChiSquareDistribution[2], x]
Wolfram Language code: Simplify[% - %%, x > 0]

Square of MaxwellDistribution with is a special case of distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[u ^ 2, uMaxwellDistribution[1]];
Wolfram Language code: PDF[𝒟, x]
Wolfram Language code: PDF[ChiSquareDistribution[3], x]
Wolfram Language code: FullSimplify[% - %%, x > 0]

distribution and InverseChiSquareDistribution have an inverse relationship:

Wolfram Language code: TransformedDistribution[1 / u, uChiSquareDistribution[ν]]

distribution is a special case of type 3 PearsonDistribution:

Wolfram Language code: PDF[PearsonDistribution[3, 1, -ν + 2, 0, 2, 0], x]//FullSimplify
Wolfram Language code: PDF[ChiSquareDistribution[ν], x]
Wolfram Language code: % - %%

A transformation of distribution yields BetaDistribution:

Wolfram Language code: TransformedDistribution[u / (u + v), {uChiSquareDistribution[ν1], vChiSquareDistribution[ν2]}]

is a transformation of UniformDistribution:

Wolfram Language code: 𝒟 = TransformedDistribution[-2 Log[u], uUniformDistribution[{0, 1}]];
Wolfram Language code: PDF[𝒟, x]//FullSimplify[#, x∈Reals]&
Wolfram Language code: PDF[ChiSquareDistribution[2], x]
Wolfram Language code: FullSimplify[% - %%, x > 0]

distribution is a transformation of LaplaceDistribution:

Wolfram Language code: 𝒟 = TransformedDistribution[2 / β (Abs[u - μ] + Abs[v - μ] + Abs[w - μ]), {u, v, w}ProductDistribution[{LaplaceDistribution[μ, β], 3}]];
Wolfram Language code: CDF[𝒟, x]//Simplify[#, β > 0]&
Wolfram Language code: CDF[ChiSquareDistribution[6], x]//FunctionExpand//Simplify
Wolfram Language code: % - %%

For sum of variables:

Wolfram Language code: 𝒟1 = TransformedDistribution[2 / β Abs[z - μ], zLaplaceDistribution[μ, β]];
Wolfram Language code: CharacteristicFunction[𝒟1, t] ^ n//PowerExpand
Wolfram Language code: CharacteristicFunction[ChiSquareDistribution[2n], t]
Wolfram Language code: FullSimplify[% - %%, n∈Integers]

distribution is a transformation of ParetoDistribution:

Wolfram Language code: 𝒟 = TransformedDistribution[2 α Log[(u v w z) k ^ -4], {u, v, w, z}ProductDistribution[{ParetoDistribution[k, α], 4}]];
Wolfram Language code: Block[{α = 2, k = 3, n = 4}, Show[Histogram[RandomVariate[𝒟, 10 ^ 4], 30, "PDF"], Plot[PDF[ChiSquareDistribution[2 n], x], {x, 0, 25}, PlotStyle -> Thick]]]

distribution is a transformation of ParetoDistribution:

Wolfram Language code: 𝒟 = TransformedDistribution[2 α Log[(u v w z) / (Min[{u, v, w, z}] ^ 4)], {u, v, w, z}ProductDistribution[{ParetoDistribution[k, α], 4}]];
Wolfram Language code: Block[{α = 2, k = 3, n = 4}, Show[Histogram[RandomVariate[𝒟, 10 ^ 4], 30, "PDF"], Plot[PDF[ChiSquareDistribution[2 n - 2], x], {x, 0, 25}, PlotStyle -> Thick]]]

StudentTDistribution is a transformation of distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[1 / 2 Sqrt[ν](u - v) / Sqrt[u v ], {u, v}ProductDistribution[{ChiSquareDistribution[ν], 2}]];
Wolfram Language code: Block[{ν = 14}, Show[Histogram[RandomVariate[𝒟, 10 ^ 4], Automatic, "PDF"], Plot[PDF[StudentTDistribution[ν], x], {x, -4, 4}, PlotStyle -> Thick]]]

StudentTDistribution can be obtained from ChiSquareDistribution and NormalDistribution:

Wolfram Language code: 𝒟 = TransformedDistribution[z Sqrt[ν / w], {zNormalDistribution[], wChiSquareDistribution[ν]}];
Wolfram Language code: PDF[𝒟, x]//FullSimplify[#, ν > 0]&
Wolfram Language code: PDF[StudentTDistribution[ν], x]//FunctionExpand//PowerExpand
Wolfram Language code: FullSimplify[% - %%, x ≠ 0]

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

Wolfram Language code: TransformedDistribution[(x/x + y), {xNoncentralChiSquareDistribution[n, δ], yChiSquareDistribution[m]}]

NoncentralStudentTDistribution can be obtained from NormalDistribution and ChiSquareDistribution:

Wolfram Language code: 𝒟 = TransformedDistribution[(z + δ)Sqrt[ν / w], {zNormalDistribution[], wChiSquareDistribution[ν]}];
Wolfram Language code: Block[{δ = 3, ν = 15}, Show[Histogram[RandomVariate[𝒟, 10 ^ 4], 20, "PDF"], Plot[PDF[NoncentralStudentTDistribution[ν, δ], x], {x, -10, 10}, PlotStyle -> Thick]]]

Possible Issues  (2)

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

Wolfram Language code: Mean[ChiSquareDistribution[-1]]

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

Wolfram Language code: Mean[ChiSquareDistribution[ν]] /. {ν -> I}

Neat Examples  (1)

PDFs for different ν values with CDF contours:

Wolfram Language code: cdf = Function[{x, ν}, Evaluate[CDF[ChiSquareDistribution[ν], x]]]; ql = {0.025, 0.10, 0.25, 0.5, 0.75, 0.90, 0.975}; cl = Table[ColorData["Rainbow"][q], {q, Join[{0.0}, ql]}];
Wolfram Language code: Legended[Plot3D[PDF[ChiSquareDistribution[ν], x], {x, 0, 10}, {ν, 2, 6}, PlotTheme -> "Marketing", MeshFunctions -> {cdf}, Mesh -> {ql}, MeshStyle -> GrayLevel[0.8], MeshShading -> cl, AxesLabel -> Automatic, PlotPoints -> 35, BaseStyle -> Opacity[0.9], ImageSize -> 400, PlotRange -> {0, 0.5}], BarLegend["Rainbow", ql, LegendLabel -> "prob"]]

See Also

StudentTDistribution  FRatioDistribution  GammaDistribution  ChiDistribution  NoncentralChiSquareDistribution  InverseChiSquareDistribution  FindFit

Function Repository: ChiSquareCI

Tech Notes

    ▪
  • Continuous Distributions

Related Guides

    ▪
  • Normal and Related Distributions
  • ▪
  • Mathematical Functions
  • ▪
  • Functions Used in Statistics
  • ▪
  • Distributions in Communication Systems

Related Links

  • An Elementary Introduction to the Wolfram Language : More about Numbers

History

Introduced in 2007 (6.0) | Updated in 2016 (10.4)

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).

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2026_chisquaredistribution, organization={Wolfram Research}, title={ChiSquareDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/ChiSquareDistribution.html}, note=[Accessed: 01-September-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • AI Access
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English