The noncentral t-distribution generalizes Student's t-distribution using a noncentrality parameter. Whereas the central probability distribution describes how a test statistic t is distributed when the difference tested is null, the noncentral distribution describes how t is distributed when the null is false. This leads to its use in statistics, especially calculating statistical power. The noncentral t-distribution is also known as the singly noncentral t-distribution, and in addition to its primary use in statistical inference, is also used in robust modeling for data.
Definitions
If Z is a standard normal random variable, and V is a chi-squared distributed random variable with ν degrees of freedom that is independent of Z, then
T
=
Z
+
μ
V
/
ν
{\displaystyle T={\frac {Z+\mu }{\sqrt {V/\nu }}}}
is a noncentral t-distributed random variable with ν degrees of freedom and noncentrality parameter μ ≠ 0. Note that the noncentrality parameter may be negative.
Cumulative distribution function
The cumulative distribution function of noncentral t-distribution with ν degrees of freedom and noncentrality parameter μ can be defined using the integral
F
ν
,
μ
(
x
)
=
1
2
ν
/
2
−
1
Γ
(
ν
/
2
)
∫
0
∞
Φ
(
u
x
ν
−
μ
)
u
ν
−
1
e
−
1
2
u
2
d
u
,
{\displaystyle F_{\nu ,\mu }(x)={\frac {1}{2^{\nu /2-1}\Gamma (\nu /2)}}\int _{0}^{\infty }\Phi \left({\frac {ux}{\sqrt {\nu }}}-\mu \right)u^{\nu -1}e^{-{\frac {1}{2}}u^{2}}du,}
where
Φ
(
x
)
{\displaystyle \Phi (x)}
is the cumulative distribution function of the standard normal distribution. A more practical approach is to express it as
F
ν
,
μ
(
x
)
=
{
F
~
ν
,
μ
(
x
)
,
if
x
≥
0
;
1
−
F
~
ν
,
−
μ
(
x
)
,
if
x
<
0
,
{\displaystyle F_{\nu ,\mu }(x)={\begin{cases}{\tilde {F}}_{\nu ,\mu }(x),&{\mbox{if }}x\geq 0;\\1-{\tilde {F}}_{\nu ,-\mu }(x),&{\mbox{if }}x<0,\end{cases}}}
where
F
~
ν
,
μ
(
x
)
=
Φ
(
−
μ
)
+
1
2
∑
j
=
0
∞
[
p
j
I
y
(
j
+
1
2
,
ν
2
)
+
q
j
I
y
(
j
+
1
,
ν
2
)
]
,
{\displaystyle {\tilde {F}}_{\nu ,\mu }(x)=\Phi (-\mu )+{\frac {1}{2}}\sum _{j=0}^{\infty }\left[p_{j}I_{y}\left(j+{\frac {1}{2}},{\frac {\nu }{2}}\right)+q_{j}I_{y}\left(j+1,{\frac {\nu }{2}}\right)\right],}
I
y
(
a
,
b
)
{\displaystyle I_{y}\,\!(a,b)}
is the regularized incomplete beta function,
y
=
x
2
x
2
+
ν
,
{\displaystyle y={\frac {x^{2}}{x^{2}+\nu }},}
p
j
=
1
j
!
exp
(
−
μ
2
2
)
(
μ
2
2
)
j
,
{\displaystyle p_{j}={\frac {1}{j!}}\exp \left(-{\frac {\mu ^{2}}{2}}\right)\left({\frac {\mu ^{2}}{2}}\right)^{j},}
q
j
=
μ
2
Γ
(
j
+
3
/
2
)
exp
(
−
μ
2
2
)
(
μ
2
2
)
j
,
{\displaystyle q_{j}={\frac {\mu }{{\sqrt {2}}\Gamma (j+3/2)}}\exp \left(-{\frac {\mu ^{2}}{2}}\right)\left({\frac {\mu ^{2}}{2}}\right)^{j},}
Although this formula is more complicated, it is computationally more efficient, as each series term can be calculated from the previous term using simple arithmetic operations. In statistical programming language R, the cumulative distribution function is implemented as pt. In the Python library SciPy, it is implemented as scipy.stats.nct.cdf.
Probability density function
The probability density function (pdf) for the noncentral t-distribution with ν > 0 degrees of freedom and noncentrality parameter μ can be expressed in several forms. A simple integral form is given by:
f
(
x
)
=
2
1
−
ν
2
ν
π
Γ
(
ν
/
2
)
∫
0
∞
u
ν
exp
(
−
1
2
(
u
x
ν
−
μ
)
2
−
1
2
u
2
)
d
u
{\displaystyle f(x)={\frac {2^{\frac {1-\nu }{2}}}{{\sqrt {\nu \pi }}\,\Gamma (\nu /2)}}\int _{0}^{\infty }u^{\nu }\exp \left(-{\frac {1}{2}}\left({\frac {ux}{\sqrt {\nu }}}-\mu \right)^{2}-{\frac {1}{2}}u^{2}\right)du}
The confluent hypergeometric function form of the density function is
f
(
x
)
=
Γ
(
ν
+
1
2
)
ν
π
Γ
(
ν
2
)
(
1
+
x
2
ν
)
−
ν
+
1
2
⏟
StudentT
(
x
;
μ
=
0
)
exp
(
−
μ
2
2
)
(
A
ν
(
x
;
μ
)
+
B
ν
(
x
;
μ
)
)
,
{\displaystyle f(x)=\underbrace {{\frac {\Gamma ({\frac {\nu +1}{2}})}{{\sqrt {\nu \pi }}\,\Gamma ({\frac {\nu }{2}})}}\left(1+{\frac {x^{2}}{\nu }}\right)^{-{\tfrac {\nu +1}{2}}}} _{{\text{StudentT}}(x\,;\,\mu =0)}\exp \left(-{\frac {\mu ^{2}}{2}}\right){\Big (}A_{\nu }(x\,;\,\mu )+B_{\nu }(x\,;\,\mu ){\Big )},}
where
A
ν
(
x
;
μ
)
=
1
F
1
(
ν
+
1
2
;
1
2
;
μ
2
x
2
2
(
x
2
+
ν
)
)
,
B
ν
(
x
;
μ
)
=
2
μ
x
x
2
+
ν
Γ
(
ν
2
+
1
)
Γ
(
ν
+
1
2
)
1
F
1
(
ν
2
+
1
;
3
2
;
μ
2
x
2
2
(
x
2
+
ν
)
)
,
{\displaystyle {\begin{aligned}A_{\nu }(x\,;\,\mu )&={_{1}F}_{1}\left({\frac {\nu +1}{2}}\,;\,{\frac {1}{2}}\,;\,{\frac {\mu ^{2}x^{2}}{2(x^{2}+\nu )}}\right),\\B_{\nu }(x\,;\,\mu )&={\frac {{\sqrt {2}}\mu x}{\sqrt {x^{2}+\nu }}}{\frac {\Gamma ({\frac {\nu }{2}}+1)}{\Gamma ({\frac {\nu +1}{2}})}}{_{1}F}_{1}\left({\frac {\nu }{2}}+1\,;\,{\frac {3}{2}}\,;\,{\frac {\mu ^{2}x^{2}}{2(x^{2}+\nu )}}\right),\end{aligned}}}
and where 1F1 is a confluent hypergeometric function.
An alternative integral form is
f
(
x
)
=
ν
ν
2
exp
(
−
ν
μ
2
2
(
x
2
+
ν
)
)
π
Γ
(
ν
2
)
2
ν
−
1
2
(
x
2
+
ν
)
ν
+
1
2
∫
0
∞
y
ν
exp
(
−
1
2
(
y
−
μ
x
x
2
+
ν
)
2
)
d
y
.
{\displaystyle f(x)={\frac {\nu ^{\frac {\nu }{2}}\exp \left(-{\frac {\nu \mu ^{2}}{2(x^{2}+\nu )}}\right)}{{\sqrt {\pi }}\Gamma ({\frac {\nu }{2}})2^{\frac {\nu -1}{2}}(x^{2}+\nu )^{\frac {\nu +1}{2}}}}\int _{0}^{\infty }y^{\nu }\exp \left(-{\frac {1}{2}}\left(y-{\frac {\mu x}{\sqrt {x^{2}+\nu }}}\right)^{2}\right)dy.}
A third form of the density is obtained using its cumulative distribution functions, as follows.
f
(
x
)
=
{
ν
x
{
F
ν
+
2
,
μ
(
x
1
+
2
ν
)
−
F
ν
,
μ
(
x
)
}
,
if
x
≠
0
;
Γ
(
ν
+
1
2
)
π
ν
Γ
(
ν
2
)
exp
(
−
μ
2
2
)
,
if
x
=
0.
{\displaystyle f(x)={\begin{cases}{\frac {\nu }{x}}\left\{F_{\nu +2,\mu }\left(x{\sqrt {1+{\frac {2}{\nu }}}}\right)-F_{\nu ,\mu }(x)\right\},&{\mbox{if }}x\neq 0;\\{\frac {\Gamma ({\frac {\nu +1}{2}})}{{\sqrt {\pi \nu }}\Gamma ({\frac {\nu }{2}})}}\exp \left(-{\frac {\mu ^{2}}{2}}\right),&{\mbox{if }}x=0.\end{cases}}}
This is the approach implemented by the dt function in R.
Derivation
The integral form of the CDF can be derived directly from the definition of a noncentral t variable:
F
ν
,
μ
(
x
)
=
P
{
Z
+
μ
V
/
ν
<
x
}
=
P
{
Z
+
μ
χ
/
ν
<
x
}
,
{\displaystyle F_{\nu ,\mu }(x)=\mathrm {P} \left\{{\frac {Z+\mu }{\sqrt {V/\nu }}}<x\right\}=\mathrm {P} \left\{{\frac {Z+\mu }{\chi /{\sqrt {\nu }}}}<x\right\},}
where
χ
{\displaystyle \chi }
represents a chi random variable with
ν
{\displaystyle \nu }
degrees of freedom. Since
Z
{\displaystyle Z}
and
χ
{\displaystyle \chi }
are independent random variables, the above probability can be quantified as the double integral of the product of their probability density functions over the region where the inequality holds:
P
{
Z
+
μ
χ
/
ν
<
x
}
=
∬
R
f
Z
(
z
)
f
χ
(
u
)
d
z
d
u
=
∬
R
(
1
2
π
e
−
1
2
z
2
)
(
1
2
ν
/
2
−
1
Γ
(
ν
/
2
)
u
ν
−
1
e
−
1
2
u
2
)
d
z
d
u
,
{\displaystyle \mathrm {P} \left\{{\frac {Z+\mu }{\chi /{\sqrt {\nu }}}}<x\right\}=\iint _{R}f_{Z}(z)f_{\chi }(u)dzdu=\iint _{R}\left({\frac {1}{\sqrt {2\pi }}}e^{-{\frac {1}{2}}z^{2}}\right)\left({\frac {1}{2^{\nu /2-1}\Gamma (\nu /2)}}u^{\nu -1}e^{-{\frac {1}{2}}u^{2}}\right)dzdu,}
w
h
e
r
e
R
=
{
(
u
,
z
)
|
u
>
0
,
z
+
μ
u
/
ν
<
x
}
=
{
(
u
,
z
)
|
u
>
0
,
z
<
x
ν
u
−
μ
}
{\displaystyle \mathrm {where\ } R=\left\{(u,z)\left|\,u>0,\,{\frac {z+\mu }{u/{\sqrt {\nu }}}}<x\right.\right\}=\left\{(u,z)\left|\,u>0,\,z<{\frac {x}{\sqrt {\nu }}}u-\mu \right.\right\}}
Here, region
R
{\displaystyle R}
represents the area in the
(
u
,
z
)
{\displaystyle (u,z)}
-plane lying to the right of the line
u
=
0
{\displaystyle u=0}
, and below the line
z
=
x
ν
u
−
μ
{\displaystyle z={\frac {x}{\sqrt {\nu }}}u-\mu }
. Thus, the integral can be written with specified limits:
F
ν
,
μ
(
x
)
=
∫
0
∞
∫
−
∞
x
ν
u
−
μ
(
1
2
π
e
−
1
2
z
2
)
d
z
(
1
2
ν
/
2
−
1
Γ
(
ν
/
2
)
u
ν
−
1
e
−
1
2
u
2
)
d
u
{\displaystyle F_{\nu ,\mu }(x)=\int _{0}^{\infty }\int _{-\infty }^{{\frac {x}{\sqrt {\nu }}}u-\mu }\left({\frac {1}{\sqrt {2\pi }}}e^{-{\frac {1}{2}}z^{2}}\right)dz\left({\frac {1}{2^{\nu /2-1}\Gamma (\nu /2)}}u^{\nu -1}e^{-{\frac {1}{2}}u^{2}}\right)du}
Finally, integrating with respect to
z
{\displaystyle z}
and separating the constant term yields:
F
ν
,
μ
(
x
)
=
1
2
ν
/
2
−
1
Γ
(
ν
/
2
)
∫
0
∞
Φ
(
u
x
ν
−
μ
)
u
ν
−
1
e
−
1
2
u
2
d
u
{\displaystyle F_{\nu ,\mu }(x)={\frac {1}{2^{\nu /2-1}\Gamma (\nu /2)}}\int _{0}^{\infty }\Phi \left({\frac {ux}{\sqrt {\nu }}}-\mu \right)u^{\nu -1}e^{-{\frac {1}{2}}u^{2}}du}
.
The formula for the PDF can be found by differentiating the CDF with respect to
x
{\displaystyle x}
:
f
(
x
)
=
d
d
x
F
ν
,
μ
(
x
)
=
1
2
ν
/
2
−
1
Γ
(
ν
/
2
)
∫
0
∞
d
d
x
[
Φ
(
u
x
ν
−
μ
)
]
u
ν
−
1
e
−
1
2
u
2
d
u
{\displaystyle f(x)={\frac {d}{dx}}F_{\nu ,\mu }(x)={\frac {1}{2^{\nu /2-1}\Gamma (\nu /2)}}\int _{0}^{\infty }{\frac {d}{dx}}\left[\Phi \left({\frac {ux}{\sqrt {\nu }}}-\mu \right)\right]u^{\nu -1}e^{-{\frac {1}{2}}u^{2}}du}
This simplifies to the first integral form of the PDF given above:
f
(
x
)
=
2
1
−
ν
2
ν
π
Γ
(
ν
/
2
)
∫
0
∞
u
ν
exp
(
−
1
2
(
u
x
ν
−
μ
)
2
−
1
2
u
2
)
d
u
{\displaystyle f(x)={\frac {2^{\frac {1-\nu }{2}}}{{\sqrt {\nu \pi }}\,\Gamma (\nu /2)}}\int _{0}^{\infty }u^{\nu }\exp \left(-{\frac {1}{2}}\left({\frac {ux}{\sqrt {\nu }}}-\mu \right)^{2}-{\frac {1}{2}}u^{2}\right)du}
Properties
Moments of the noncentral t-distribution
In general, the kth raw moment of the noncentral t-distribution is
E
[
T
k
]
=
{
(
ν
2
)
k
2
Γ
(
ν
−
k
2
)
Γ
(
ν
2
)
exp
(
−
μ
2
2
)
d
k
d
μ
k
exp
(
μ
2
2
)
,
if
ν
>
k
;
Does not exist
,
if
ν
≤
k
.
{\displaystyle {\mbox{E}}\left[T^{k}\right]={\begin{cases}\left({\frac {\nu }{2}}\right)^{\frac {k}{2}}{\frac {\Gamma \left({\frac {\nu -k}{2}}\right)}{\Gamma \left({\frac {\nu }{2}}\right)}}{\mbox{exp}}\left(-{\frac {\mu ^{2}}{2}}\right){\frac {d^{k}}{d\mu ^{k}}}{\mbox{exp}}\left({\frac {\mu ^{2}}{2}}\right),&{\mbox{if }}\nu >k;\\{\mbox{Does not exist}},&{\mbox{if }}\nu \leq k.\\\end{cases}}}
In particular, the mean and variance of the noncentral t-distribution are
E
[
T
]
=
{
μ
ν
2
Γ
(
(
ν
−
1
)
/
2
)
Γ
(
ν
/
2
)
,
if
ν
>
1
;
Does not exist
,
if
ν
≤
1
,
Var
[
T
]
=
{
ν
(
1
+
μ
2
)
ν
−
2
−
μ
2
ν
2
(
Γ
(
(
ν
−
1
)
/
2
)
Γ
(
ν
/
2
)
)
2
,
if
ν
>
2
;
Does not exist
,
if
ν
≤
2.
{\displaystyle {\begin{aligned}{\mbox{E}}\left[T\right]&={\begin{cases}\mu {\sqrt {\frac {\nu }{2}}}{\frac {\Gamma ((\nu -1)/2)}{\Gamma (\nu /2)}},&{\mbox{if }}\nu >1;\\{\mbox{Does not exist}},&{\mbox{if }}\nu \leq 1,\\\end{cases}}\\{\mbox{Var}}\left[T\right]&={\begin{cases}{\frac {\nu (1+\mu ^{2})}{\nu -2}}-{\frac {\mu ^{2}\nu }{2}}\left({\frac {\Gamma ((\nu -1)/2)}{\Gamma (\nu /2)}}\right)^{2},&{\mbox{if }}\nu >2;\\{\mbox{Does not exist}},&{\mbox{if }}\nu \leq 2.\\\end{cases}}\end{aligned}}}
An excellent approximation to
ν
2
Γ
(
(
ν
−
1
)
/
2
)
Γ
(
ν
/
2
)
{\displaystyle {\sqrt {\frac {\nu }{2}}}{\frac {\Gamma ((\nu -1)/2)}{\Gamma (\nu /2)}}}
is
(
1
−
3
4
ν
−
1
)
−
1
{\displaystyle \left(1-{\frac {3}{4\nu -1}}\right)^{-1}}
, which can be used in both formulas.
Asymmetry
The non-central t-distribution is asymmetric unless μ is zero, i.e., a central t-distribution. In addition, the asymmetry becomes smaller the larger degree of freedom. The right tail will be heavier than the left when μ > 0, and vice versa. However, the usual skewness is not generally a good measure of asymmetry for this distribution, because if the degrees of freedom is not larger than 3, the third moment does not exist at all. Even if the degrees of freedom is greater than 3, the sample estimate of the skewness is still very unstable unless the sample size is very large.
Mode
The noncentral t-distribution is always unimodal and bell shaped, but the mode is not analytically available, although for μ ≠ 0 we have
ν
ν
+
(
5
/
2
)
<
m
o
d
e
μ
<
ν
ν
+
1
{\displaystyle {\sqrt {\frac {\nu }{\nu +(5/2)}}}<{\frac {\mathrm {mode} }{\mu }}<{\sqrt {\frac {\nu }{\nu +1}}}}
In particular, the mode always has the same sign as the noncentrality parameter μ. Moreover, the negative of the mode is exactly the mode for a noncentral t-distribution with the same number of degrees of freedom ν but noncentrality parameter −μ.
The mode is strictly increasing with μ (it always moves in the same direction as μ is adjusted in). In the limit, when μ → 0, the mode is approximated by
ν
2
Γ
(
ν
+
2
2
)
Γ
(
ν
+
3
2
)
μ
;
{\displaystyle {\sqrt {\frac {\nu }{2}}}{\frac {\Gamma \left({\frac {\nu +2}{2}}\right)}{\Gamma \left({\frac {\nu +3}{2}}\right)}}\mu ;\,}
and when μ → ∞, the mode is approximated by
ν
ν
+
1
μ
.
{\displaystyle {\sqrt {\frac {\nu }{\nu +1}}}\mu .}
Related distributions
Central t-distribution: the central t-distribution can be converted into a location/scale family. This family of distributions is used in data modeling to capture various tail behaviors. The location/scale generalization of the central t-distribution is a different distribution from the noncentral t-distribution discussed in this article. In particular, this approximation does not respect the asymmetry of the noncentral t-distribution. However, the central t-distribution can be used as an approximation to the noncentral t-distribution.
If T is noncentral t-distributed with ν degrees of freedom and noncentrality parameter μ and F = T2, then F has a noncentral F-distribution with 1 numerator degree of freedom, ν denominator degrees of freedom, and noncentrality parameter μ2.
If T is noncentral t-distributed with ν degrees of freedom and noncentrality parameter μ and
Z
=
lim
ν
→
∞
T
{\displaystyle Z=\lim _{\nu \rightarrow \infty }T}
, then Z has a normal distribution with mean μ and unit variance.
When the denominator noncentrality parameter of a doubly noncentral t-distribution is zero, then it becomes a noncentral t-distribution.
Special cases
When μ = 0, the noncentral t-distribution becomes the central (Student's) t-distribution with the same degrees of freedom.
Occurrence and applications
Use in power analysis
Suppose we have an independent and identically distributed sample X1, ..., Xn each of which is normally distributed with mean θ and variance σ2, and we are interested in testing the null hypothesis θ = 0 vs. the alternative hypothesis θ ≠ 0. We can perform a one sample t-test using the test statistic
T
=
X
¯
σ
^
/
n
=
X
¯
−
θ
(
σ
/
n
)
+
θ
(
σ
/
n
)
(
σ
^
2
σ
2
/
(
n
−
1
)
)
/
(
n
−
1
)
{\displaystyle T={\frac {\bar {X}}{{\hat {\sigma }}/{\sqrt {n}}}}={\frac {{\frac {{\bar {X}}-\theta }{(\sigma /{\sqrt {n}})}}+{\frac {\theta }{(\sigma /{\sqrt {n}})}}}{\sqrt {\left.\left({\frac {{\hat {\sigma }}^{2}}{\sigma ^{2}/(n-1)}}\right)\right/(n-1)}}}}
where
X
¯
{\displaystyle {\bar {X}}}
is the sample mean and
σ
^
2
{\displaystyle {\hat {\sigma }}^{2}\,\!}
is the unbiased sample variance. Since the right hand side of the second equality exactly matches the characterization of a noncentral t-distribution as described above, T has a noncentral t-distribution with n−1 degrees of freedom and noncentrality parameter
n
θ
/
σ
{\displaystyle {\sqrt {n}}\theta /\sigma \,\!}
.
If the test procedure rejects the null hypothesis whenever
|
T
|
>
t
1
−
α
/
2
{\displaystyle |T|>t_{1-\alpha /2}\,\!}
, where
t
1
−
α
/
2
{\displaystyle t_{1-\alpha /2}\,\!}
is the upper α/2 quantile of the (central) Student's t-distribution for a pre-specified α ∈ (0, 1), then the power of this test is given by
1
−
F
n
−
1
,
n
θ
/
σ
(
t
1
−
α
/
2
)
+
F
n
−
1
,
n
θ
/
σ
(
−
t
1
−
α
/
2
)
.
{\displaystyle 1-F_{n-1,{\sqrt {n}}\theta /\sigma }(t_{1-\alpha /2})+F_{n-1,{\sqrt {n}}\theta /\sigma }(-t_{1-\alpha /2}).}
Similar applications of the noncentral t-distribution can be found in the power analysis of the general normal-theory linear models, which includes the above one sample t-test as a special case.
Use in tolerance intervals
One-sided normal tolerance intervals have an exact solution in terms of the sample mean and sample variance based on the noncentral t-distribution. This enables the calculation of a statistical tolerance limit below which, with some confidence level, a specified proportion of a sampled population falls.
Let
X
{\displaystyle X}
be a random normal variable with unknown population mean and variance, and let a sample of size
n
{\displaystyle n}
yield sample mean
x
¯
{\displaystyle {\overline {x}}}
and sample standard deviation
s
{\displaystyle s}
. The probability that the proportion of
X
{\displaystyle X}
values lying below limit
L
{\displaystyle L}
is at least
p
{\displaystyle p}
is given by the noncentral t-CDF:
P
{
P
{
X
<
L
}
>
p
}
=
F
ν
,
μ
(
L
−
x
¯
s
/
n
)
,
w
h
e
r
e
ν
=
n
−
1
,
μ
=
Φ
−
1
(
p
)
n
{\displaystyle \mathrm {P} \left\{\mathrm {P} \left\{X<L\right\}>p\right\}=F_{\nu ,\mu }\left({\frac {L-{\overline {x}}}{s/{\sqrt {n}}}}\right),\ \ \mathrm {where\ } \nu =n-1,\ \ \mu =\Phi ^{-1}(p){\sqrt {n}}}
Tolerance bounds are typically expressed in the form
x
¯
+
k
s
{\displaystyle {\overline {x}}+ks}
, where k is referred to as its k-factor. This factor is analogous to a z-score, but uses sample statistics rather than population parameters. In this framing, the probability that the proportion of
X
{\displaystyle X}
lying below the limit
x
¯
+
k
s
{\displaystyle {\overline {x}}+ks}
is at least
p
{\displaystyle p}
is given by
P
{
P
{
X
<
x
¯
+
k
s
}
>
p
}
=
F
ν
,
μ
(
n
k
)
,
w
h
e
r
e
ν
=
n
−
1
,
μ
=
Φ
−
1
(
p
)
n
{\displaystyle \mathrm {P} \left\{\mathrm {P} \left\{X<{\overline {x}}+ks\right\}>p\right\}=F_{\nu ,\mu }({\sqrt {n}}k),\ \ \mathrm {where\ } \nu =n-1,\ \ \mu =\Phi ^{-1}(p){\sqrt {n}}}
Thus, calculating the k-factor corresponding to a given proportion and confidence level requires using the inverse cumulative distribution function of the noncentral t-distribution, which is implemented as qt in R, and as scipy.stats.nct.ppf in SciPy.
See also
Noncentral F-distribution
References
External links
Eric W. Weisstein. "Noncentral Student's t-Distribution." From MathWorld—A Wolfram Web Resource
High accuracy calculation for life or science.: Noncentral t-distribution From Casio company.