Home

tinv2

Tinv2 is a statistical function used to obtain the critical value of the Student's t distribution for a two-tailed test. It returns the positive t-value such that the probability of observing an absolute value larger than that t, under a t distribution with a specified number of degrees of freedom, equals the given significance level p.

Formally, if T follows a t distribution with df degrees of freedom, tinv2(p, df) yields t such

In practice, tinv2 appears in various software implementations under names like the two-tailed inverse t function.

that
P(|T|
>
t)
=
p.
Equivalently,
t
=
F_T^{-1}(1
−
p/2),
where
F_T
is
the
cumulative
distribution
function
of
the
t
distribution
with
df
degrees
of
freedom.
The
function
is
used
to
determine
critical
values
for
two-tailed
hypothesis
tests
or
to
construct
confidence
intervals.
For
example,
Excel
provides
T.INV.2T(p,
df);
SciPy
and
other
statistical
libraries
expose
equivalent
functionality
via
t.ppf(1
−
p/2,
df).
Typical
inputs
require
0
<
p
<
1
and
df
>
0.
As
df
grows
large,
tinv2
approaches
the
corresponding
z-value
from
the
standard
normal
distribution.
An
example:
tinv2(0.05,
30)
yields
approximately
2.04,
the
two-tailed
critical
value
for
a
5%
significance
level
with
30
degrees
of
freedom.