1. Learn
  2. /
  3. Courses
  4. /
  5. Inference for Numerical Data in R

Exercise

t-interval at various levels

A random sample was taken of nearly 10% of UCLA courses. The most expensive textbook for each course was identified, and its price at the UCLA Bookstore and on Amazon.com were recorded. These data are recorded in the textbooks dataset. We want to test whether there is a difference between the average prices of textbooks sold in the bookstore vs. on Amazon.

Since the book price data are paired (the price of the same book at the two stores are not independent), rather than using individual variables for the prices from each store, you will look at the a single variables of the differences in price. The diff column the UCLA Bookstore price minus the Amazon.com price for each book.

Instructions

100 XP
  • Construct a 90% confidence interval for the average difference in prices of the same textbook at at the UCLA bookstore and on Amazon.
  • Now construct the same interval at the 95% confidence level.
  • And now at the 99% confidence level.
  • Take a note of the widths of the intervals. You'll need these for the next exercise.