In: Statistics and Probability
Your statistics instructor claims that 60 percent of the students who take her Elementary Statistics class go through life more enriched. For some reason that she can't quite figure out , most people don't believe her. You decide to check this out on your own. You randomly survey 64 of her past Elementary Statistics students and find that 34 feel more enriched as a result of her class. Now , what do you think? (Only using R-Lab)
Claims : 60 percent of the students who take her Elementary Statistics class go through life more enriched.
From the given claim the null hypothesis ( H0 ) and the alternative hypothesis(Ha) are as follows:
H0 : p0 = 0.60
Ha : p0 ≠ 0.60
The formula of z test statistic for proportion is as
Let's use R-Software to find the Z value and p-value
The R codes are as follows:
n <- 64
p <- 34 / 64
p_0 <- 0.6
# calculate the z-statistic
z_stat <- (p - p_0) / sqrt(p_0 * (1 - p_0) / n)
z_stat
p_value<-2*(pnorm(abs(z_stat),lower.tail = FALSE)) #This is two
tailed test so we multiply it by 2
p_value
Run the above code in R, so we get the following output
Here level of significance is not give, so take it as 5%
Conclusion: At 5% level of significance there are not sufficient evidence to say that the percent of the students who take her Elementary Statistics class go through life more enriched is different than 60.