Get Started

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”

View Course

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

This exercise is part of the course

Inference for Numerical Data in R

AdvancedSkill Level
5.0+
3 reviews

In this course you'll learn techniques for performing statistical inference on numerical data.

In this chapter you'll use Central Limit Theorem based techniques to estimate a single parameter from a numerical distribution. You will do this using the t-distribution.

Exercise 1: t-distributionExercise 2: When to t?Exercise 3: Probabilities under the t-distributionExercise 4: Cutoffs under the t-distribution
Exercise 5: Estimating a mean with a t-intervalExercise 6: Average commute time of AmericansExercise 7: Average number of hours workedExercise 8: t-interval for paired dataExercise 9: t-interval at various levelsExercise 10: Understanding confidence intervalsExercise 11: Testing a mean with a t-testExercise 12: Estimate the median difference in textbook pricesExercise 13: Test for a difference in median test scoresExercise 14: Interpret the p-value

What is DataCamp?

Learn the data skills you need online at your own pace—from non-coding essentials to data science and machine learning.

Start Learning for Free