statistical inference part viii
DESCRIPTION
STATISTICAL INFERENCE PART VIII. HYPOTHESIS TESTING - APPLICATIONS – TWO POPULATION TESTS. PARAMETERS: 1 ,. PARAMETERS: 2 ,. Sample size: n 2. Sample size: n 1. Statistics:. Statistics:. INFERENCE ABOUT THE DIFFERENCE BETWEEN TWO SAMPLES. INDEPENDENT SAMPLES. POPULATION 1. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/1.jpg)
STATISTICAL INFERENCEPART VIII
HYPOTHESIS TESTING - APPLICATIONS – TWO POPULATION
TESTS
1
![Page 2: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/2.jpg)
INFERENCE ABOUT THE DIFFERENCE BETWEEN TWO SAMPLES
• INDEPENDENT SAMPLESPOPULATION 1 POPULATION 2
PARAMETERS:1, 2
1 22
PARAMETERS:2,
Statistics: Statistics:
Sample size: n1Sample size: n2
21 1x , s 2
2 2x , s
2
![Page 3: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/3.jpg)
SAMPLING DISTRIBUTION OF 1 2X X
• Consider random samples of n1 and n2 from two normal populations. Then,
• For non-normal distributions, we can use Central Limit Theorem for n130 and n230.
2 21 2
1 2 1 21 2
X X ~ N( , )n n
3
![Page 4: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/4.jpg)
CONFIDENCE INTERVAL FOR 1- 21 AND 2 ARE KNOWN FOR NORMAL DISTRIBUTION OR LARGE SAMPLE
• A 100(1-C.I. for is given by:
• If and are unknown and unequal, we can replace them with s1 and s2.
2 21 2
1 2 /21 2
x x zn n
2 21 2
1 2 /21 2
s sx x z
n n
4
We are still using Z table because this is large sample or normal distribution situation.
![Page 5: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/5.jpg)
EXAMPLE
• Set up a 95% CI for 2 - 1.
• 95% CI for 2 - 1:
1 1 1
2 2 2
n 200,x 15530,s 5160
n 250,x 16910,s 5840
2 1x x 16910 15530 1380
2 1 2 1
2 22 1 2x x x x
1 2
s ss 269550 s 519
n n
/ 2 0.025z z 1.96
2 12 1 x xx x 1.96(s )
2 1363 2397 5
• Is there any significant difference between mean family incomes of two groups?
![Page 6: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/6.jpg)
INTERPRETATION
• With 95% confidence, mean family income
in the second group may exceed that in the
first group by between $363 and $2397.
6
![Page 7: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/7.jpg)
Test Statistic for 1- 2 when 1 and 2 are known
• Test statistic:
• If and are unknown and unequal, we can replace them with s1 and s2.
1 2 1 2
2 21 2
1 2
(x x ) ( )z=
n n
7
![Page 8: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/8.jpg)
EXAMPLE
• Two different procedures are used to produce battery packs for laptop computers. A major electronics firm tested the packs produced by each method to determine the number of hours they would last before final failure.
• The electronics firm wants to know if there is a difference in the mean time before failure of the two battery packs.=0.10
21 1 1
22 2 2
n 150,x 812hrs,s 85512
n 200,x 789hrs,s 74402
8
![Page 9: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/9.jpg)
SOLUTION• STEP 1: H0: 1 = 2 H0: 1 - 2 = 0
HA: 1 2 HA : 1 - 2 0
• STEP 2: Test statistic:
• STEP 3: Decision Rule = Reject H0 if z<-z/2=-1.645 or z>z/2=1.645.
• STEP 4: Not reject H0. There is not sufficient evidence to conclude that there is a difference in the mean life of the 2 types of battery packs.
1 2
2 21 2
1 2
(x x ) 0 (812 789) 0z 0.7493
85512 74402s s150 200n n
9
![Page 10: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/10.jpg)
1 AND 2 ARE UNKNOWN if 1 = 2
• A 100(1-C.I. for is given by:
where
1 2
21 2 /2,n n 2 p
1 2
1 1x x t s
n n
2 2
2 1 1 2 2p
1 2
(n 1)s (n 1)ss
n n 2
10
![Page 11: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/11.jpg)
Test Statistic for 1- 2 when 1 = 2 and unknown
• Test Statistic:
where
1 2 1 2
2p
1 2
(x x ) ( )t =
1 1s
n n
2 22 1 1 2 2p
1 2
(n 1)s (n 1)ss
n n 2
11
![Page 12: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/12.jpg)
EXAMPLE
• The statistics obtained from random sampling are given as
• It is thought that 1 < 2. Test the appropriate hypothesis assuming normality with = 0.01.
1 1 1
2 2 2
n 8,x 93,s 20
n 9,x 129,s 24
12
![Page 13: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/13.jpg)
SOLUTION
• n1< 30 and n2< 30 t-test
• Because s1 and s2 are not much different from each other, use equal-variance t-test (More formally, we can test Ho: σ²1=σ²2).
H0: 1 = 2
HA: 1 < 2 (1 - 2<0)
13
![Page 14: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/14.jpg)
• Decision Rule: Reject H0 if t < -t0.01,8+9-2=-2.602
• Conclusion: Since t = -19.13 < -t0.01,8+9-2=-2.602, reject H0 at = 0.01.
2 2 2 22 1 1 2 2p
1
1 2
p1
2
2
(n 1)s (n 1)s (7)20 (8)24
(x x ) 0 (93 129) 0t 19.13
1 1 1 1s ( 15)
n n 8 9
s 15n n 2 8 9 2
14
![Page 15: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/15.jpg)
Test Statistic for 1- 2 when 1 2 and unknown
• Test Statistic:
with the degree of freedom
1 2 1 2
2 21 2
1 2
(x x ) ( )t =
s s
n n
2 2 21 1 2 22 21 1 2 2
1 2
(s / n s / n )
s / n s / n
n 1 n 1
15
![Page 16: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/16.jpg)
EXAMPLE
• Does consuming high fiber cereals entail weight loss? 30 people were randomly selected and asked what they eat for breakfast and lunch. They were divided into those consuming and those not consuming high fiber cereals. The statistics are obtained as
n1=10; n2=201 2
1 2
595.8; x 661.1
35.7; s 115.7
x
s
16
![Page 17: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/17.jpg)
SOLUTION
• Because s1 and s2 are too different from each other and the population variances are not assumed equal, we can use a t statistic with degrees of freedom
22 2
2 22 2
35.7 /10 115.7 / 2025.01
35.7 /10 115.7 / 20
10 1 20 1
df
17
![Page 18: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/18.jpg)
H0: 1 - 2 = 0
HA: 1 - 2 < 0
• DECISION RULE: Reject H0 if t < -t,df = -t0.05, 25 = -1.708.
• CONCLUSION: Since t =-2.31< -t0.05, 25=-1.708, reject H0 at = 0.05.
1 2 1 2
2 2 2 21 2
1 2
(x x ) ( ) (598.8 661.1) 0t = 2.31
s s 35.7 115.7n n 30 30
18
![Page 19: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/19.jpg)
MINITAB OUTPUT• Two Sample T-Test and Confidence Interval
Twosample T for Consmers vs Non-cmrs N Mean StDev SE MeanConsmers 10 595.8 35.7 11Non-cmrs 20 661 116 26
• 95% C.I. for mu Consmers - mu Non-cmrs: ( -123, -7)T-Test mu Consmers = mu Non-cmrs (vs <):
T= -2.31 P=0.015 DF= 2519
![Page 20: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/20.jpg)
Inference about the Difference of Two Means:
Matched Pairs Experiment• Data are generated from matched pairs; not
independent samples.• Let Xi and Yi denote the measurements for the i-th
subject. Thus, (Xi, Yi) is a matched pair observations.• Denote Di = Yi-Xi or Xi-Yi.• If there are n subjects studied, we have
D1, D2,…, Dn. Then, n n
2 2i i 2
2 2 Di 1 i 1D D
D D nDs
D and s sn n 1 n
![Page 21: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/21.jpg)
CONFIDENCE INTERVAL FOR D= 1 - 2
• A 100(1-C.I. for D=is given by:
• For n 30, we can use z instead of t.
DD /2, n-1
sx t
n
![Page 22: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/22.jpg)
HYPOTHESIS TESTS FOR D= 1 - 2
• The test statistic for testing hypothesis about Dis given by
with degree of freedom n-1.
D D
D
xt =
s / n
![Page 23: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/23.jpg)
EXAMPLE• Sample data on attitudes before and after
viewing an informational film.Subject Before After Difference
1 41 46.9 5.92 60.3 64.5 4.23 23.9 33.3 9.44 36.2 36 -0.25 52.7 43.5 -9.26 22.5 56.8 34.37 67.5 60.7 -6.88 50.3 57.3 79 50.9 65.4 14.510 24.6 41.9 17.3
i Xi Yi Di=Yi-Xi
![Page 24: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/24.jpg)
• 90% CI for D= 1- 2:
• With 90% confidence, the mean attitude measurement after viewing the film exceeds the mean attitude measurement before viewing by between 0.36 and 14.92 units.
D Dx 7.64,s 12,57
DD / 2,n 1
s 12.57x t 7.64 1.833
n 10
t0.05, 9
D 1 20.36 14.92
![Page 25: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/25.jpg)
EXAMPLE
• How can we design an experiment to show which of two types of tires is better? Install one type of tire on one wheel and the other on the other (front) wheels. The average tire (lifetime) distance (in 1000’s of miles) is: with a sample difference s.d. of
• There are a total of n=20 observations
4.55DX 7.22Ds
![Page 26: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/26.jpg)
SOLUTION
H0: D=0
HA:D>0
• Test Statistics:D D
D
x 4.55 0t = 2.82
s / n 7.22 / 20
Reject H0 if t>t.05,19=1.729,Conclusion: Reject H0 at =0.05
![Page 27: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/27.jpg)
Inference About the Difference of Two Population Proportions
Population 1 Population 2
PARAMETERS:p1
PARAMETERS:p2
Statistics: Statistics:
Sample size: n1Sample size: n2
1p̂2p̂
Independent populations
![Page 28: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/28.jpg)
SAMPLING DISTRIBUTION OF
• A point estimator of p1-p2 is
• The sampling distribution of is
if nipi 5 and niqi 5, i=1,2.
1 2ˆ ˆp p
1 2ˆ ˆp p
1 1 2 21 2 1 2
1 2
p q p qˆ ˆp p ~ N(p p , )
n n
2
2
1
121 n
x
n
xp̂p̂
![Page 29: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/29.jpg)
STATISTICAL TESTS• Two-tailed testHo:p1=p2
HA:p1p2
Reject H0 if z < -z/2 or z > z/2. • One-tailed testsHo:p1=p2
HA:p1 > p2
Reject H0 if z > z
1 2 1 2
1 2
1 2
ˆ ˆ(p p ) 0 x xˆz where p=
n n1 1ˆ ˆpqn n
Ho:p1=p2
HA:p1 < p2
Reject H0 if z < -z
![Page 30: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/30.jpg)
EXAMPLE
• A manufacturer claims that compared with his closest competitor, fewer of his employees are union members. Of 318 of his employees, 117 are unionists. From a sample of 255 of the competitor’s labor force, 109 are union members. Perform a test at = 0.05.
![Page 31: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/31.jpg)
SOLUTIONH0: p1 = p2
HA: p1 < p2
and , so pooled
sample proportion is
Test Statistic:
11
1
x 117p̂
n 318 2
22
x 109p̂
n 255
1 2
1 2
x x 117 109p̂ 0.39
n n 318 255
(117 / 318 109 / 255) 0z 1.4518
1 1(0.39)(1 0.39)
318 255
![Page 32: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/32.jpg)
• Decision Rule: Reject H0 if z < -z0.05=-1.96.
• Conclusion: Because z = -1.4518 > -z0.05=-1.96, not reject H0 at =0.05. Manufacturer is wrong. There is no significant difference between the proportions of union members in these two companies.
![Page 33: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/33.jpg)
Example• In a study, doctors discovered that aspirin seems to help
prevent heart attacks. Half of 22,000 male participants took aspirin and the other half took a placebo. After 3 years, 104 of the aspirin and 189 of the placebo group had heart attacks. Test whether this result is significant.
• p1: proportion of all men who regularly take aspirin and suffer from heart attack.
• p2: proportion of all men who do not take aspirin and suffer from heart attack
1
2
104ˆ .009455
11000189
ˆ .01718 ;11000
104+189ˆ sample proportion: p= .01332
11000+11000
p
p
Pooled
![Page 34: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/34.jpg)
Test of Hypothesis for p1-p2
H0: p1-p2 = 0
HA: p1-p2 < 0• Test Statistic:
Conclusion: Reject H0 since p-value=P(z<-5.02) 0
1 2
1 2
ˆ ˆp pz=
1 1ˆ ˆpqn n
.009455 .01718 5.02
1 1(.01332)(.98668)
11,000 11,000
![Page 35: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/35.jpg)
Confidence Interval for p1-p2
A 100(1-C.I. for pp is given by:
1 1 2 21 2 / 2
1 2
ˆ ˆ ˆ ˆp q p qˆ ˆ(p p )
n n z
1 1 2 21 2 / 2
1 2
1 2
ˆ ˆ ˆ ˆp q p qˆ ˆ(p p ) .077 1.96*.00156
n n
.08 .074
z
p p
![Page 36: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/36.jpg)
Inference About Comparing Two Population Variances
Population 1 Population 2
PARAMETERS: PARAMETERS:
Statistics: Statistics:
Sample size: n1Sample size: n2
Independent populations
21
22
21s 2
2s
![Page 37: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/37.jpg)
SAMPLING DISTRIBUTION OF
• For independent r.s. from normal populations
• (1-α)100% CI for
22
21 /
)1n,1n(F~/s
/s212
222
21
21
])1n,1n,2/(F
1[
s
s]
)1n,1n,2/1(F
1[
s
s
2122
21
22
21
2122
21
22
21 /
![Page 38: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/38.jpg)
STATISTICAL TESTS• Two-tailed testHo: (or ) HA: Reject H0 if F < F/2,n1-1,n2-1 or F > F 1- /2,n1-1,n2-1. • One-tailed testsHo:HA: Reject H0 if F > F 1- , n1-1,n2-1
Ho:
HA: Reject H0 if F < F,n1-1,n2-1
22
21
22
21
122
21
22
21
s
sF
22
21
22
21
22
21
22
21
![Page 39: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/39.jpg)
Example
• A scientist would like to know whether group discussion tends to affect the closeness of judgments by property appraisers. Out of 16 appraisers, 6 randomly selected appraisers made decisions after a group discussion, and rest of them made their decisions without a group discussion. As a measure of closeness of judgments, scientist used variance.
• Hypothesis: Groups discussion will reduce the variability of appraisals.
39
![Page 40: STATISTICAL INFERENCE PART VIII](https://reader033.vdocuments.site/reader033/viewer/2022061600/56814585550346895db26470/html5/thumbnails/40.jpg)
Example, cont.Appraisal values (in thousand $) Statistics
With discussion 97, 101,102,95,98,103 n1=6 s1²=9.867
Without discussion 118, 109, 84, 85, 100, 121, 115, 93, 91, 112
n2=10 s2²=194.18
40
Ho: versus H1: 122
21
122
21
21.0)9,5,05.0(F05081.018.194
867.9
s
sF
22
21
Reject Ho. Group discussion reduces the variability in appraisals.