Contents
ALGORITHMS
Site map
Links
Site and author
News
About the site
FAQ
Contact
TERMS OF USE
Contents - Special functions - Distributions - Chi-square distribution

Chi-square distribution

Chi-square distribution with k degrees of freedom is a distribution of the sum of squares of k random variables having normal distribution with mean equal to 0 and standard deviation equal to 1.

Probability density function for chi-square distribution is:

Cumulative distribution function of the the chi-square distribution is:

Algorithms

ChiSquareDistribution and ChiSquareCDistribution subroutines are used to calculate the areas under the left and right tails of the graph (i.e. to calculate cumulative distribution function and its own complement). InvChiSquareCDistribution subroutine calculates the inverse cumulative distribution function. Subroutines use the above mentioned formula which calculates cumulative distribution function by using an incomplete gamma-function.

Report a bug

Source codes

C#

C# 1.0 source.
chisquaredistr.csharp.zip - Chi-square distribution


C++

C++ source.
chisquaredistr.cpp.zip - Chi-square distribution
ablas.zip - optimized basic linear algebra subroutines with SSE2 support (for C++ sources only)


Delphi

Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
chisquaredistr.delphi.zip - Chi-square distribution


Visual Basic 6

Visual Basic 6 source.
chisquaredistr.vb6.zip - Chi-square distribution


Zonnon beta

Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
chisquaredistr.zonnon.zip - Chi-square distribution



 
 
Sergey Bochkanov, Vladimir Bystritsky
Copyright © 1999-2008