Introduction to Statistics (MAT/SST 115.03 2008S)

R notes for Activity 19-2: Exploring the t-Distribution


While the book does not ask you to use technology in this section, I thought it would be useful for you to learn a bit about how you can use R for working with the t-distribution.

Particularly since the t-distribution table is complicated to use, it is helpful to be able to have R do the computation for us. R provides a procedure, qt, that behaves much like that table. However, qt, given an area, computes a t-value with that area to the left (rather than to the right, as shown in the table).

For a 95% confidence interval, we call qt with .975. (Why .975? Because there's 0.025 to the right, and therefore 0.975 to the left.) More generally, we can average the confidence level and 1. The qt function also expects a second parameter, which represents the degrees of freedom. For example, part d asks us to find the value of t* for a 95% confidence interval with a sample size of 10 (9 degrees of freedom). In R, we would write

qt(.975, 9)

Of course, you should make sure that you know how to use the table to find t* and confirm that you get the same answer in both cases.

Creative Commons License

Samuel A. Rebelsky, rebelsky@grinnell.edu

Copyright (c) 2007-8 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.