I'm confused on how to solve this, it needs to be coded in R programming language:
Use the data set `airquality` (a built in dataset in Rstudio).
Compare means of temperature between May and July.
Go through the entire procedure: state the null and alternative
hypotheses, state the assumptions, calculate the test statistics,
state the distribution of the test statistic if the null
hypothesis is true, compute the rejection region, compute the
p-value, and state your conclusions.
Check whether the assumptions required to perform the t-test hold.
Use a significance level of 5%.
I have attached the R code here.
Also attached the output.
T-test hold as sample follows normal distribution which we get from the qqplot.
R code-
Z=attach(airquality)
names(Z)
M=Z$Month
T=Z$Temp
X=T[M==5]
Y=T[M==7]
qqnorm(X)
qqnorm(Y)
t.test(X,Y,var.equal=T)
Output-
Two Sample t-test data: X and Y t = -12.616, df = 60, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0
Get Answers For Free
Most questions answered within 1 hours.