mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
8881341e24
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@492 f6dd340e-d3f9-0310-b409-bdd246841980
40 lines
1.4 KiB
Text
40 lines
1.4 KiB
Text
The ti(chi_squared_distribution<RealType = double>) with tt(n) degrees of
|
|
freedom is the distribution of a sum of the squares of tt(n) independent
|
|
standard normal random variables.
|
|
|
|
Note that even though the distribution's parameter tt(n) usually is an
|
|
integral value, it doesn't have to be integral, as the chi_squared
|
|
distribution is defined in terms of functions (tt(exp) and tt(Gamma)) that
|
|
take real arguments (see, e.g., the formula shown in the tt(<bits/random.h>)
|
|
header file, provided with the Gnu tt(g++) compiler distribution).
|
|
|
|
The chi-squared distribution is used, e.g., when testing the goodness of fit
|
|
of an observed distribution to a theoretical one.
|
|
|
|
Defined types:
|
|
verb(
|
|
typedef RealType result_type;
|
|
|
|
struct param_type
|
|
{
|
|
explicit param_type(RealType n = RealType(1));
|
|
|
|
RealType n() const;
|
|
};
|
|
)
|
|
|
|
Constructors and members:
|
|
itemization(
|
|
itt(chi_squared_distribution<>(RealType n = 1))
|
|
constructs a chi_squared distribution with specified number of degrees
|
|
of freedom.
|
|
itt(chi_squared_distribution<>(param_type const ¶m))
|
|
constructs a chi_squared distribution according to the value stored in
|
|
the tt(param) struct;
|
|
itt(IntType n() const)nl()
|
|
returns the distribution's degrees of freedom;
|
|
itt(result_type min() const)nl()
|
|
returns 0;
|
|
itt(result_type max() const)nl()
|
|
returns the maximum value of tt(result_type);
|
|
)
|