random.student_t
code:Lua
x = textmodule.random.student_t(n, seed)
モジュール
引数
table:_
変数 型 概要
1 n number 自由度
2 seed number シード値(省略可)
返り値
table:_
変数 型 概要
1 x number 乱数
概要
ステューデントのt分布を生成する。
以下の確率密度関数に基いて、乱数を生成する。nは自由度を表す。
$ p(x \ | \ n) = \frac{1}{\sqrt{n\pi}} \sdot \frac{\Gamma \{ (n+1)/2 \}}{\Gamma(n/2)} \sdot \Bigl(1+\frac{x^2}{n}\Bigl)^{-(n+1/2)}