In: Statistics and Probability
Please solve in R studio. Thanks in advance!
**Below are two samples of test scores from two different calculus
classes. It is believed that class 1 performed better than class
two. From previous tests it is known that the test scores for both
classes are normally distributed and the population standard
deviation of class 1 is 10 points and the population standard
deviation of class 2 is 8 points. Do the data support that class 1
performed better.**
```{r}
class1<-c(100, 86, 98, 72, 66, 95, 93, 82)
class2<-c(98, 82, 99, 99, 70, 71, 94, 79)
```
> class1<-c(100, 86, 98, 72, 66, 95, 93, 82)
> class2<-c(98, 82, 99, 99, 70, 71, 94, 79)
#Calculating the 5 Number Summary and Standard deviation
for both
> summary(class1)
Min. 1st Qu. Median Mean 3rd Qu. Max.
66.00 79.50 89.50 86.50 95.75 100.00
> sd(class1)
[1] 12.42118
> summary(class2)
Min. 1st Qu. Median Mean 3rd Qu. Max.
70.00 77.00 88.00 86.50 98.25 99.00
> sd(class2)
[1] 12.47855
#Performing the normal T-test
> t.test(class1,class2)
Welch Two Sample t-test
data: class1 and class2
t = 0, df = 14, p-value = 1
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-13.35122 13.35122
sample estimates:
mean of x mean of y
86.5 86.5
Conclusion:
The results below show a p-value = .01 supporting the null hypothesis that “true difference in means is equal to 0”; essentially it states there is No statistical difference between the two means. Hence both classes performed the same.However the median score for Class-1 is better.