In: Statistics and Probability
*Using the mpg column in the mtcars data conduct a hypothesis test to see if the true mean miles per gallon of cars is greater than 22. Use an alpha level of .1*
Please make sure you solve in R-studio. Solving without giving me R-codes will not help me. It would also help if you write a brief explanation of what you did. Thanks in advance!
The R output is:
The R code is:
data(mtcars)
print(mtcars)
t.test(mtcars$mpg,mu = 22, alternative = "greater")
The hypothesis being tested is:
H0: µ = 22
Ha: µ > 22
t = -1.7921
p-value = 0.9586
Since the p-value (0.9586) is greater than the significance level (0.10), we cannot reject the null hypothesis.
Therefore, we cannot conclude that the true mean miles per gallon of cars is greater than 22.
Please give me a thumbs-up if this helps you out. Thank you!