Two-Sample Hypothesis Testing and Confidence Intervals in Statistics, Exams of Data Analysis & Statistical Methods

Information on how to conduct hypothesis tests and find confidence intervals for the difference between means in two-sample testing. Both paired and independent samples, with equal and unequal variances. It also includes instructions for performing levene's test to check the assumption of equal variances.

Typology: Exams

Pre 2010

Uploaded on 09/02/2009

koofers-user-qua
koofers-user-qua 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
STATISTICS 571 TA: Perla Reyes DISCUSSION 8
Review
1. Two Sample Testing and C.I
(a) Paired Sample
Suppose (X1, Y1),(X2, Y2),··· ,(Xn, Yn) are paired samples from (X, Y ) and E(X)= µ1,
E(Y)= µ2.Suppose D=XYis a random sample from a N(µD, σ2
D), where µD=
µ1µ2.
i. The test statistic for H0:µD=dversus HA:µD6=dis
T=¯
Dd
SD/ntn1
ii. A (1 α)% C.I. for µDis given by
¯
dtn1,α/2
sd
nµD¯
d+tn1,α/2
sd
n
(b) Independent Sample, assuming σ2
1=σ2
2
Suppose X1, X2, ..., Xn1is a random sample from N(µ1, σ2
1) and Y1, Y2, ..., Yn2is a ran-
dom sample from N(µ2, σ2
2). Suppose those two samples are independent and σ2
1=σ2
2=
σ2.
i. The test statistic for H0:µ1µ2=aversus HA:µ1µ26=ais
T=(¯
X¯
Y)a
Spq1
n1+1
n2
tn1+n22,where S2
p=(n11)S2
1+ (n21)S2
2
n1+n22
ii. A (1 α)% C.I. for µ1µ2is
¯x¯ytn1+n22,α/2spr1
n1
+1
n2µ1µ2¯x¯y+tn1+n22,α/2spr1
n1
+1
n2
(c) Independent Sample σ2
16=σ2
2
Suppose X1, X2, ..., Xn1is a random sample from N(µ1, σ2
1) and Y1, Y2, ..., Yn2is a ran-
dom sample from N(µ2, σ2
2). Suppose those two samples are independent, but σ2
16=σ2
2
i. The test statistic for H0:µ1µ2=aversus HA:µ1µ26=ais
T=(¯
X¯
Y)a
qS2
1
n1+S2
2
n2
twith adf =(vr1+vr2)2
(vr2
1
n11)+( vr2
2
n21)
where vr1=S2
1/n1and vr2=S2
2/n2.
ii. A (1 α)% C.I. for µ1µ2is
¯x¯ytadf,α/2ss2
1
n1
+s2
2
n2µ1µ2¯x¯y+tadf,α/2ss2
1
n1
+s2
2
n2
(d) Test of equal variance (Levene’s Test)
i. Determine the median of each sample
ii. Calculate the absolute value of all deviates from the median
iii. If, in either sample, there is an odd number of observations, delete exactly one “0”
iv. Perform an independent sample T-test with variances assumed equal
email: [email protected] 1 Office: 248 MSC M2:30-3:30 R3:30-4:30
pf2

Partial preview of the text

Download Two-Sample Hypothesis Testing and Confidence Intervals in Statistics and more Exams Data Analysis & Statistical Methods in PDF only on Docsity!

STATISTICS 571 TA: Perla Reyes DISCUSSION 8

Review

  1. Two Sample Testing and C.I

(a) Paired Sample Suppose (X 1 , Y 1 ), (X 2 , Y 2 ), · · · , (Xn, Yn) are paired samples from (X, Y ) and E(X)= μ 1 , E(Y)= μ 2. Suppose D = X − Y is a random sample from a N (μD, σ D^2 ), where μD = μ 1 − μ 2. i. The test statistic for H 0 : μD = d versus HA : μD 6 = d is

T =

D¯ − d SD/

n ∼ tn− 1

ii. A (1 − α)% C.I. for μD is given by

d¯ − tn− 1 ,α/ 2 √^ sd n

≤ μD ≤ d¯ + tn− 1 ,α/ 2 sd √ n (b) Independent Sample, assuming σ^21 = σ^22 Suppose X 1 , X 2 , ..., Xn 1 is a random sample from N (μ 1 , σ^21 ) and Y 1 , Y 2 , ..., Yn 2 is a ran- dom sample from N (μ 2 , σ^22 ). Suppose those two samples are independent and σ 12 = σ 22 = σ^2. i. The test statistic for H 0 : μ 1 − μ 2 = a versus HA : μ 1 − μ 2 6 = a is

T = ( X¯ − Y¯ ) − a Sp

1 n 1 +^

1 n 2

∼ tn 1 +n 2 − 2 , where S p^2 = (n 1 − 1)S 12 + (n 2 − 1)S 22 n 1 + n 2 − 2

ii. A (1 − α)% C.I. for μ 1 − μ 2 is

¯x − y¯ − tn 1 +n 2 − 2 ,α/ 2 sp

n 1

n 2 ≤ μ 1 − μ 2 ≤ x¯ − y¯ + tn 1 +n 2 − 2 ,α/ 2 sp

n 1

n 2 (c) Independent Sample σ^21 6 = σ^22 Suppose X 1 , X 2 , ..., Xn 1 is a random sample from N (μ 1 , σ^21 ) and Y 1 , Y 2 , ..., Yn 2 is a ran- dom sample from N (μ 2 , σ 22 ). Suppose those two samples are independent, but σ^21 6 = σ 22 i. The test statistic for H 0 : μ 1 − μ 2 = a versus HA : μ 1 − μ 2 6 = a is

T =

( X¯ − Y¯ ) − a √ S^21 n 1 +^

S 22 n 2

∼ t with adf =

(vr 1 + vr 2 )^2 ( vr

(^21) n 1 − 1 ) + (^

vr 22 n 2 − 1 ) where vr 1 = S^21 /n 1 and vr 2 = S 22 /n 2. ii. A (1 − α)% C.I. for μ 1 − μ 2 is

x¯ − y¯ − tadf,α/ 2

s^21 n 1

s^22 n 2

≤ μ 1 − μ 2 ≤ x¯ − y¯ + tadf,α/ 2

s^21 n 1

s^22 n 2 (d) Test of equal variance (Levene’s Test) i. Determine the median of each sample ii. Calculate the absolute value of all deviates from the median iii. If, in either sample, there is an odd number of observations, delete exactly one “0” iv. Perform an independent sample T-test with variances assumed equal

email: [email protected] 1 Office: 248 MSC M2:30-3:30 R3:30-4:

STATISTICS 571 TA: Perla Reyes DISCUSSION 8

Practice Problem

  1. An experiment is conducted to determine if the use of a special chemical additive with a standard fertilizer accelerates plant growth. 10 locations are included in the study. At each location, 2 plants growing in close proximity are treated: one is given the standard fertilizer; the other is given the standard fertilizer with the chemical additive. Plant growth after 4 weeks is measured in cm, and the following data are obtained.

location 1 2 3 4 5 6 7 8 9 10 without additive 20 31 16 22 19 32 25 18 20 19 with additive 23 34 15 21 22 31 29 20 24 23

(a). State the assumptions you must make to proceed with an analysis of data of this form. (b). Do these data support the claim that use of the chemical additive accelerates plant growth? (c). Find a 95% C.I. for the difference between plant growth.

  1. Crop rotation seems to change yield in certain situations. Potatoes were gathered from 2 fields, one which had been planted for years with potatoes(X) and one which had previously been planted with corn(Y). The data are:

X 6. 5 5. 5 5. 0 7. 0 Y 7. 5 6. 5 8. 0 9. 0 8. 5

(a) State the assumptions you must make to proceed with an analysis of data of this form. (b) Test whether the mean weight of potatoes on the corn field equals to the mean weight of potatoes grown on the non-rotated potato field assuming (i) the variances are equal and (ii) assuming that the variances are not equal. (c) Check the assumption of equal variance. (d) Test whether the mean weight of potatoes on the corn field equals to the mean weight of potatoes grown on the non-rotated potato field plus 0.1. (e) Find a 95% C.I. for the difference in their mean weights.

email: [email protected] 2 Office: 248 MSC M2:30-3:30 R3:30-4: