Cutoffs under the t-distribution
We can use the qt()
function to find cutoffs under the t-distribution. For a given probability p
and a given degrees of freedom df
, qt(p, df)
gives us the cutoff value for the t-distribution with df
degrees of freedom for which the probability under the curve is p
. In other words, if \(P(t_{df} < T) = p\), then \(T\) = qt(p, df)
. For example, if \(T\) corresponds to the 95th percentile of a distribution, \(p = 0.95\). The "middle 95%" means from p = 0.025
to p = 0.975
.
This is a part of the course
“Inference for Numerical Data in R”
Exercise instructions
- Find the 95th percentile of the t-distribution with 10 degrees of freedom.
- Find the cutoff value that bounds the upper end of the middle 95th percent of the t-distribution with 10 degrees of freedom.
- Find the cutoff value that bounds the upper end of the middle 95th percent of the t-distribution with 100 degrees of freedom.
- How do the last values probabilities compare? Based on your findings, is the middle 95% of the t-distribution wider for lower or higher degrees of freedom?
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# 95th percentile for df = 10
(x <- qt(___, df = ___))
# Upper bound of middle 95th percent for df = 10
(y <- ___)
# Upper bound of middle 95th percent for df = 100
(z <- ___)
# Comparison
y == z
y > z
y < z