pt(-2.976,9)+(1-pt(2.976,9))
## [1] 0.01555021
\[
H_0: \mu_{diff}=0\\
H_a: \mu_{diff}\neq0\\
t=\frac{-2.6}{\frac{3.026}{\sqrt{12}}}=-2.976\\
p=P(T\leq-2.976)+P(T\geq2.976)=.0155
\]
We reject \(H_0\) in favor of \(H_a\), students perform differently on multiplication tests depending on whether they are listening to classical music or blues music.
pt(-5.777,39)+(1-pt(5.777,39))
## [1] 1.056836e-06
\[
H_0: \mu_{diff}=0\\
H_a: \mu_{diff}\neq0\\
t=\frac{-3.825}{\frac{4.187}{\sqrt{40}}}=-5.777\\
p=P(T\leq-5.777)+P(T\geq5.777)=0
\]
We reject \(H_0\) in favor of \(H_a\), students perform differently on multiplication tests depending on whether they are listening to classical music or blues music.
pt(-3.403,39)+(1-pt(3.403,39))
## [1] 0.00155375
\[
H_0: \mu_1=\mu_2\\
H_a: \mu_1\neq\mu_2\\\\
SE=\sqrt{\frac{8.37^2}{40}+\frac{10.75^2}{40}}=2.154\\
t=\frac{76.75-84.08}{2.154}=-3.403\\
p=P(T\leq-3.403)+P(T\geq3.403)=0.0015
\]
We reject \(H_0\) in favor of \(H_a\), students perform differently on multiplication tests depending on whether they are listening to classical music or blues music.
1-pbinom(464,980,.5)
## [1] 0.9483821
\[
\pi=\text{probability of voting yes} \\
H_0: \pi=.5\\
H_a: \pi>.5\\
X=\text{votes yes on referendum}=465\\
p=P(X\geq465)=0.948
\]
We fail to reject \(H_0\), not enough evidence that a mojority of voters will vote yes they should say it is too close to call.
With a new hypothesis test:
pnorm(-1.597)
## [1] 0.05513285
\[
H_0: \pi=.5\\
H_a: \pi>.5\\
SE=\sqrt{\frac{.5(1-.5)}{980}}=0.0159\\
z=\frac{\frac{465}{980}-.5}{.0159}=-1.597\\
p=P(z\leq-1.597)=0.0551
\]
We fail to jeject \(H_0\), there is not enough evidence that a mojority of voters will vote yes.
qnorm(0.975)
## [1] 1.959964
\[
SE=\sqrt{\frac{.48(1-.48)}{1259}}=.01408\\
(.48-1.96*SE,.48+1.96*SE)=(.4524,.5075)
\]
We are 95% confident that the proportion of the population who thinks marijuana should be legalized lies in \[(.4524,.5075)\].
c) If the survey was a yes or no response question then 52% responded no and it is a normal distribution.
d) The news piece is not likely but since .5 is in our interval it is possible.
Exercise 6.20 on p. 316 of OpenIntro Statistics
95% CI with ME=.02: \[
ME=.02=1.96*\sqrt{\frac{.48(1-.48)}{n}}\\
n=\frac{.48(1-.48)}{(\frac{.02}{1.96})^2}=2398
\]
To limit the margin of error of a 95% CI to 2% we would have to survey 2,398 Americans.