1.) You want to determine if classical music and blues music have different effects upon the ability of college students to perform mental tasks requiring concentration.
You design a study where 10 students are chosen at random, and they are asked to complete multiplication tests while listening to classical music and blues music. You randomly select which type of music each student will listen to first so that there is not bias due to a learning effect. You then record the scores each student received on the multiplication tests while listening to each of the two types of music. These results are included in the file "Study1.csv" on Moodle. Do these results give strong enough evidence to conclude that students perform differently on multiplication tests depending on whether they are listening to classical music or blues music? Explain how you arrive at your answer.
Before any analysis of the study is done, we can conclude that the results won’t give strong enough evidence to accept that students perform differently on multiplication tests depending on whether they are listening to classical music or blues music because there are only 10 students in the study. To be able to accept the outcome of the analysis the study must have at least 16 students or symmetric data. A histogram will show that it is not symmetric.
First, set the value for alpha to be 0.05 to test our p-value against.
\(H_o\): \(\mu_{diff} = 0\)
\(H_a\): \(\mu_{diff} \neq 0\)
Two Tailed T-Test must be performed:
\(\bar x_{diff} = -2.6\); \(\bar{s.d}_{diff} = 3.025815\); \(S.E = 0.956847\)
Compute test statistic.
\[t = \frac{-2.6 - 0}{S.E} = 2.717258\]
The test is two tailed, both sides of the distribution must be accounted for the p-value.
P-value:
library(fastR2)
x <- c(-3, 3, -2, -2, -3, -4, -3, 1, -8, -5)
histogram(x)
pt(-2.717258, 9) + (1 - pt(2.717258, 9))
## [1] 0.02371402
The calculated p-value was less than alpha, thus the null hypothesis would have been rejected, and there would have been statistically significant evidence that students perform differently on multiplication tests depending on whether they are listening to classical music or blues music, but the sample size was too small to assume normallity.
Suppose you design the same study as above but where 40 students are chosen at random to participate. The results of this study are included in the file "Study2.csv" on Moodle. Do these results give strong enough evidence to conclude that students perform differently on multiplication tests depending on whether they are listening to classical music or blues music? Explain how you arrive at your answer.
First, set the value for alpha to be 0.05 to test our p-value against.
\(H_o\): \(\mu_{diff} = 0\)
\(H_a\): \(\mu_{diff} \neq 0\)
Two Tailed T-Test must be performed:
\(\bar x_{diff} = -3.825\); \(\bar{s.d}_{diff} = 4.1872006\); \(S.E = 0.662055\)
Compute test statistic.
\[t = \frac{-3.825 - 0}{S.E} = -5.777466\]
The test is two tailed, both sides of the distribution must be accounted for the p-value.
P-value:
pt(-5.777466, 39) + (1 - pt(5.777466, 39))
## [1] 1.055263e-06
The calculated p-value was less than alpha, thus the null hypothesis was rejected, and there is statistically significant evidence that students perform differently on multiplication tests depending on whether they are listening to classical music or blues music.
Suppose you design another study where 40 students chosen at random listen to classical music while taking a multiplication test, while another 40 students are chosen at random listen to blues music while taking a multiplication test. You record each student's scores on these tests, along with which type of music they were listening to. These results are included in the file "Study3.csv" on Moodle. Do these results give strong enough evidence to conclude that students perform differently on multiplication tests depending on whether they are listening to classical music or blues music? Explain how you arrive at your answer.
A difference in means will be used to determine whether or not that students perform differently on multiplication tests depending on whether they are listening to classical music or blues music? Explain how you arrive at your answer.
First, set the value for alpha to be 0.05 to test our p-value against.
\(H_o\): \(\mu_{c} = \mu_{b}\)
\(H_a\): \(\mu_{c} \neq \mu_{b}\)
Two Tailed T-Test must be performed:
\(\bar x_{diff} = 7.325\); \(\bar{s.d}_{1} = 10.74981\);\(\bar{s.d}_{2} = 8.365834\)
\(S.E = \sqrt{\frac{10.74981^{2}}{40} + \frac{8.365834^{2}}{40}} = 2.15375\)
Compute test statistic.
\[t = \frac{7.325 - 0}{S.E} = 3.401045\]
The test is two tailed, both sides of the distribution must be accounted for the p-value.
P-value:
pt(-3.401045, 39) + (1 - pt(3.401045, 39))
## [1] 0.001562322
The calculated p-value was less than alpha, thus the null hypothesis was rejected, and there is statistically significant evidence that students perform differently on multiplication tests depending on whether they are listening to classical music or blues music.
2.) Exercise 5.48 on p. 272 of OpenIntro Statistics
2.a.)
\(H_o\): \(\mu_{1} = \mu_{2} =...= \mu_{n}\)
\(H_a\): \(\mu_{n} \neq \mu_{p}\)
where \(\mu_{n}\) and \(\mu_{p}\) are different population means.
2.b.) Conditions: \(n >> 40\);\(k>2\); No relation to the normal distribution; degrees of freedom: \((k-1,n-k)\); ANOVA test.
2.c.) First row of blanks: 4; 2006.16; 2.188993
Second row of blanks: 1167; 229.1191
Third row of blanks: 1171; 269388.16
2.d.) Fail to reject because the p-vaule was greater than 0.05.
3.) A local newspaper conducts a phone survey to judge public opinion about a referendum.
The referendum passes if a majority of voters vote yes. Of the 980 respondents to the survey, 465 say they plan to vote yes. Is this sufficient information for the newspaper to predict the outcome of the referendum vote, or should they say it is ``too close to call"? Conduct your analysis twice, once using a binomial distribution directly and again using the normal approximation to the binomial distribution. How do the results compare?
Binomial distribution way: X~Binom(980,0.5); Thus the probability is equal to,
2*pbinom(464,980,0.5)
## [1] 0.1032359
The result would be “too close to call” because the p-value is greater than 0.05
Noramal approximation way: Find sample proportion and z-score.
\(\hat{\pi} = 0.4744898\); \(z = -1.597191\)
Find p-value:
2*pnorm(-1.597191)
## [1] 0.1102231
Similar results, yet still off by about 0.01.
4.) Exercise 6.12 on p. 315 of OpenIntro Statistics
4.a.) sample statistic
4.b.) Assume that all 1259 citizens responded
95 percent C.I: (0.4524, 0.5076)
0.48 + (1.96 * (sqrt((.48 * .52)/1259)))
## [1] 0.5075972
0.48 - (1.96 * (sqrt((.48 * .52)/1259)))
## [1] 0.4524028
4.c.) Yes, \(n = 1259\) which is plenty high enough to assume normal approximation.
4.d.) No, 0.5000 falls inside our confidence interval. Thus the claim of, “Majority of Americans think marijuana should be legalized” cannot be made.
5.) Exercise 6.20 on p. 316 of OpenIntro Statistics
The margin of error is equal to;
\(e = z * S.E\)
So we set \(e = 0.02\) and solve for n, which is included in the S.E formula.
The amount of people require to be surveyed to achieve an error of 2 percent is 2398 Americans.
6.) Exercise 6.56 on p. 330 of OpenIntro Statistics
6.a.)
\(H_o\): \({p}_{t} = {p}_{c}\)
\(H_a\): \({p}_{t} > {p}_{c}\)
Our alternate hypothesis is the proportion of treated participants (seeing someone yawn) that yawn will be higher than the proportion of controlled participants.
6.b.) Calculate the difference between the observed proportions. \(\hat{p}_{t} - \hat{p}_{c}\)
\[\frac{10}{34} - \frac{4}{16} = 0.4412\]
6.c.) From the distrubtion of the 10,000 simulated samples, the proporion of times there is a difference in the observed proportions as great or greater than 0.4412 is less than 5 percent. Thus, the null hypothesis is rejected and the we can conclude that there is enough statisticall evidence to show that the proportion of people seeing someone yawn, will yawn more than the people who don’t see anyone yawn. Or yawning is contagious.