Suppose that daily rainfall records (in millimetres) are observed at two weather stations.
A random sample of 50 positive daily rainfall records from Station 1 and 45 positive daily
rainfall records from Station 2 are provided in the file rainfall.txt on Canvas. From
the data, the mean daily rainfall for Station 1 is about 20.49 millimetres and the mean
daily rainfall for Station 2 is about 7.79 millimetres, as shown below:
rainfall = read.table ("rainfall.txt", header = TRUE)
station1 = rainfall$rainfall [rainfall$station == 1)
station2= rainfall$rainfall [rainfall$station == 2]
mean(station1)
## [1] 20.4936
mean (station2)
## [1] 7.787333
(a) [2 marks] Using R, produce a QQ-plot comparing the daily rainfall records to
a normal distribution using the qqnorm function for both the rainfall data from
Station 1 and the rainfall data from Station 2. What do these plots suggest about the
distribution of daily rainfall records? Include R code and the plots in your answer.
(b) [4 marks] Using the formula from lectures, compute a 95% confidence interval
for the ratio of the population variance in daily rainfall records between the selected
rainfall data from Station 1 and the selected rainfall data from Station 2. While you
may use a function in R to verify your answer, it is expected that you show the steps
of working out the limits of the confidence interval via hand working. You may use R
to perform the calculations required for these steps.
(c) [1 mark] Based on your confidence interval from part (b), is it reasonable to assume
the variance in daily rainfall records is the same for Station 1 and Station 2? Explain
why or why not.
(d) [4 marks] Using the formula from lectures consistent with your conclusion to part
(c), compute a 95% confidence interval for the difference in the population average
rainfall from Station 1 and rainfall from Station 2. While you may use a function in
R to verify your answer, it is expected that you show the steps of working out the
limits of the confidence interval via hand working. You may use R to perform the
calculations required for these steps.
Fig: 1