numpy.random.RandomState.noncentral_chisquare¶
method
-
RandomState.
noncentral_chisquare
(df, nonc, size=None)¶ Draw samples from a noncentral chi-square distribution.
The noncentral \chi^2 distribution is a generalisation of the \chi^2 distribution.
Parameters: - df : float or array_like of floats
Degrees of freedom, should be > 0.
Changed in version 1.10.0: Earlier NumPy versions required dfnum > 1.
- nonc : float or array_like of floats
Non-centrality, should be non-negative.
- size : int or tuple of ints, optional
Output shape. If the given shape is, e.g.,
(m, n, k)
, thenm * n * k
samples are drawn. If size isNone
(default), a single value is returned ifdf
andnonc
are both scalars. Otherwise,np.broadcast(df, nonc).size
samples are drawn.
Returns: - out : ndarray or scalar
Drawn samples from the parameterized noncentral chi-square distribution.
Notes
The probability density function for the noncentral Chi-square distribution is
P(x;df,nonc) = \sum^{\infty}_{i=0} \frac{e^{-nonc/2}(nonc/2)^{i}}{i!} \P_{Y_{df+2i}}(x),
where Y_{q} is the Chi-square with q degrees of freedom.
In Delhi (2007), it is noted that the noncentral chi-square is useful in bombing and coverage problems, the probability of killing the point target given by the noncentral chi-squared distribution.
References
[1] Delhi, M.S. Holla, “On a noncentral chi-square distribution in the analysis of weapon systems effectiveness”, Metrika, Volume 15, Number 1 / December, 1970. [2] Wikipedia, “Noncentral chi-squared distribution” https://en.wikipedia.org/wiki/Noncentral_chi-squared_distribution Examples