Anda di halaman 1dari 11

# Chapter Goals

## After completing this chapter, you should be

Engineering Statistics able to:
 Test hypotheses or form interval estimates for:
 two independent population means:
Chapter 8  Standard deviations known
 Standard deviations unknown
E ti ti and
Estimation d Hypothesis
H th i
g for Two Population
Testing p  two means from paired samples
Parameters  the difference between two population
proportions.
Chap 9-2
1 of 44 2 of 44

## Estimation for Two Populations Difference Between Two Means

Estimating
g two Population
p means,, Goal: Form a confidence
population values independent
samples
* interval for the difference
between two population
Population means, μ1 – μ2
Paired Population σ1 and σ2 known
means,
independent samples proportions
The p
point estimate for the
samples σ1 andd σ2 unknown,
k difference is
n1 and n2 ≥ 30
Examples:
Group 1 vs. Same group Proportion 1 vs.
x1 – x2
σ1 and σ2 unknown,
independent before vs. after Proportion 2
G
Group 2 t t
treatment t n1 or n2 < 30
3 of 44 4 of 44
Independent Samples σ1 and σ2 known
 Different data sources
Population
p means,, Population
p means,, Assumptions:
independent
samples
*  Unrelated
 Independent
independent
samples  Samples
p are randomlyy and
 Sample
S l selected
l t d ffrom
independently drawn
one population has no
σ1 and σ2 known effect on the sample
selected from the
σ1 and σ2 known *  population distributions are
other p
population
p normal or both sample sizes
σ1 andd σ2 unknown,
k σ1 andd σ2 unknown,
k are ≥ 30
 Use the difference between 2
n1 and n2 ≥ 30 sample means n1 and n2 ≥ 30
 Use z test or pooled variance  Population standard
σ1 and σ2 unknown, t test. σ1 and σ2 unknown, deviations are known.
n1 or n2 < 30 n1 or n2 < 30
5 of 44 6 of 44

## When σ1 and σ2 are known and

Population
p means,, Population
p means,,
b th populations
both l ti are normall or Th confidence
The fid iinterval
t l ffor
independent independent
both sample sizes are at least 30,
samples samples μ1 – μ2 is:
the test statistic is a zz-value…
value

## σ1 and σ2 known * …and

and the standard error of σ1 and σ2 known *
(x )
2 2
σ1 σ 2
x1 – x2 is: 1 − x 2 ± z α/2 +
σ1 andd σ2 unknown,
k σ1 andd σ2 unknown,
k n1 n2
n1 and n2 ≥ 30 2 2 n1 and n2 ≥ 30
σ1 σ 2
σ1 and σ2 unknown,
σ x1 − x 2 = + σ1 and σ2 unknown,
n1 or n2 < 30
n1 n2 n1 or n2 < 30
7 of 44 8 of 44
σ1 and σ2 unknown, large samples σ1 and σ2 unknown, large samples
(continued)

Population
p means,, Assumptions:
p Population
p means,,
independent  Samples are randomly and independent Forming interval
samples independently drawn samples estimates:

 both sample
p sizes  use sample standard
σ1 and σ2 known σ1 and σ2 known deviation s to estimate σ
are ≥ 30
σ1 andd σ2 unknown,
k
n1 and n2 ≥ 30
*  Population standard
deviations are unknown.
σ1 andd σ2 unknown,
k
n1 and n2 ≥ 30
*  the
th ttestt statistic
t ti ti is
i a z value.
l

## σ1 and σ2 unknown, σ1 and σ2 unknown,

n1 or n2 < 30 n1 or n2 < 30
9 of 44 10 of 44

## σ1 and σ2 unknown, large samples σ1 and σ2 unknown, small samples

(continued)

Population
p means,, Population
p means,, Assumptions:
independent Th confidence
The fid iinterval
t l ffor independent
samples μ1 – μ2 is: samples  populations are normally
di t ib t d
distributed

## σ1 and σ2 known σ1 and σ2 known  th

the populations
l ti h
have equall
( )
2 2
s s variances
x − x 2 ± z α/2 1
+ 2
σ1 andd σ2 unknown,
k
n1 and n2 ≥ 30
* 1
n1 n2 σ1 andd σ2 unknown,
k
n1 and n2 ≥ 30  samples are independent.

σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown,
n1 or n2 < 30
*
11 of 44 12 of 44
σ1 and σ2 unknown, small samples
(continued)
σ1 and σ2 unknown, small samples
(continued)

Population
p means,, Forming interval Population
p means,,
independent estimates: independent
samples samples
The pooled standard
 Th
The population
l ti variances
i deviation is:
are assumed equal, so use
σ1 and σ2 known the two sample standard σ1 and σ2 known
deviations and pool them to
sp =
(n1 − 1)s12 + (n2 − 1)s2 2
estimate σ
σ1 andd σ2 unknown,
k σ1 andd σ2 unknown,
k n1 + n2 − 2
n1 and n2 ≥ 30 n1 and n2 ≥ 30
 the test statistic is a t value
σ1 and σ2 unknown,
n1 or n2 < 30
* with (n1 + n2 – 2) degrees
of freedom.
freedom
σ1 and σ2 unknown,
n1 or n2 < 30
*
13 of 44 14 of 44

## σ1 and σ2 unknown, small samples Paired Samples

(continued)
Tests Means of 2 Related Populations
Population
p means,, The confidence interval for  Paired or matched samples
independent Paired
P i d
μ1 – μ2 is: samples  Repeated measures (before/after)
samples
 Use
U difference
diff b t
between paired
i d values:
l

σ1 and σ2 known (x 1 )
− x 2 ± t α/2 sp
1 1
+
n1 n2
d = x1 - x2
 Eliminates Variation Among Subjects
σ1 andd σ2 unknown,
k
n1 and n2 ≥ 30  Assumptions:
Where tα/2 has (n1 + n2 – 2) d.o.f., and:
 Both populations are normally distributed
σ1 and σ2 unknown,
n1 or n2 < 30
* sp =
(n1 − 1)s12 + (n2 − 1)s2 2
n1 + n2 − 2
 Or, if not normal, use large samples.

15 of 44 16 of 44
Paired Differences Paired Differences
((continued))
The ith paired difference is di , where:
Paired
P i d Paired
P i d The confidence interval for d is:
di = x1i - x2i
samples samples
n sd
The point estimate for
∑ di d ± t α/2
the population mean
paired difference is d :
d = i=1
i= n
n
n

∑(d − d)
n
The sample standard Where tα/2 has 2

d i ti iis:
deviation ∑ (d − d) i
2

## n - 1 d.o.f. and sd is:

i

sd = i=1 sd = i=1

n −1 n −1
n is the number of pairs in the paired sample. n is the number of pairs in the paired sample.
17 of 44 18 of 44

## Hypothesis Tests for the Difference Hypothesis Tests for

Between Two Means Two Population Means
T Population
Two P l ti Means,
M Independent
I d d t Samples
S l
 Testing Hypotheses about μ1 – μ2
Lower tail test: Upper tail test: Two-tailed test:
 Use the same situations discussed H0: μ1 ≥ μ2 H0: μ1 ≤ μ2 H0: μ1 = μ2
already: HA: μ1 < μ2 HA: μ1 > μ2 HA: μ1 ≠ μ2
 Standard deviations known or unknown i.e., i.e., i.e.,
H0: μ1 – μ2 ≥ 0 H0: μ1 – μ2 ≤ 0 H0: μ1 – μ2 = 0
 Sample sizes ≥ 30 or not ≥ 30. HA: μ1 – μ2 > 0 HA: μ1 – μ2 ≠ 0
HA: μ1 – μ2 < 0

19 of 44 20 of 44
Hypothesis tests for μ1 – μ2 σ1 and σ2 known
Population means, independent samples
Population
p means,,
independent Th ttestt statistic
The t ti ti for
f
σ1 and σ2 known Use a z test statistic samples μ1 – μ2 is:
Use s to estimate unknown
σ1 and σ2 unknown,
unknown
n1 and n2 ≥ 30
σ , approximate with a z
test statistic
σ1 and σ2 known * z=
(x 1 )
− x 2 − ( μ1 − μ2 )
2 2
σ1 andd σ2 unknown,
k σ1 σ 2
σ1 and σ2 unknown,
n1 or n2 < 30
Use s to estimate unknown
n1 and n2 ≥ 30 +
σ , use a t test statistic and n1 n2
pooled standard deviation
σ1 and σ2 unknown,
n1 or n2 < 30
21 of 44 22 of 44

## σ1 and σ2 unknown, large samples σ1 and σ2 unknown, small samples

The test statistic for
Population
p means,, Population
p means,,
independent Th ttestt statistic
The t ti ti for
f independent μ1 – μ2 is:
samples μ1 – μ2 is: samples
(x 1 )
− x 2 − ( μ1 − μ2 )
σ1 and σ2 known
z=
(x 1 )
− x 2 − ( μ1 − μ2 ) σ1 and σ2 known z=
sp
1 1
+
σ1 andd σ2 unknown,
k
n1 and n2 ≥ 30
* s1
2
s
+ 2
2
σ1 andd σ2 unknown,
k
n1 and n2 ≥ 30
n1 n2
n1 n2 Where tα/2 has (n1 + n2 – 2) d
d.o.f.,
o f and:
σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown,
n1 or n2 < 30
* sp =
(n1 − 1)s12 + (n2 − 1)s2 2
23 of 44
n1 + n2 − 2 24 of 44
Hypothesis tests for μ1 – μ2 Pooled sp t Test: Example
Two Population Means, Independent Samples You’re a financial analyst for a brokerage firm. Is there a
L
Lower ttailil ttest:
t U
Upper ttailil ttest:
t T
Two-tailed
t il d ttest:
t difference in dividend yield between stocks listed on the
NYSE & NASDAQ? You collect the following data:
H0: μ1 – μ2 ≥ 0 H0: μ1 – μ2 ≤ 0 H0: μ1 – μ2 = 0 NYSE NASDAQ
HA: μ1 – μ2 < 0 HA: μ1 – μ2 > 0 HA: μ1 – μ2 ≠ 0 Number 21 25
Sample mean 3 27
3.27 2
2.53
53
α α α/2 α/2 Sample std dev 1.30 1.16

## -zα zα -zα/2 zα/2 Assuming equal variances, is

there a difference in average
Reject H0 if z < -zα Reject H0 if z > zα Reject H0 if z < -zα/2 yield (α = 0.05)?
or z > zα/2

25 of 44 26 of 44

## Calculating the Test Statistic Solution

Reject H0 Reject H0
The test statistic is: H0: μ1 - μ2 = 0 i.e. (μ1 = μ2)

z=
(x 1 )
− x 2 − (μ1 − μ2 ) (3.27 − 2.53 ) − 0
= = 2.040
HA: μ1 - μ2 ≠ 0 ii.e. ((μ1 ≠ μ2)
α = 0.05 .025 .025

## 1 1 1 1 dof = 21 + 25 - 2 = 44 -2.0154 0 2.0154 t

sp + 1.2256 + Critical Values: t = ± 2.0154
n1 n2 21 25 2 040
2.040

## Test Statistic: Decision:

3.27 − 2.53 Reject H0 at α = 0.05
z= = 2.040
sp =
(n1 − 1)s12 + (n2 − 1)s2 2 =
(21 − 1)1.30 2 + (25 − 1)1.16 2 = 1.2256
1 2256 1 1
n1 + n2 − 2 21 + 25 − 2 1.2256 + Conclusion:
C l i
21 25 There is evidence of a
difference in means.
27 of 44 28 of 44
Hypothesis Testing for Paired Samples Hypothesis Testing for Paired Samples
((continued))
Paired Samples
The test statistic for d is:
Paired
P i d Lower tail test: Upper tail test: Two-tailed test:
samples
d − μd H0: μd ≥ 0 H0: μd ≤ 0 H0: μd = 0
t= HA: μd < 0 HA: μd > 0 HA: μd ≠ 0
sd
n α α α/2 α/2
n is the
number n
of pairs
in the
Wh
Where tα/2 has
h n-1 d
d.o.f.
f ∑(d − d)
i
2 -tα
Reject H0 if t < -tα

Reject H0 if t > tα
-tα/2 tα/2
Reject H0 if t < -tα/2
paired and sd is: sd = i=1
or t > tα/2
sample n −1 Wh
Where t has
h n-1 d
d.o.ff. /2

29 of 44 30 of 44

## Paired Samples Example Paired Samples: Solution

 Assume you send your salespeople to a “customer  Has the training made a difference in the number of
g workshop.
service” training p Is the training
g effective? complaints (at the 0.01
0 01 level)?
You collect the following data: Reject Reject
H0: μd = 0
Number of Complaints: (2) - (1) Σ di HA: μd ≠ 0
α/2 α/2
Salesperson Before (1) After (2) Difference, di d = n
α = .01
01 d = - 4.2
42 - 4.604
4 604 4
4.604
604
C.B. 6 4 - 2 = -4.2 - 1.66
T.F. 20 6 -14 Critical Value = ± 4.604
M.H. 3 2 - 1 d.o.f. = n - 1 = 4 Decision: Do not reject H0
(t stat is not in the reject region)
R.K.
MO
M.O.
0
4
0
0
0
- 4 sd =
∑ ((d − d)
i
2
Test Statistic:
n −1 Conclusion: There is not a
-21 d − μd − 4.2 − 0
= 5.67 t= = = −1.66 g
significant change
g in the
sd/ n 5.67/ 5 number of complaints.
31 of 44 32 of 44
Two Population Proportions Confidence Interval for
Two Population Proportions
Goal: Form a confidence interval for
Population
P l ti or test
t t a hypothesis
b t the
th Population
P l ti The confidence
Th fid iintervall ffor
proportions difference between two population proportions
p1 – p2 is:
proportions, p1 – p2
Assumptions:
n1p1 ≥ 5 , n1(1-p1) ≥ 5
n2p2 ≥ 5 , n2(1-p2) ≥ 5 (p )
1 − p 2 ± z α/2
p1(1 − p1 ) p 2 (1 − p 2 )
n1
+
n2
The point estimate for
the difference is: p1 – p2
33 of 44 34 of 44

## Hypothesis Tests for Two Population Proportions

Two Population Proportions
Since we begin by assuming the null
hypothesis
yp is true,, we assume p1 = p2
Population proportions Population
P l ti
and pool the two p estimates.
proportions
Lower tail test: Upper tail test: Two-tailed test: The pooled estimate for the
overall proportion is:
H0: p1 ≥ p2 H0: p1 ≤ p2 H0: p1 = p2
HA: p1 < p2 HA: p1 > p2 HA: p1 ≠ p2 n1p1 + n2 p 2 x1 + x 2
i.e., i.e.,
p= =
i.e.,
n1 + n2 n1 + n2
H0: p1 – p2 ≥ 0 H0: p1 – p2 ≤ 0 H0: p1 – p2 = 0
HA: p1 – p2 < 0 HA: p1 – p2 > 0 HA: p1 – p2 ≠ 0 where x1 and x2 are the numbers from
samples 1 and 2 with the characteristic of interest
35 of 44 36 of 44
Two Population Proportions Hypothesis
H th i T Tests
t for
f
((continued)) Two Population
p Proportions
p
Population proportions
Population
P l ti The test statistic for
proportions Lower tail test: Upper tail test: Two-tailed test:
p1 – p2 is:
H0: p1 – p2 ≥ 0 H0: p1 – p2 ≤ 0 H0: p1 – p2 = 0
HA: p1 – p2 < 0 HA: p1 – p2 > 0 HA: p1 – p2 ≠ 0

z=
(p 1 )
− p 2 − ( p1 − p 2 )
α α α/2 α/2
⎛1 1⎞
p (1 − p) ⎜⎜ + ⎟⎟
⎝ n1 n2 ⎠ -zα zα -zα/2 zα/2
Reject
j H0 if z < -zα Reject
j H0 if z > zα Reject
j H0 if z < -zα/2
or z > zα/2
37 of 44 38 of 44

Example: Example:
Two population Proportions Two population Proportions ((continued))

## Is there a significant difference between the  The hypothesis test is:

proportion
ti off men and d the
th proportion
ti off H0: p1 – p2 = 0 (th
(the ttwo proportions
ti are equal)l)
women who will vote “Yes” on Proposition A? HA: p1 – p2 ≠ 0 (there is a significant difference between proportions)

##  The sample proportions are:

 In a random sample, 36 of 72 men and 31 of  Men: p1 = 36/72 = .50
50 women indicated theyy would vote “Yes”  Women: p2 = 31/50 = .62

##  The pooled estimate for the overall proportion is:

 Test at the .05
05 level of significance.
significance x1 + x 2 36 + 31 67
p= = = = .549
n1 + n2 72 + 50 122
39 of 44 40 of 44
Example:
Two population Proportions Two Sample Tests in EXCEL
((continued))
Reject H0 Reject H0
For independent samples:
The test statistic for p1 – p2 is:
 Independent sample Z test with variances known:
(p )
.025 .025
− p 2 − ( p1 − p 2 )
z= 1
 Tools | data analysis | z-test: two sample for means
⎛1 1⎞
p (1 − p) ⎜⎜ + ⎟⎟ -1.96 1.96  Independent sample Z test with large sample
⎝ n1 n 2 ⎠ -1.31  Tools | data analysis | z-test:
z test: two sample for means

=
( .50 − .62 ) − ( 0 ) = − 1.31  If the population variances are unknown, use sample variances.
⎛ 1 1 ⎞ Decision: Do not reject
j H0
.549 (1 − .549) ⎜ + ⎟
⎝ 72 50 ⎠ Conclusion: There is not For paired samples (t test):
significant
i ifi t evidence
id off a – Tools | data analysis… | t-test: paired two sample for means.
Critical Values = ±1.96
For α = .05 difference in proportions
who will vote “yes” between
men and women. 41 of 44 42 of 44

Chapter Summary
 Compared two independent samples
 Formed confidence intervals for the differences between two
means
 Performed Z test for the differences in two means
 Performed t test for the differences in two means
Thank You
 Compared two related samples (paired samples)
 Formed confidence intervals for the paired difference
 Performed paired sample t tests for the mean difference
 Compared two population proportions
 Formed confidence intervals for the difference between two
population proportions
 Performed Z-test for two p
population
p p
proportions.
p

43 of 44 44 of 44