Module 5: Significance of significance testing (hypothesis to correlations)
Hi everyone!
This week we have learned about hypothesis testing, correlation, and confidence intervals.
The director of manufacturing at a cookies needs to determine whether a new machine is production a particular type of cookies according to the manufacturer's specifications, which indicate that cookies should have a mean of 70 and standard deviation of 3.5 pounds. A sample pf 49 of cookies reveals a sample mean breaking strength of 69.1 pounds.
A. State the null and alternative hypothesis
H₀ : μ = 70 pounds
Hₐ : μ ≠ 70 pounds
B. Is there evidence that the machine is not meeting the manufacturer's specifications for average strength? Use a 0.05 level of significance
No, we do not have evidence that the machine is not meeting the manufacturer's specifications for average strength because the z test statistic (-1.8) is greater than the critical value (1.96) on the lower tail in the rejection zone from -1.96 to - infinity.
C. Compute the p value and interpret its meaning
p value = 0.07186064
Given the mean of the cookies using the new machine is at the manufacturer's specification of 70 pounds, there is a 0.07186064 probability that the new machine is producing at 69.1 pounds by chance alone in the sample of 49 cookies.
This probability is higher than the significance level at 0.05 meaning the probability of the new machine producing 69.1 pounds by chance is not unlikely enough to be evidence that the new machine is not following the manufacturer's specifications.
D. What would be your answer in (B) if the standard deviation were specified as 1.75 pounds?
Yes, we do have evidence that the machine is not meeting the manufacturer's specifications for average strength because the z test statistic (-3.6) is less than the critical value (1.96) on the lower tail in the rejection zone from -1.96 to - infinity.
E. What would be your answer in (B) if the sample mean were 69 pounds and the standard deviation is 3.5 pounds?
Yes, we do have evidence that the machine is not meeting the manufacturer's specifications for average strength because the z test statistic (-2) is less than the critical value (1.96) on the lower tail in the rejection zone from -1.96 to - infinity.
Second Question:
If x̅ = 85, σ = standard deviation = 8, and n=64, set up 95% confidence interval estimate of the population mean μ.
Confidence interval (83.04004, 86.95996)
Code
> girlGoals <- c(4, 5, 6)
> girlGrades <- c(49, 50, 69)
> girlPopular <- c(24, 36, 38)
> girlTime <- c(19, 22, 28)
> girlTotal <- c(92, 108, 135)
>
> boyGoals <- c(4, 5, 6)
> boyGrades <- c(46.1, 54.2, 67.7)
> boyPopular <- c(26.9, 31.6, 39.5)
> boyTime <- c(18.9, 22.2, 27.8)
> boyTotal <- c(95.9, 113, 141)
> Girls <- data.frame (girlGoals, girlGrades, girlPopular, girlTime, girlTotal)
> Boys <- data.frame(boyGoals, boyGrades, boyPopular, boyTime, boyTotal)
> Both <- data.frame(Girls, Boys)
> Both
girlGoals girlGrades girlPopular girlTime girlTotal boyGoals boyGrades
1 4 49 24 19 92 4 46.1
2 5 50 36 22 108 5 54.2
3 6 69 38 28 135 6 67.7
boyPopular boyTime boyTotal
1 26.9 18.9 95.9
2 31.6 22.2 113.0
3 39.5 27.8 141.0
> x <- Girls
> y <- Boys
> cor(x,y)
boyGoals boyGrades boyPopular boyTime boyTotal
girlGoals 1.0000000 0.9897433 0.9894203 0.9890517 0.9904046
girlGrades 0.8873565 0.9441243 0.9448614 0.9456833 0.9425629
girlPopular 0.9244735 0.8605276 0.8593826 0.8580918 0.8629152
girlTime 0.9819805 0.9989061 0.9990085 0.9991175 0.9986750
girlTotal 0.9892685 0.9999946 0.9999995 0.9999989 0.9999681
> cor(Girls, Boys, method = "pearson")
boyGoals boyGrades boyPopular boyTime boyTotal
girlGoals 1.0000000 0.9897433 0.9894203 0.9890517 0.9904046
girlGrades 0.8873565 0.9441243 0.9448614 0.9456833 0.9425629
girlPopular 0.9244735 0.8605276 0.8593826 0.8580918 0.8629152
girlTime 0.9819805 0.9989061 0.9990085 0.9991175 0.9986750
girlTotal 0.9892685 0.9999946 0.9999995 0.9999989 0.9999681
> install.packages("corrgram")
> library(corrgram)
> corrgram(Both)
Comments
Post a Comment