Statistics[Distributions] - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Statistics and Data Analysis : Statistics Package : Distributions : Statistics/Distributions/NonCentralStudentT

Statistics[Distributions]

 NonCentralStudentT
 noncentral t-distribution

 Calling Sequence NonCentralStudentT(nu, delta) NonCentralStudentTDistribution(nu, delta)

Parameters

 nu - degrees of freedom delta - noncentrality parameter

Description

 • The noncentral Student-t distribution is a continuous probability distribution with probability density function given by:

$f\left(t\right)=\frac{\left(\mathrm{\Gamma }\left(\frac{\mathrm{\nu }}{2}+\frac{1}{2}\right)\left(\frac{\left(-\frac{4{\mathrm{\delta }}^{2}{t}^{2}}{2{t}^{2}+2\mathrm{\nu }}+\frac{4{\mathrm{\delta }}^{4}{t}^{4}}{{\left(2{t}^{2}+2\mathrm{\nu }\right)}^{2}}+\frac{4{\mathrm{\delta }}^{2}{t}^{2}\mathrm{\nu }}{2{t}^{2}+2\mathrm{\nu }}-1+\mathrm{\nu }\right)\mathrm{\Gamma }\left(-\frac{\mathrm{\nu }}{2}+\frac{3}{2}\right)\sqrt{\mathrm{\pi }}{L}_{-\frac{\mathrm{\nu }}{2}+\frac{1}{2}}^{\left(\frac{1}{2}\right)}\left(\frac{{\mathrm{\delta }}^{2}{t}^{2}}{2{t}^{2}+2\mathrm{\nu }}\right)}{2\left(-1+\mathrm{\nu }\right)\mathrm{\Gamma }\left(-\frac{\mathrm{\nu }}{2}+2\right)}-\frac{{\mathrm{\delta }}^{2}{t}^{2}\left(-1+\frac{2{\mathrm{\delta }}^{2}{t}^{2}}{2{t}^{2}+2\mathrm{\nu }}+\mathrm{\nu }\right)\mathrm{\Gamma }\left(-\frac{\mathrm{\nu }}{2}+\frac{3}{2}\right)\sqrt{\mathrm{\pi }}{L}_{-\frac{\mathrm{\nu }}{2}+\frac{1}{2}}^{\left(\frac{3}{2}\right)}\left(\frac{{\mathrm{\delta }}^{2}{t}^{2}}{2{t}^{2}+2\mathrm{\nu }}\right)}{\left(2{t}^{2}+2\mathrm{\nu }\right)\left(-1+\mathrm{\nu }\right)\mathrm{\Gamma }\left(-\frac{\mathrm{\nu }}{2}+2\right)}\right)+\mathrm{\Gamma }\left(\frac{\mathrm{\nu }}{2}+1\right)\mathrm{\delta }t\sqrt{2}\sqrt{\frac{1}{{t}^{2}+\mathrm{\nu }}}\left(\frac{\left(\frac{2{\mathrm{\delta }}^{2}{t}^{2}}{2{t}^{2}+2\mathrm{\nu }}+\mathrm{\nu }\right)\mathrm{\Gamma }\left(-\frac{\mathrm{\nu }}{2}+1\right)\sqrt{\mathrm{\pi }}{L}_{-\frac{\mathrm{\nu }}{2}}^{\left(\frac{1}{2}\right)}\left(\frac{{\mathrm{\delta }}^{2}{t}^{2}}{2{t}^{2}+2\mathrm{\nu }}\right)}{2\mathrm{\nu }\mathrm{\Gamma }\left(-\frac{\mathrm{\nu }}{2}+\frac{3}{2}\right)}-\frac{{\mathrm{\delta }}^{2}{t}^{2}\mathrm{\Gamma }\left(-\frac{\mathrm{\nu }}{2}+1\right)\sqrt{\mathrm{\pi }}{L}_{-\frac{\mathrm{\nu }}{2}}^{\left(\frac{3}{2}\right)}\left(\frac{{\mathrm{\delta }}^{2}{t}^{2}}{2{t}^{2}+2\mathrm{\nu }}\right)}{\left(2{t}^{2}+2\mathrm{\nu }\right)\mathrm{\nu }\mathrm{\Gamma }\left(-\frac{\mathrm{\nu }}{2}+\frac{3}{2}\right)}\right)\right){\mathrm{\nu }}^{\frac{\mathrm{\nu }}{2}}{ⅇ}^{-\frac{{\mathrm{\delta }}^{2}}{2}}}{\mathrm{\Gamma }\left(\frac{\mathrm{\nu }}{2}\right)\sqrt{\mathrm{\pi }}{\left({t}^{2}+\mathrm{\nu }\right)}^{\frac{\mathrm{\nu }}{2}+\frac{1}{2}}}$

 subject to the following conditions:

$0<\mathrm{\nu },\mathrm{\delta }::\mathrm{real}$

 • The NonCentralStudentT variate with noncentrality parameter delta=0 and degrees of freedom nu is equivalent to the StudentT variate with degrees of freedom nu.
 • The NonCentralStudentT variate with noncentrality parameter delta and degrees of freedom nu is related to the Normal variate and the ChiSquare variate by $\mathrm{StudentT}\left(\mathrm{nu},\mathrm{delta}\right)\mathrm{~}\frac{\mathrm{Normal}\left(\mathrm{delta},1\right)}{\mathrm{sqrt}\left(\frac{\mathrm{ChiSquare}\left(\mathrm{nu}\right)}{\mathrm{nu}}\right)}$.
 • Note that the NonCentralStudentT command is inert and should be used in combination with the RandomVariable command.

Notes

 • Quantile calculations for the non-central student-t distribution are very sensitive to small perturbations when delta is large.  As a result, numeric methods for calculating quantiles will often not converge unless Digits is set to 25 or higher.

Notes

 • The Quantile and CDF functions applied to a noncentral Student-t distribution use a sequence of iterations in order to converge on the desired output point.  The maximum number of iterations to perform is equal to 100 by default, but this value can be changed by setting the environment variable _EnvStatisticsIterations to the desired number of iterations.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $X≔\mathrm{RandomVariable}\left(\mathrm{NonCentralStudentT}\left(3,\mathrm{δ}\right)\right):$
 > $\mathrm{PDF}\left(X,u\right)$
 ${{}\begin{array}{cc}\frac{{2}}{{3}}{}\frac{\sqrt{{3}}}{{\mathrm{π}}{}{\left({1}{+}\frac{{1}}{{3}}{}{{u}}^{{2}}\right)}^{{2}}}& {\mathrm{δ}}{=}{0}\\ \frac{{3}}{{2}}{}\frac{\left({{ⅇ}}^{\frac{{1}}{{2}}{}\frac{{{u}}^{{2}}{}{{\mathrm{δ}}}^{{2}}}{{{u}}^{{2}}{+}{3}}}{}\sqrt{{\mathrm{π}}}{}\sqrt{{2}{}{{u}}^{{2}}{+}{6}}{}\sqrt{{2}}{}\sqrt{\frac{{1}}{{{u}}^{{2}}{+}{3}}}{}{{\mathrm{δ}}}^{{3}}{}{{u}}^{{3}}{+}{2}{}{{ⅇ}}^{\frac{{1}}{{2}}{}\frac{{{u}}^{{2}}{}{{\mathrm{δ}}}^{{2}}}{{{u}}^{{2}}{+}{3}}}{}{\mathrm{erf}}{}\left(\frac{{u}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}^{{2}}{+}{6}}{}{{u}}^{{2}}{+}{12}{}\sqrt{{2}{}{{u}}^{{2}}{+}{6}}\right){}\sqrt{{3}}{}{{ⅇ}}^{{-}\frac{{1}}{{2}}{}{{\mathrm{δ}}}^{{2}}}}{\sqrt{{2}{}{{u}}^{{2}}{+}{6}}{}{\left({{u}}^{{2}}{+}{3}\right)}^{{3}}{}{\mathrm{π}}}& {\mathrm{otherwise}}\end{array}$ (1)
 > $\mathrm{PDF}\left(X,\frac{1}{3}\right)$
 ${{}\begin{array}{cc}\frac{{243}}{{392}}{}\frac{\sqrt{{3}}}{{\mathrm{π}}}& {\mathrm{δ}}{=}{0}\\ \frac{{2187}}{{2458624}}{}\frac{\left(\frac{{1}}{{756}}{}{{ⅇ}}^{\frac{{1}}{{56}}{}{{\mathrm{δ}}}^{{2}}}{}\sqrt{{\mathrm{π}}}{}\sqrt{{56}}{}\sqrt{{2}}{}\sqrt{{28}}{}{{\mathrm{δ}}}^{{3}}{+}\frac{{2}}{{27}}{}{{ⅇ}}^{\frac{{1}}{{56}}{}{{\mathrm{δ}}}^{{2}}}{}{\mathrm{erf}}{}\left(\frac{{1}}{{168}}{}{\mathrm{δ}}{}\sqrt{{56}}{}\sqrt{{9}}\right){}\sqrt{{\mathrm{π}}}{}{{\mathrm{δ}}}^{{3}}{+}\frac{{1}}{{9}}{}{{ⅇ}}^{\frac{{1}}{{56}}{}{{\mathrm{δ}}}^{{2}}}{}\sqrt{{\mathrm{π}}}{}\sqrt{{56}}{}\sqrt{{2}}{}\sqrt{{28}}{}{\mathrm{δ}}{+}\frac{{56}}{{9}}{}{{ⅇ}}^{\frac{{1}}{{56}}{}{{\mathrm{δ}}}^{{2}}}{}{\mathrm{erf}}{}\left(\frac{{1}}{{168}}{}{\mathrm{δ}}{}\sqrt{{56}}{}\sqrt{{9}}\right){}\sqrt{{\mathrm{π}}}{}{\mathrm{δ}}{+}\frac{{2}}{{81}}{}{{\mathrm{δ}}}^{{2}}{}\sqrt{{56}}{}\sqrt{{9}}{+}\frac{{112}}{{81}}{}\sqrt{{56}}{}\sqrt{{9}}\right){}\sqrt{{56}}{}\sqrt{{9}}{}\sqrt{{3}}{}{{ⅇ}}^{{-}\frac{{1}}{{2}}{}{{\mathrm{δ}}}^{{2}}}}{{\mathrm{π}}}& {\mathrm{otherwise}}\end{array}$ (2)
 > $\mathrm{Mean}\left(X\right)$
 $\frac{{\mathrm{δ}}{}\sqrt{{2}}{}\sqrt{{3}}}{\sqrt{{\mathrm{π}}}}$ (3)
 > $\mathrm{Variance}\left(X\right)$
 ${3}{}{{\mathrm{δ}}}^{{2}}{+}{3}{-}\frac{{6}{}{{\mathrm{δ}}}^{{2}}}{{\mathrm{π}}}$ (4)

References

 Evans, Merran; Hastings, Nicholas; and Peacock, Brian. Statistical Distributions. 3rd ed. Hoboken: Wiley, 2000.
 Johnson, Norman L.; Kotz, Samuel; and Balakrishnan, N. Continuous Univariate Distributions. 2nd ed. 2 vols. Hoboken: Wiley, 1995.
 Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.

 See Also