Module 5. Assignment:
Some things to note before starting this assignment:
Question A:
A1: State the null and alternative hypothesis _______
Given that:
H0 = 70
σ = 3.5
n = 49
x̄ = 69.1
H0 = 70
H1 =/ 70
A2: Is there evidence that the machine is not meeting the manufacturer's specifications for average strength? Use a 0.05 level of significance _______
I believe there isn't evidence regarding the machine not meeting the manufacturer's requirements, we have the values to compute this. To test this, we need to use the formula first: z = (x̄-H0)/(σ/(sqrt(n)))
-> (69.1-70)/(3.5/(sqrt(49))) = -1.8
Now, we need to use this formula: Two-tailed p-value = p = 2 * pnorm(z)
A3: Compute the p value and interpret its meaning _______
As we can see, our p-value is 0.071861 = 0.072. This means that p > alpha (0.072 > 0.05). Therefore, We fail to reject the null hypothesis, meaning there isn't enough evidence that the machine is failing the specification. To add, a value of 0.072 means there's a chance of 7.2% of seeing a sample mean far from 70 just from random sampling.
A4: What would be your answer in (A2) if the standard deviation were specified as 1.75 pounds? _______
If the standard deviation were specified as 1.75 pounds, then:
z = -0.9/(1.75/(sqrt(49))) = -0.9/0.25 = -3.6
After computing the p-value, we get p = 0.0003. Meaning we should reject the null hypothesis.
A5: What would be your answer in (A2) if the sample mean were 69 pounds and the standard deviation is 3.5 pounds? ______
After we redo our calculations, we get a p-value of 0.045, so we barely reject the null hypothesis.
Question B:
B1: If x̅ = 85, σ = standard deviation = 8, and n=64, set up 95% confidence interval estimate of the population mean μ.
As we can see, our Standard Error becomes: SE = 1 because 8/(sqrt(64)) = 1.
With a confidence level of 95%, our critical z-value is + or - 1.96. So after our calculations, we get a lower value of 83.04 and an upper value of 86.96.
Question C:
girls_grades <- c(89, 90, 91, 95, 98, 99, 96, 99)
girls_time_spend <- c(19, 20, 22, 25, 28, 30, 32, 36)
boys_grades <- c(86, 84, 92, 93, 93, 96, 98, 98)
boys_time_spend <- c(15, 19, 22, 23, 25, 29, 30, 40)
Please perform the correlation analysis:
C1: Calculate the correlation coefficient (Pearson) between time spent and grade for girls' and boys' datasets, respectively.
First, we installed the required package.
Then, we entered our data (our four vectors).
Afterwards, we created our two data frames for the girls and boys, then ran the Pearson method for the correlation function. What we got are the grade values of 0.907 for the girls and 0.862 for the boys.
C2: Use ggpairs to plot the time spent and grade for girls' and boys' datasets, respectively.
Plot for girls data:

Plot for boys data:







Comments
Post a Comment