MIT18 05S14 ps8 Solutions
MIT18 05S14 ps8 Solutions
Since HA is one-sided the rejection region is one-sided. Since HA says that θ is small it
predicts a small number of heads in 12 tosses. That is, we reject H0 on a small number of
heads.
Rejection region is 0 ≤ x ≤ 2.
0.25
0.2
0.15
0.1
0.05
0
-0.05
0 2 4 6 8 10 12
Rejection region is n ≥ 9.
1
18.05 Problem Set 8, Spring 2014 Solutions
0.4
0.2
●
●
●
0.0
● ● ● ●
● ● ● ● ● ● ● ● ● ● ● ●
0 5 10 15 20
x
c θn+3−1 (1 − θ)m+9−1
2
18.05 Problem Set 8, Spring 2014 Solutions
Oi
G=2 Oi ln .
Ei
or
(Oi − Ei )2
X2 =
Ei
where Oi are the observed counts and Ei are the expected counts from Benford’s distribu
tion. The total count = 100.
First digit k 1 2 3 4 5 6 7 8 9
observed 7 13 12 9 9 13 11 10 16
expected 30.103 17.609 12.494 9.691 7.918 6.695 5.7992 5.1153 4.5757
X 2 components 17.731 1.206 0.200 0.049 0.148 5.939 4.664 4.665 28.523
There are 9 cells that must sum to 100 so the degrees of freedom = 8.
Since p < α we reject H0 in favor of the notion that Jon and Jerry were trying to embezzle
money.
data: x and y
F = 0.9703, num df = 19, denom df = 19, p-value = 0.9484
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
0.3840737 2.4515249
sample estimates:
ratio of variances
0.9703434
3
18.05 Problem Set 8, Spring 2014 Solutions
Our F -statistic is
s2x
fstat = = 0.9703
s2y
The degrees are freedom are both 19. Since the F -statistic is less than 1, the p-value is
p = 2*pf(fstat, 19, 19)) = 0.9484
which matches our result in part (a).
Problem 5. (10 pts.) (a) Let’s specify the assumptions and hypotheses for this test.
Assumptions: Each group of data is drawn from a normal distribution with the same
The test compares the between group variance with the within group variance. Under the
null hypothesis both are estimates of σ 2 , so their ratio should be about 1. We’ll reject H0
fstat = msb/msw
df1 = n-1;
df2 = n*(m-1)
p = 1 - pf(fstat, df1,df2)
print(fstat)
print(p)
This produced an F -statistic of 6.09453 and p = 0.00041. Since the p-value is much smaller
than 0.05 we reject H0 .
()
(b) To compare all 4 means 2 at time would require 42 = 6 t-tests. If we run six tests it
is not appropriate to claim the significance level of each one is the significance level of the
collection.
(c) We compare 10-day beards with each of the others. In each case we have: H0 : the
means are the same
HA : the 10-day mean is greater than the other mean.
Note carefully that this is a one-sided test while the F -test in part (b) is a two-sided test.
From the class 19 reading we have the t-statistic for two samples. Since both samples have
the same size m = 351 the formula looks a little simpler.
x̄ − ȳ
t= ,
sx̄−ȳ
4
18.05 Problem Set 8, Spring 2014 Solutions
s2x + s2y
s
2P =
m
Note: the test assumes equal variances which we should verify in each case. This raises the
issue of multiple tests from the same data, but it is legitimate to do this as exploratory
analyis which merely suggests directions for further study.
The following table shows the one-sided, 2-sample t-test comparing the mean of the 10-day
growth against the other three states.
t-stat one-sided p-value F -stat
clean 3.22314 0.00066 10.38866
5-day 3.84587 0.00007 14.79069
full 1.98273 0.02389 3.93120
We also give the F -statistic for the two samples. You can check that the F -statistic for
two-samples is just the square of the t-statistic.
We reiterate, with multiple testing the true significance level of the test is larger than the
significance level for each individual test.
5
MIT OpenCourseWare
https://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.