The built-in nhtemp data set is a time series giving the mean annual temperature in degrees Fahrenheit in New Haven, Connecticut, from 1912 to 1971. We can easily access this data with the assignment x<-as.vector(nhtemp).
Assume these values are a random sample from a normal population with unknown mean ð and unknown standard deviation ð.
Call the vector of observations x, using the assignment above
x<-as.vector(nhtemp)
a) Calculate the sum of the first 25 elements of x.
b) Calculate the minimum value of the first 25 elements of x.
c) Calculate the sample mean of x.
d) Calculate the sample variance of x.
e) Calculate the sample standard deviation s of x.
f) Calculate the sample median of x using R.
g) Calculate the interquartile range of x, using R.
h) Calculate the sample variance of 7x.
i) If we assume that the population has a normal distribution, then calculate the maximum likelihood estimate of ð2 using this data.
j) If we assume that the population has a normal distribution, then calculate the maximum likelihood estimate of ð using this data.
k) Using this data, create a 94% confidence interval for ð, noting that the sample size is large enough so we can use a normal distribution critical value zstar.(
,
)
l) Using this data, create a 94% prediction interval for ð, noting that the sample size is large enough so we can use a normal distribution critical value zstar. Note ð can be negative. (
,
)
m) Using this data, we create an 6% level test of
H0: ð=51 versus the alternative Ha: ð > 51. We will reject H0 if z =
x â 51
s
60
> zstar
where s is the sample standard deviation. What is the value of zstar? (Calculate from normal distribution)
n) Continuing from part m, what is the value of z?
o) Continuing from parts m and n, what is the p value of the test.
p) Copy your R script for the above into the text box here.



Answer :

Other Questions