t-Distribution Calculator (PDF, CDF, p-value)
Compute the Student's t-distribution probability density (PDF), lower cumulative probability (CDF), upper tail, and two-sided probability (p-value) from a t value and degrees of freedom, with PDF and CDF graphs.
Input
Enter a t value and the degrees of freedom nu to compute the Student''s t-distribution probability density, cumulative probability, upper tail, and two-sided probability (p-value).
The t value, such as a test statistic. Negative values are allowed.
Enter a positive value. Larger values approach the normal distribution.
Result
Two-sided probability (p-value) at t = 2, nu = 10
0.07338803
Probability density (PDF)
0.06114577
Lower cumulative probability (CDF)
0.96330598
Upper tail probability
0.03669402
Mean
0
Variance
1.25
Probability density function (PDF) graph
Cumulative distribution function (CDF) graph
How it works
- The t-distribution density is f(t) = Gamma((nu+1)/2) divided by ( sqrt(nu pi) Gamma(nu/2) ) times (1 + t squared over nu) raised to -(nu+1)/2, where nu is the degrees of freedom.
- The cumulative distribution (lower tail) uses the regularized incomplete beta function I_x(a, b) with x = nu divided by (nu + t squared). When t is at least 0 it equals 1 minus I_x(nu/2, 1/2) over 2, and when t is below 0 it equals I_x(nu/2, 1/2) over 2.
- The upper tail probability is 1 minus the lower tail, and the two-sided probability (p-value) sums both tails as P(absolute T is at least absolute t).
- The mean is 0 when nu is greater than 1, and the variance is nu divided by (nu minus 2) when nu is greater than 2. Otherwise they are undefined.
- As the degrees of freedom nu increase, the t-distribution approaches the standard normal distribution.
- Calculations use a continued-fraction expansion of the regularized incomplete beta function and a Lanczos approximation of the gamma function, so the precision follows the formulas directly without lookup tables.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
t-Distribution Calculator (PDF, CDF, p-value)