t-test for aphid data:
Null: µ = 50 Alternative: µ does not equal 50
Check that the conditions for inference have been met:
Data = c(45, 61, 56, 57, 53, 53, 53, 64, 62, 52)
hist(Data, breaks = seq(40, 70, 2.5))
boxplot(Data)
Conduct a t-test:
t.test(Data, mu = 50)
One Sample t-test
data: Data
t = 3.1283, df = 9, p-value = 0.01215
alternative hypothesis: true mean is not equal to 50
95 percent confidence interval:
51.55052 59.64948
sample estimates:
mean of x
55.6
t_crit_data = (mean(Data) - 50)/(sd(Data)/sqrt(10))
t_crit_data
[1] 3.128323
2*(pt(t_crit_data, df = 9, lower.tail = FALSE))
[1] 0.01215449