Next: Chi-squared Random Variable, Previous: Student’s t Random Variable, Up: Functions and Variables for continuous distributions [Contents][Index]
Let \(ncp\) be the non-centrality parameter, \(n\) be the degrees of freedom for the non-central Student’s \(t\) random variable.
Then let \(X\) be a \({\it Normal}(n, ncp)\) and \(S^2\) be an independent \(\chi^2\) random variable with \(n\) degrees of freedom, the random variable
has a non-central Student’s \(t\) distribution with non-centrality parameter \(ncp\).
Returns the value at x of the density function of a noncentral Student random variable
\({\it nc\_t}(n, ncp)\)
, with \(n>0\) degrees of freedom and noncentrality parameter \(ncp\). To make use of this function, write first load("distrib")
.
The pdf is
where
and \(\mu\) is the non-centrality parameter \(ncp\).
Sometimes an extra work is necessary to get the final result.
(%i1) load ("distrib")$
(%i2) expand(pdf_noncentral_student_t(3,5,0.1)); rat: replaced 0.01889822365046136 by 15934951/843198350 = 0.01889822365046136 rat: replaced -8.734356480209641 by -294697965/33740089 = -8.734356480209641 rat: replaced 4.136255165816327 by 51033443/12338079 = 4.136255165816332 rat: replaced 1.08061432164203 by 56754827/52520891 = 1.08061432164203 rat: replaced 0.0565127306411839 by 5608717/99246965 = 0.05651273064118384 rat: replaced -300.8069396896258 by -79782423/265228 = -300.8069396896256 rat: replaced 160.6269176184973 by 178374907/1110492 = 160.626917618497 7/2 7/2 0.04296414417400905 5 1.323650307289301e-6 5 (%o2) ------------------------ + ------------------------- 3/2 5/2 sqrt(%pi) 2 14 sqrt(%pi) 7/2 1.94793720435093e-4 5 + ------------------------ %pi
(%i3) float(%); (%o3) 0.02080593159405671
Returns the value at x of the distribution function of a noncentral Student random variable \({\it nc\_t}(n, ncp)\) , with \(n>0\) degrees of freedom and noncentrality parameter \(ncp\). This function has no closed form and it is numerically computed.
(%i1) load ("distrib")$
(%i2) cdf_noncentral_student_t(-2,5,-5); (%o2) 0.995203009331975
Returns the q-quantile of a noncentral Student random variable
\({\it nc\_t}(n, ncp)\)
, with \(n>0\) degrees of freedom and noncentrality parameter \(ncp\); in other words, this is the inverse of cdf_noncentral_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 noncentral Student random variable
\({\it nc\_t}(n, ncp)\)
, with \(n>1\) degrees of freedom and noncentrality parameter \(ncp\). To make use of this function, write first load("distrib")
.
The mean is
where \(\mu\) is the noncentrality parameter \(ncp\).
(%i1) load ("distrib")$
(%i2) mean_noncentral_student_t(df,k); df - 1 gamma(------) sqrt(df) k 2 (%o2) ------------------------ df sqrt(2) gamma(--) 2
Returns the variance of a noncentral Student random variable
\({\it nc\_t}(n, ncp)\)
, with \(n>2\) degrees of freedom and noncentrality parameter \(ncp\). To make use of this function, write first load("distrib")
.
The variance is
where \(\mu\) is the noncentrality parameter \(ncp\).
Returns the standard deviation of a noncentral Student random variable
\({\it nc\_t}(n, ncp)\)
, with \(n>2\) degrees of freedom and noncentrality parameter \(ncp\). To make use of this function, write first load("distrib")
.
The standard deviation is
Returns the skewness coefficient of a noncentral Student random variable
\({\it nc\_t}(n, ncp)\)
, with \(n>3\) degrees of freedom and noncentrality parameter \(ncp\). To make use of this function, write first load("distrib")
.
If \(U\) is a non-central Student’s \(t\) random variable with \(n\) degrees of freedom and a noncentrality parameter \(\mu\) , the skewness is
Returns the kurtosis coefficient of a noncentral Student random variable
\({\it nc\_t}(n, ncp)\)
, with \(n>4\) degrees of freedom and noncentrality parameter \(ncp\). To make use of this function, write first load("distrib")
.
If \(U\) is a non-central Student’s \(t\) random variable with \(n\) degrees of freedom and a noncentrality parameter \(\mu\) , the kurtosis is
Returns a noncentral Student random variate
\({\it nc\_t}(n, ncp)\)
, with \(n>0\). Calling random_noncentral_student_t
with a third argument m, a random sample of size m will be simulated.
The implemented algorithm is based on the fact that if X is a normal random variable \({\it Normal}(ncp, 1)\) and \(S^2\) is a \(\chi^2\) random variable with n degrees of freedom, \(\chi^2(n)\) , then
is a noncentral Student random variable with \(n\) degrees of freedom and noncentrality parameter \(ncp\), \({\it nc\_t}(n, ncp)\) .
To make use of this function, write first load("distrib")
.