Next: Noncentral Student’s t Random Variable, Previous: Normal Random Variable, Up: Functions and Variables for continuous distributions [Contents][Index]
Student’s t random variable is denoted by \(t(n)\) where \(n\) is the degrees of freedom with \(n > 0\). If \(Z\) is a \({\it Normal}(0, 1)\) variable and \(V\) is an independent \(\chi^2\) random variable with \(n\) degress of freedom, then
has a Student’s \(t\)-distribution with \(n\) degrees of freedom.
Returns the value at x of the density function of a Student random variable \(t(n)\), with \(n>0\) degrees of freedom. To make use of this function, write first load("distrib")
.
The pdf is
Returns the value at x of the distribution function of a Student random variable \(t(n)\), with \(n>0\) degrees of freedom.
The cdf is
where \(t = n/(n+x^2)\) and \(I_t(a,b)\) is the beta_incomplete_regularized function.
(%i1) load ("distrib")$
(%i2) cdf_student_t(1/2, 7/3); 7 1 28 beta_incomplete_regularized(-, -, --) 6 2 31 (%o2) 1 - ------------------------------------- 2
(%i3) float(%); (%o3) 0.6698450596140415
Returns the q-quantile of a Student random variable \(t(n)\), with \(n>0\); in other words, this is the inverse of cdf_student_t
. Argument q must be an element of \([0,1]\). To make use of this function, write first load("distrib")
.
Returns the mean of a Student random variable \(t(n)\), with \(n>0\). To make use of this function, write first load("distrib")
.
The mean is
Returns the variance of a Student random variable \(t(n)\), with \(n>2\).
The variance is
(%i1) load ("distrib")$
(%i2) var_student_t(n); n (%o2) ----- n - 2
Returns the standard deviation of a Student random variable \(t(n)\), with \(n>2\). To make use of this function, write first load("distrib")
.
The standard deviation is
Returns the skewness coefficient of a Student random variable \(t(n)\), with \(n>3\), which is always equal to 0. To make use of this function, write first load("distrib")
.
The skewness coefficient is
Returns the kurtosis coefficient of a Student random variable \(t(n)\), with \(n>4\). To make use of this function, write first load("distrib")
.
The kurtosis coefficient is
Returns a Student random variate \(t(n)\), with \(n>0\). Calling random_student_t
with a second argument m, a random sample of size m will be simulated.
The implemented algorithm is based on the fact that if \(Z\) is a normal random variable \({\it Normal}(0, 1)\) and \(S^2\) is a \(\chi^2\) random variable with \(n\) degrees of freedom, \(\chi^2(n)\) , then
is a Student random variable with \(n\) degrees of freedom, \(t(n)\).
To make use of this function, write first load("distrib")
.