Docsity

Statistical Analysis: Paired Two-Sample T-Test and Two-Proportion Inference, Exams of Data Analysis & Statistical Methods

Toggle sidebar
bg1
Stat./For./Hort. 571
Midterm I, Fall 2005
Brief Solutions
1. This is a paired two-sample inference problem. Let Y1=
aphid number at the bottom and Y2= aphid number at the
top of a plant. Let D=Y2−Y1denote the difference of
aphid numbers with µD=E(D). The observed differences
are 10,7,7,−1,7,8,5,7,7,8 with n= 10,¯
d= 6.50, s2
d= 8.50
(sd= 2.915).
(a) For testing H0:µD= 0 versus H0:µD6= 0, use a
paired two-sample t-test. The observed t=¯
d−0
√s2
d/n =
6.50−0
√8.50/10 = 7.05. Compare with Tdistribution on df =
n−1 = 9, the p-value 2 ×P(T9≥7.05) is less than
2×0.001, which is 0.002. Reject H0at the 5% level and
there is strong evidence against H0.
(b) The 90% confidence interval for µDis ¯
d±tα/2,n−1ps2
d/n
which is 6.50 ±1.833 ×p8.50/10, or 6.50 ±1.69 =
[4.81,8.19].
2. (a) The assumptions made in the paired two-sample infer-
ence are: D1,D2,··· , D10 are iid N(µD, σ2). That is,
the differences Di’s are independent of each other and
they are from a normal distribution. The assumption
of independence is potentially violated in the current
experimental setting.
(b) Let µD=µ2−µ1. Then the hypotheses of interest are
H0:µD= 0 versus H0:µD>0. Since α= 0.10 and
β= 1 −0.90 = 0.10, we have z0.10 = 1.282. We also
know that σ2= 10, µ0
D= 0, and µA
D= 2. Thus the
desired sample size is
n=(zα+zβ)2σ2
(µA
D−µ0
D)2
=(1.282 + 1.282)2×10
22= 16.44 ↑17.
3. This is a two-proportion inference problem.
Here yA= 24, nA= 50, yB= 10, nB= 60, thus ˆpA=
24/50 = 0.48 and ˆpB= 10/60 = 0.167. An approximate
95% confidence interval for pA−pBis
ˆpA−ˆpB±z0.025rˆpA(1 −ˆpA)
nA
+ˆpB(1 −ˆpB)
nB
= (0.48 −0.167) ±1.96 ×r0.48 ×0.52
50 +0.167 ×0.833
60
= 0.313 ±0.168 = [0.145,0.481]
We may use the normal approximation, because nApA=
24 >5, nAqA= 26 >5, nBpB= 10 >5, nBqB= 50 >5.
(a)(b) We assume that YA∼B(50, pA), YB∼B(60, pB), YA
and YBare independent, and for the normal approxi-
mation to be valid, we need nApA, nAqA, nBpB, nBqB
to be at least 5. For YAto have a binomial distribution,
we assume that the outcome of each lake is Bernoulli
(contaminated or not), the contamination of lakes is in-
dependent, and the contamination rate is constant pA
for all 50 lakes (similarly YB).
4. Let Ydenote the number of lakes that are contaminated
among the n= 40 lakes and assume that Y∼B(40, p). The
hypotheses of interest are H0:p= 0.5 versus HA:p6= 0.5.
Let ˆp=Y /40 denote the proportion of contaminated lakes.
Under H0,E(ˆp) = p= 0.5 and V ar( ˆp) = pq/n = 0.5×0.5/40.
We should reject H0if ˆpis either much larger than 0.5 (ˆp≥c)
or much smaller than 0.5 (ˆp≤c∗). Since np = 20, nq = 20
are both larger than 5, we may use normal approximation.
By symmetry, we focus on cfirst:
P(ˆp≥c)≈P(Z≥c−0.5
p0.5×0.5/40 ) = 0.05 = α/2.
Since P(Z≥1.645) = 0.05, we have
c−0.5
p0.5×0.5/40 = 1.645
and thus c= 0.5 + 1.645 ×p0.5×0.5/40 = 0.5+ 0.13 = 0.63.
By symmetry, c∗= 0.5−1.645×p0.5×0.5/40 = 0.5−0.13 =
0.37. Thus the rejection region is ˆp≤0.37 or ˆp≥0.63.
5. (a) Use an independent two-sample t-test. The pooled vari-
ance is sp=p(s2
1+s2
2)/2 = 1.877 and the observed
t=¯y1−¯y2
sp√1/n1+1/n2
=12.12−10.21
1.877√2/15 = 2.78. Compare with
Tdistribution on df = 28, the p-value 2 ×P(T28 ≥2.78)
is between 2 ×0.001 and 2 ×0.005 (i.e. between 0.002
and 0.01). Reject H0at the 5% level and there is strong
evidence against H0.
(b) We assume that Y1’s are iid N(µ1, σ2
1), Y2’s are iid
N(µ2, σ2
2), Y1and Y2are independent, and the variances
are equal σ2
1=σ2
2=σ2. That is, we assume normal
distribution, independence both within and across trt
groups, and equal variance.
(c) The ANOVA table looks like:
Source df SS MS
Trt 1 27.20 27.20
Error 28 98.56 3.52
Total 29 125.76 –
Note that MSError = p(s2
1+s2
2)/2 = 3.52 and thus
SSError = 3.52 ×28 = 98.56. You may compute SSTrt
directly from ¯y1,¯y2. Alternatively, from 5(a) t= 2.78,
we have f=t2= 2.782and MSTrt = MSError ×f=
3.52 ×2.782= 27.20. And SSTrt = MSTrt, because
dfTrt = 1.
Grade Distribution
100: 2
90-99:59
80-89:36
70-79:11 mean = 86.0, median = 90
60-69: 8
below: 3

Partial preview of the text

Download Statistical Analysis: Paired Two-Sample T-Test and Two-Proportion Inference and more Exams Data Analysis & Statistical Methods in PDF only on Docsity!

Stat./For./Hort. 571

Midterm I, Fall 2005

Brief Solutions

  1. This is a paired two-sample inference problem. Let Y 1 = aphid number at the bottom and Y 2 = aphid number at the top of a plant. Let D = Y 2 − Y 1 denote the difference of aphid numbers with μD = E(D). The observed differences are 10, 7 , 7 , − 1 , 7 , 8 , 5 , 7 , 7 , 8 with n = 10, d¯ = 6. 50 , s^2 d = 8. 50 (sd = 2.915).

(a) For testing H 0 : μD = 0 versus H 0 : μD 6 = 0, use a paired two-sample t-test. The observed t = √d¯s− 20 d /n^

√^6.^50 −^0

  1. 50 / 10

= 7.05. Compare with T distribution on df = n − 1 = 9, the p-value 2 × P (T 9 ≥ 7 .05) is less than 2 × 0 .001, which is 0.002. Reject H 0 at the 5% level and there is strong evidence against H 0. (b) The 90% confidence interval for μD is d¯±tα/ 2 ,n− 1

p s^2 d/n which is 6. 50 ± 1. 833 ×

p

  1. 50 /10, or 6. 50 ± 1. 69 = [4. 81 , 8 .19].

  2. (a) The assumptions made in the paired two-sample infer- ence are: D 1 , D 2 , · · · , D 10 are iid N(μD , σ^2 ). That is, the differences Di’s are independent of each other and they are from a normal distribution. The assumption of independence is potentially violated in the current experimental setting. (b) Let μD = μ 2 − μ 1. Then the hypotheses of interest are H 0 : μD = 0 versus H 0 : μD > 0. Since α = 0.10 and β = 1 − 0 .90 = 0.10, we have z 0. 10 = 1.282. We also know that σ^2 = 10, μ^0 D = 0, and μAD = 2. Thus the desired sample size is

n = (zα^ +^ zβ^ )

(^2) σ 2 (μAD − μ^0 D )^2

=

(1.282 + 1.282)^2 × 10

  1. This is a two-proportion inference problem. Here yA = 24, nA = 50, yB = 10, nB = 60, thus ˆpA = 24 /50 = 0.48 and ˆpB = 10/60 = 0.167. An approximate 95% confidence interval for pA − pB is

pˆA − pˆB ± z 0. 025

r pˆA(1 − pˆA) nA

pˆB (1 − ˆpB ) nB

= (0. 48 − 0 .167) ± 1. 96 ×

r

  1. 48 × 0. 52 50

0. 167 × 0. 833

= 0. 313 ± 0 .168 = [0. 145 , 0 .481]

We may use the normal approximation, because nApA = 24 > 5 , nAqA = 26 > 5 , nB pB = 10 > 5 , nB qB = 50 > 5. (a)(b) We assume that YA ∼ B(50, pA), YB ∼ B(60, pB ), YA and YB are independent, and for the normal approxi- mation to be valid, we need nApA, nAqA, nB pB , nB qB to be at least 5. For YA to have a binomial distribution, we assume that the outcome of each lake is Bernoulli (contaminated or not), the contamination of lakes is in- dependent, and the contamination rate is constant pA for all 50 lakes (similarly YB ).

  1. Let Y denote the number of lakes that are contaminated among the n = 40 lakes and assume that Y ∼ B(40, p). The hypotheses of interest are H 0 : p = 0.5 versus HA : p 6 = 0.5. Let ˆp = Y /40 denote the proportion of contaminated lakes. Under H 0 , E(ˆp) = p = 0.5 and V ar(ˆp) = pq/n = 0. 5 × 0. 5 /40. We should reject H 0 if ˆp is either much larger than 0.5 (ˆp ≥ c) or much smaller than 0.5 (ˆp ≤ c∗). Since np = 20, nq = 20 are both larger than 5, we may use normal approximation. By symmetry, we focus on c first:

P (ˆp ≥ c) ≈ P (Z ≥ p c^ −^0.^5

  1. 5 × 0. 5 / 40

) = 0.05 = α/ 2.

Since P (Z ≥ 1 .645) = 0.05, we have

c − 0. 5 p

  1. 5 × 0. 5 / 40

and thus c = 0.5 + 1. 645 ×

p

  1. 5 × 0. 5 /40 = 0.5 + 0.13 = 0.63. By symmetry, c∗^ = 0. 5 − 1. 645 ×

p

  1. 5 × 0. 5 /40 = 0. 5 − 0 .13 = 0 .37. Thus the rejection region is ˆp ≤ 0 .37 or ˆp ≥ 0 .63.

  2. (a) Use an independent two-sample t-test. The pooled vari- ance is sp =

p (s^21 + s^22 )/2 = 1.877 and the observed t = (^) s ¯y^1 −y¯^2 p

1 /n 1 +1/n 2 =^

  1. 12 − 10. 21
  2. 877

2 / 15 = 2.78.^ Compare with T distribution on df = 28, the p-value 2 × P (T 28 ≥ 2 .78) is between 2 × 0 .001 and 2 × 0 .005 (i.e. between 0. and 0.01). Reject H 0 at the 5% level and there is strong evidence against H 0. (b) We assume that Y 1 ’s are iid N(μ 1 , σ 12 ), Y 2 ’s are iid N(μ 2 , σ^22 ), Y 1 and Y 2 are independent, and the variances are equal σ^21 = σ^22 = σ^2. That is, we assume normal distribution, independence both within and across trt groups, and equal variance. (c) The ANOVA table looks like:

Source df SS MS Trt 1 27.20 27. Error 28 98.56 3. Total 29 125.76 –

Note that MSError =

p (s^21 + s^22 )/2 = 3.52 and thus SSError = 3. 52 × 28 = 98.56. You may compute SSTrt directly from ¯y 1 , y¯ 2. Alternatively, from 5(a) t = 2.78, we have f = t^2 = 2. 782 and MSTrt = MSError ×f =

  1. 52 × 2. 782 = 27.20. And SSTrt = MSTrt, because dfTrt = 1.

Grade Distribution

70-79:11 mean = 86.0, median = 90

below: 3