In: Statistics and Probability
How do I do this in R Studio?
1 Students who performed poorly on a City of New York Skills Assessment Test were enrolled in a summer math program. Scores of 10 students before and after the summer program were recorded.
They were:
Before = 18,18,21,18,18,20,23,23,21,17
After = 24,25,33,29,33,36,34,36,34,27
(Scores for individual students are in the same order in each list.) Did the NYC summer math program improve student performance significantly?
8. How many points did student scores improve on average? (hint: consult the output from question 1; it’s OK to simply write this answer – it did come from R output.)
9. What is the 95% confidence interval for the parameter of average score improvement? (hint: consult the output from question 1; it’s OK to simply write this answer – it did come from R output.)
R-Script:
> rm(list=ls())
> Before <- c( 18,18,21,18,18,20,23,23,21,17 )
> After <- c( 24,25,33,29,33,36,34,36,34,27 )
> paired.t.test <- t.test(After,Before, mu = 0, alternative =
"greater", paired = T)
> paired.t.test
Paired t-test
data: After and Before
t = 11.375, df = 9, p-value = 6.065e-07
alternative hypothesis: true difference in means is greater than
0
95 percent confidence interval:
9.562818 Inf
sample estimates:
mean of the differences
11.4
Answer (i)
Null Hypothesis, Ho: There is no significant effect of NYC summer Math Program on average scores of students i.e.
Alternative Hypothesis, Ha: The NYC summer math program improve student performance significantly
Since p-value = 6.065e-07 < 0.05 so we Reject the null hypothesis and conclude that the NYC summer math program improve student performance significantly
Answer (ii)
11.4 Points
Answer (iiI) 95% Confidence Interval is given as: (9.5628, Inf)