Example 1: Roller Coaster Durations

The R chunk below reads in a data set with information about 197 roller coasters in the United States. You may treat this as a random sample that is representative of the population of all roller coasters in the United States.

coasters <- read_csv("https://mhc-stat140-2017.github.io/data/sdm4/Coasters_2014.csv")
## Parsed with column specification:
## cols(
##   Name = col_character(),
##   Park = col_character(),
##   Track = col_character(),
##   Speed = col_double(),
##   Height = col_double(),
##   Drop = col_double(),
##   Length = col_integer(),
##   Duration = col_integer(),
##   Inversions = col_integer(),
##   Opened = col_integer()
## )
head(coasters)
## # A tibble: 6 x 10
##                  Name                     Park Track Speed Height  Drop
##                 <chr>                    <chr> <chr> <dbl>  <dbl> <dbl>
## 1 Top Thrill Dragster               Cedar Poin Steel   120    420 400.0
## 2 Spuerman The Escape Six Flags Magic Mountain Steel   100    415 328.1
## 3    Millennium Force              Cedar Point Steel    93    310 300.0
## 4             Goliath Six Flags Magic Mountain Steel    85    235 255.0
## 5               Titan     Six Flags Over Texas Steel    85    245 255.0
## 6   Phantom's Revenge           Kennywood Park Steel    82    160 228.0
## # ... with 4 more variables: Length <int>, Duration <int>,
## #   Inversions <int>, Opened <int>
str(coasters)
## Classes 'tbl_df', 'tbl' and 'data.frame':    197 obs. of  10 variables:
##  $ Name      : chr  "Top Thrill Dragster" "Spuerman The Escape" "Millennium Force" "Goliath" ...
##  $ Park      : chr  "Cedar Poin" "Six Flags Magic Mountain" "Cedar Point" "Six Flags Magic Mountain" ...
##  $ Track     : chr  "Steel" "Steel" "Steel" "Steel" ...
##  $ Speed     : num  120 100 93 85 85 82 82 80 80 80 ...
##  $ Height    : num  420 415 310 235 245 160 205 209 165 230 ...
##  $ Drop      : num  400 328 300 255 255 ...
##  $ Length    : int  2800 1235 6595 4500 5312 3200 2202 5843 1560 5394 ...
##  $ Duration  : int  NA NA 165 180 210 NA 62 163 NA 240 ...
##  $ Inversions: int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Opened    : int  2003 1997 2000 2000 2001 2001 2002 1909 2001 2001 ...
##  - attr(*, "spec")=List of 2
##   ..$ cols   :List of 10
##   .. ..$ Name      : list()
##   .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
##   .. ..$ Park      : list()
##   .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
##   .. ..$ Track     : list()
##   .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
##   .. ..$ Speed     : list()
##   .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
##   .. ..$ Height    : list()
##   .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
##   .. ..$ Drop      : list()
##   .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
##   .. ..$ Length    : list()
##   .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
##   .. ..$ Duration  : list()
##   .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
##   .. ..$ Inversions: list()
##   .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
##   .. ..$ Opened    : list()
##   .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
##   ..$ default: list()
##   .. ..- attr(*, "class")= chr  "collector_guess" "collector"
##   ..- attr(*, "class")= chr "col_spec"
nrow(coasters)
## [1] 197

(a) Make a density plot of the distribution of ride duration for these roller coasters.

SOLUTION:

# Your code goes here

(b) Check any conditions required to calculate a confidence interval for the population mean duration of roller coaster rides.

SOLUTION:

(c) Calculate a 90% confidence interval for the population mean duration of roller coaster rides. Do this using the t.test function and again using the mean, sd, and qt functions.

SOLUTION:

# Your code goes here

(d) Interpret your confidence interval from part (c) in context.

SOLUTION:

Example 2: Speed of Light (From SDM4 20.27)

In 1882, Michelson measured the speed of light (usually denoted as \(c\) as in the equation $E = mc^2). His values are in units of km/sec. He reported the results of 23 trials, with a mean of 299,756.22 km/sec and a standard deviation of 107.12.

(a) What do we have to assume in order to use these data to make inference about the speed of light? Can you check these assumptions using the information stated above?

SOLUTION:

(b) Assuming that the conditions you listed in part (a) are met, find a 95% confidence interval for the speed of light from these statistics.

SOLUTION: