rStudent

rStudent(*args)

Realization of a scalar Student distribution.

Parameters:
nufloat, \nu > 0

The \nu parameter.

sizeint, optional

The number of realizations. Default value is 1.

Returns:
realizationfloat or a sequence of float

The realizations of the distribution.

Notes

The probability density function is defined as:

p(x) = \dfrac{1}{\sqrt{\nu}B(1/2, \nu/2)} \left(1+ \dfrac{x^2}{\nu}\right)^{-\dfrac{\nu+1}{2}} \quad x \in \Rset

with \nu > 0.

Examples

>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> r = ot.DistFunc.rStudent(2.5)
>>> r = ot.DistFunc.rStudent(2.5, 10)