Вы находитесь на странице: 1из 100

Chapter 8

Inferences Based on a Two Samples:


Tests of Hypotheses
Content

1. Identifying the Target Parameter


2. Comparing Two Population Means: Independent
Sampling
3. Comparing Two Population Means: Paired
Difference Experiments
4. Comparing Two Population Proportions:
Independent Sampling
5. Determining the Sample Size
6. Comparing Two Population Variances:
Independent Sampling
Comparing Two Populations…

Previously we looked at techniques to estimate and test


parameters for one population:
Population Mean , Population Variance
We will still consider these parameters when we are
looking at two populations, however our interest will
now be:
 The difference between two means.
 The ratio of two variances.
Identifying the Target Parameter
How Would You Try to Answer These Questions?

Who gets higher Which program is


grades: males or faster to learn: Word
females? or Excel?
Comparison of Two Populations

The difference in mean sales prices between city and


suburban homes
Whether two major brands of food freezers differ in the
average amount of electricity they use
The difference in the proportion of younger and older
viewers who regularly watch a popular TV program
Determining the Target Parameter

Parameter Key Words or Phrases Type of Data


Mean difference; Quantitative
1 – 2 differences in averages
Differences between Qualitative
proportions, percentages,
p 1 – p2 fractions, or rates; compare
proportions

(s 1 )2 Ratio of variances; Quantitative


differences in variability or
(s 2 ) 2
spread; compare variation
A Classification of Hypothesis Testing
Procedures for Examining Differences

Hypothesis Tests

Parametric Tests
(Metric Tests)

One Sample Two or More


Samples
• z test
• t test
• Chi-square
test

Independent Paired
Samples Samples
* Two-Group t test * Paired t test
* z test
Comparing Two Population Means:
Independent Sampling
Difference of Two Means…

In order to test and estimate the difference between


two population means, we draw random samples
from each of two populations. Initially, we will
consider independent samples, that is, samples that
are completely unrelated to one another.

Because we are compare two population means, we


use the statistic:
Sampling Distribution

Population 1 2 Population
1 2
1 2

Select simple random Compute X1 – X2 Select simple random


sample, n1. Compute for every pair of sample, n2. Compute
X1 samples X2

X1 – X2 values Sampling
Distribution

1 - 2
Properties of the Sampling Distribution

s 12 s 22
s ( x -x ) = +
1 2
n1 n2
Large-Sample Confidence Interval for (μ1 – μ2)
Example 1: Comparing Mean Prices of Japanese
and U.S. Cars
An economist decided to test the hypothesis that higher retail
prices are being charged for Japanese automobiles in Japan
than in the United States. She obtained independent random
samples of 50 retail sales in the United States and 50 retail
sales in japan over the same time period and for the same
model of automobile and converted the Japanese sales prices
from yen to dollars using conversion rates. The data, saved in
the AUTOSTUDY file. Form a 95% confidence interval for the
difference between the population mean retail prices of this
automobile model for the two countries. Interpret the result.

AUTOSTUDY file
AUTOSTUDY data

USA 18200 16200 17200 18700 18400 16600 14900 16800 12100 10800 18500 15500 16200

15600 17100 18100 18900 19000 17300 18800 14900 16700 20300 17100 14600 17200

16300 18200 19500 13200 16800 12900 17200 18200 16300 16800 16400 18600

13000 18400 16900 13300 16300 15900 16600 17600 16000 17100 14600 18000

JAPAN 18500 14000 18200 21100 13900 18700 14900 16400 16300 18000 16800 19800 17300

14800 18200 16700 20200 16200 20400 17900 15500 15400 17700 17100 17900 17400

16600 14900 16300 16500 15400 17600 20100 16400 18000 17500 18400 19800

18200 16200 18500 16900 17600 14400 21600 18600 16200 14300 12500 20000
Example 1: Comparing Mean Prices of Japanese
and U.S. Cars
Large-Sample Test of Hypothesis about (µ1 – µ2)

H0: (µ1 – µ2) = D0


( x1 - x2 ) - D0 s 12 s 22
Test Statistic: z = where s ( x1 - x2 ) = n1
+
n2
s (x -x )
1 2

s12 s22
Alternative Rejection
» +
n1 n2
Hypothesis Region

Ha: (µ1 – µ2) > D0 z  z


Ha: (µ1 – µ2) < D0 z   z
Ha: (µ1 – µ2) ≠ D0 z  z / 2 or z   z / 2
where z is chosen so that P(z > z) = 
Hypotheses for Means of Two Independent Populations

Research Questions
No Difference Pop 1  Pop 2 Pop 1  Pop 2
Hypothesis Any Difference Pop 1 < Pop 2 Pop 1 > Pop 2

H0 m1 - m2 = 0 m1 - m2 ³ 0 m1 - m2 £ 0
Ha m1 - m2 ¹ 0 m1 - m2 < 0 m1 - m2 > 0
Conditions Required for Valid Large Sample
Inferences about (μ1 – μ2)
Example : Comparing Mean Prices of Japanese and
U.S. Cars with a Large-Sample
Refer to the study of retail prices of an automobile sold in
the United States and Japan, Example 1. Another way to
compare the mean retail prices for the two countries is to
conduct a test of hypothesis. Conduct the test using
α=0.05.

AUTOSTUDY file
Example : Comparing Mean Prices of Japanese and
U.S. Cars
Example 2: Comparing Mean Prices of Japanese
and U.S. Cars

Reject H0

.05

-1.645 0 t

z statistics=-1.62
Example 2: Comparing Mean Prices of Japanese
and U.S. Cars
P-value of z statistics is=0.0526

-1.62 0 t
Example : Comparing Mean Prices of Japanese and
U.S. Cars

Excel Output
z-Test: Two Sample for Means

Variable 1 Variable 2
Mean 16596 17236

Known Variance 3924361 3896676


Observations 50 50

Hypothesized Mean Difference 0

z -1.618202269

P(Z<=z) one-tail 0.052809507

z Critical one-tail 1.644853627

P(Z<=z) two-tail 0.105619014

z Critical two-tail 1.959963985


Large-Sample Test Example

You’re a financial analyst for Charles Schwab.


You want to find out if there is a difference in
dividend yield between stocks listed on NYSE
and NASDAQ. You collect the following data:
NYSE NASDAQ
Number 121 125
Mean 3.27 2.53
Std Dev 1.30 1.16
Is there a difference in average
yield ( = .05)?
Large-Sample Test Solution

H0: 1 - 2 = 0 (1 = 2)


Test Statistic:
Ha: 1 - 2  0 (1  2)
  .05
n1= 121 , n2 = 125
Critical Value(s):
Decision:
Reject H0 Reject H0
Reject at  = .05
.025 .025
Conclusion:
There is evidence of a
-1.96 0 1.96 z difference in means
Large-Sample Test Example

You’re an economist for the Department of


Education. You want to find out if there is a
difference in spending per pupil between urban
and rural high schools. You collect the
following:
Urban Rural
Number 35 35
Mean $ 6,012 $ 5,832
Std Dev $ 602 $ 497
Is there any difference in population
means ( = .10)?
Large-Sample Test Solution

H0: 1 - 2 = 0 (1 = 2)


Test Statistic:
Ha: 1 - 2  0 (1  2) (6012  5832)  0
  .10 z  1.36
6022 497 2
n1 =35 , n2 = 35 
35 35
Critical Value(s):
Decision:
Reject H 0 Reject H0
Do not reject at  = .10
.05 .05
Conclusion:
There is no evidence of a
-1.645 0 1.645 z difference in means
What if the sample sizes are small?
Conditions Required for Valid Small-Sample
Inferences about (μ1 – μ2)
Small-Sample Confidence Interval
for (μ1– μ2) (Independent Samples)

æ 1 1ö
(x 1 )
- x 2 ± ta 2
s ×ç + ÷
2
p
è n1 n 2 ø

sp =
2 ( n1 - 1) × s1
2
+ ( n2 - 1) × s 2
2

n1 + n2 - 2

and ta/2 is based on (n1 + n2 – 2) degrees of freedom.


Small-Sample Test of Hypothesis about (µ1 – µ2)

H0: (µ1 – µ2) = D0


t=
( x1 - x2 ) - D0where ( n - 1) × s 2 + ( n - 1) × s 2
Test
Statistic: æ 1 1 ö s 2
= 1 1 2 2
s 2p ç + ÷ p
n1 + n2 - 2
è n1 n2 ø
Alternative Rejection
Hypothesis Region

Ha: (µ1 – µ2) > D0 t > t

Ha: (µ1 – µ2) < D0 t < t


Ha: (µ1 – µ2) ≠ D0 t > t2 or t < t2
where t and t2 are based on (n1 + n2 – 2) degrees of freedom
Small-Sample Test Example

You’re a financial analyst for Charles Schwab. Is


there a difference in dividend yield between
stocks listed on the NYSE and NASDAQ? You
collect the following data:
NYSE NASDAQ
Number 11 15
Mean 3.27 2.53
Std Dev 1.30 1.16
Assuming normal populations,
and equal population variances,
is there a difference in average
yield ( = .05)?
Small-Sample Test Solution

H0: 1 – 2 = 0 (1 = 2)


Ha: 1 – 2  0 (1  2)
  . 05
df  11 + 15 – 2 = 24
Critical Value(s):
Reject H 0 Reject H 0

.025 .025

-2.064 0 2.064 t
Small-Sample Test Solution

s 2p 
1  1  2  2
n  1 s 2
 n  1 s 2

n1  n2  2
11  11.30   15  11.16 
2 2

  1.489
11  15  2

t
 x1  x2    1  2   3.27  2.53   0 
  1.53
1 1 1 1
s   
2
1.489   
p
 n1 n2   11 15 
Small-Sample Test Solution

H0:1 – 2 = 0 (1 = 2) Test Statistic:


Ha:1 – 2  0 (1  2)
t   1 .5 3
 .05
df 11 + 15 – 2 = 24
Critical Value(s):
Decision:
Reject H 0 Reject H 0 Do not reject at  = .05
.025 .025 Conclusion:
There is no evidence of a
-2.064 0 2.064 t difference in means
Small-Sample Test

You’re a research analyst for General Motors.


Assuming equal variances, is there a difference in
the average miles per gallon (mpg) of two car
models ( = .05)?
You collect the following:
Sedan Van
Number 15 11
Mean 22.00 20.27
Std Dev 4.77 3.64
Small-Sample Test Solution*

H0:1 – 2 = 0 (1 = 2)


Ha:1 – 2  0 (1  2)
 .05
df 15 + 11 – 2 = 24
Critical Value(s):
Reject H 0 Reject H 0

.025 .025

-2.064 0 2.064 t
Small-Sample Test
Solution*

s 
2 1 1 2 2
n  1 s 2
 n  1 s 2

n1  n2  2
p

15  1 4.77   11  1 3.64 


2 2

  18.793
15  11  2

t
 x1  x2    1  2   22.00  20.27    0 
  1.00
1 1  1 1
s   
2
18.793    
p
 n1 n2   15 11 
Small-Sample Test
Solution*

H0:1 – 2 = 0 (1 = 2) Test Statistic:


Ha:1 – 2  0 (1  2)
 .05 t   1 .0 0
df 15 + 11 – 2 = 24
Critical Value(s):
Decision:
Reject H 0 Reject H 0 Do not reject at  = .05
.025 .025 Conclusion:
There is no evidence of a
-2.064 0 2.064 t difference in means
Example : Comparing Manager Performance with a
Small-Sample Confidence Interval for (μ1 – μ2)
Behavioral researchers have developed an index to
measure managerial success: the higher the index the
more successful the manager. Suppose a researcher
wants to compare the average success index for two
groups of managers at a large manufacturing plant.
Managers in group 1 engage in high volume of interactions
with people outside the manager’s work unit. Managers
in group 2 rarely interact with people outside their work
unit. Independent random samples of 12 and 15
managers are selected from groups 1 and 2, respectively,
and the success index of each is recorded. Using the data
conduct a test with alpha 0.05 to estimate the true mean
difference between the success indices of managers in the
two groups.
MANSUCCESS file
Example : Comparing Manager Performance
Example : Comparing Manager Performance
Reject H0 Reject H0

.025 .025

-2.06 0 2.06 t
t statistics=4.97
Example : Comparing Manager Performance
P-value of t statistics is=0.00004

.00002 .00002

-4.97 0 4.97 t
Example : Comparing Manager Performance

Excel Output
t-Test: Two-Sample Assuming Equal Variances

GROUP1 GROUP2
Mean 65.33333333 49.46666667
Variance 43.6969697 87.12380952
Observations 12 15
Pooled Variance 68.016
Hypothesized Mean Difference 0
df 25
t Stat 4.96746167
P(T<=t) one-tail 2.02726E-05
t Critical one-tail 1.708140761
P(T<=t) two-tail 4.05453E-05
t Critical two-tail 2.059538553
1. Equal sample sizes (n1 = n2 = n)

Confidence interval: ( x1 - x2 ) ± ta 2 ( s 2
1 +s
2
2 ) n

H0: ( m1 - m2 ) = 0

Test statistic t = ( x1 - x2 ) ( )
s12 + s22 n

where t is based on v = n1 + n2 – 2 = 2(n – 1)


degrees of freedom.
2. Unequal sample sizes (n1 ≠ n2)

Confidence interval: ( x1 - x2 ) ± ta 2 ( s 2
1 ) (
n1 + s n2
2
2 )
Test statistic H0:

( m1 - m2 ) = 0
t = ( x1 - x2 ) ( ) (
s12 n1 + s22 n2 )
where t is based on …
v=
(s 2
1 n1 + s n2
2
2 ) 2

(s
2
1 n1 ) + (s
2 2
2 n2 ) 2

n1 - 1 n2 - 1

Note: The value of v will generally not be an integer.


Round v down to the nearest integer to use the t-
table.
What Should You Do if the Assumptions Are Not
Satisfied?
When the assumptions are clearly not satisfied, you
can select larger samples from the populations or
you can use other available statistical tests
(nonparametric statistical test).
Comparing Two Population Means:
Paired Difference Experiments

Samples are not independent!


Daily Sales for Two Restaurants

Suppose you want to compare the mean daily sales of two restaurants located in
the same city. If you were to record the restaurants’ total sales for each of 12
randomly selected days during a 6-month period, the results appear as shown
below. Do these data provide evidence of a difference between the mean daily
sales of the two restaurants?

Day Restaurant 1 (x1) Restaurant 2 (x2)


1 (Wednesday) $1,005 $918
2 (Saturday) 2,073 1,971
3 (Tuesday) 873 825
4 (Wednesday) 1,074 999
5 (Friday) 1,932 1,827
6 (Thursday) 1,338 1,281
7 (Thursday) 1,449 1,302
8 (Monday) 759 678
9 (Friday) 1,905 1,782
10 (Monday) 693 639
11 (Saturday) 2,106 2,049
12 (Tuesday) 981 933
Daily Sales for Two Restaurants

Independent samples t-test is not a valid procedure to use


with this set of data because the assumption of independent
samples is invalid:
• We have randomly chosen days ; thus, once we have
chosen the sample of days for restaurant 1, we have not
independently chosen the sample of days for restaurant 2.
• Also, there is a large variation within samples (as reflected
by the large value of sp2 (273,635.7)) in comparison with
the relatively small difference between the sample means.

H 0 : (m1 - m2 ) = 0
H a : (m1 - m2 ) ¹ 0
Paired-Difference Experiment

This kind of experiment in which observations are paired


and the differences are analyzed is called a paired
difference experiment.
In many cases, a paired difference experiment can provide
more information about the difference population means
than an independent samples experiment. The idea is to
compare population means by comparing the differences
between pairs of experimental units.
The differencing removes sources of variation that tend to
inflate σ2.
Paired-Difference Experiment
Data Collection Table

Observation Group 1 Group 2 Difference


1 x11 x21 d1 = x11 – x21
2 x12 x22 d2 = x12 – x22
   
i x1i x2i di = x1i – x2i
   
n x1n x2n dn = x1n – x2n
Example : Daily Sales for Two Restaurants
(A Valid Method of Analyzing the Data)
Day Restaurant 1 (x1) Restaurant 2 (x2) Difference d=x1-x2
1 (Wednesday) $1,005 $918 $87
2 (Saturday) 2,073 1,971 102
3 (Tuesday) 873 825 48
4 (Wednesday) 1,074 999 75
5 (Friday) 1,932 1,827 105
6 (Thursday) 1,338 1,281 57
7 (Thursday) 1,449 1,302 147
8 (Monday) 759 678 81
9 (Friday) 1,905 1,782 123
10 (Monday) 693 639 54
11 (Saturday) 2,106 2,049 57
12 (Tuesday) 981 933 48
Paired-Difference Confidence Interval

Confidence interval:
Large-SampleTest of Hypothesis about Paired(µ1 – µ2)

H0: µd = D0
d - D0 d - D0
Test Statistic: z= »
s d nd sd nd

Alternative Rejection
Hypothesis Region

Ha: µd > D0 z  z
Ha: µd < D0 z   z
Ha: µd ≠ D0 z  z / 2 or z   z / 2
where z is chosen so that P(z > z) = 
Small-Sample Test of Hypothesis about (µ1 – µ2)

H0: µd = D0

Test d - D0
t=
Statistic: sd nd

Alternative Rejection
Hypothesis Region

Ha: µd > D0 t > t

Ha: µd < D0 t < t


Ha: µd ≠ D0 t > t2 or t < t2
where t and t2 are based on (nd -1) degrees of freedom
Daily Sales for Two Restaurants
(A Valid Method of Analyzing the Data)
H 0 : md = 0
H a : md ¹ 0

d - D0 82
Test statistic: t= = = 8.88
sd nd 32 / 12

t0.025 = 2.201, df = nd -1=11

Because t falls in the rejection region, we conclude that (at


α=0.05) the difference in population mean daily sales for the
two restaurants differs from 0.
Excel Output for Restaurant Sales
t-Test: Paired Two Sample for
Means

SALES1 SALES2
Mean 1349 1267
Variance 280978.9091 266294.1818
Observations 12 12
Pearson Correlation 0.998489747
Hypothesized Mean Difference 0
df 11
t Stat 8.879914328
P(T<=t) one-tail 1.19506E-06
t Critical one-tail 1.795884819
P(T<=t) two-tail 2.39011E-06
t Critical two-tail 2.20098516
Conditions Required for Valid Large-Sample
Inferences about µd
1. A random sample of differences is selected from the target
population of differences.
2. The sample size nd is large (i.e., nd ≥ 30); due to the
Central Limit Theorem, this condition guarantees that the
test statistic will be approximately normal regardless of the
shape of the underlying probability distribution of the
population.
Conditions Required for Valid Small-Sample
Inferences about µd
1. A random sample of differences is selected from the target
population of differences.
2. The population of differences has a distribution that is
approximately normal.
Paired-Difference Experiment Confidence
Interval Example

You work in Human Resources. You want to see if there


is a difference in test scores after a training program.
You collect the following test score data:
Name Before (1) After (2)
Sam 85 94
Tamika 94 87
Brian 78 79
Mike 87 88
Find a 90% confidence interval for the
mean difference in test scores.
Computation Table

Observation Before After Difference


Sam 85 94 –9
Tamika 94 87 7
Brian 78 79 –1
Mike 87 88 –1
Total –4

d = -4/4= –1 sd = 6.53
Paired-Difference Experiment Confidence
Interval Solution

df = nd – 1 = 4 – 1 = 3 t.05 = 2.353

Sd
d  t 2
nd
6.53
1  2.353
4
8.68  d  6.68
Example 8: Paired-Difference Experiment Small-
Sample Test
You work in Human Resources. You want to see if a training
program is effective. You collect the following test score
data:
Name Before After
Sam 85 94
Tamika 94 87
Brian 78 79
Mike 87 88
At the .10 level of significance, was the
training effective?
Null Hypothesis Solution

1. Was the training effective?


2. Effective means ‘Before’ < ‘After’.
3. Statistically, this means B < A.
4. Rearranging terms gives B – A < 0.
5. Defining d = B – A and substituting into the
equation gives d  .
6. The alternative hypothesis is Ha: d  0.
Computation Table

Observation Before After Difference


Sam 85 94 –9
Tamika 94 87 7
Brian 78 79 –1
Mike 87 88 –1
Total –4

d = –1 sd = 6.53
Paired-Difference Experiment Small-Sample Test
Solution

H0: d = 0 (d = B – A)


Ha: d < 0
Test Statistic:
 = .10
d - D0 -1 - 0
df = 4 – 1 = 3 t= = = -.306
Sd 6.53
Critical Value(s):
nd 4
Decision:
Reject H0 Do not reject at  = .10
.10 Conclusion:
There is no evidence
-1.638 0 t training was effective
Paired-Difference Experiment
Small-Sample Test Thinking
Challenge
You’re a marketing (1) (2)
research analyst. You Store Client
want to compare a client’s Competitor
calculator to a 1 $ 10 $ 11
competitor’s. You sample 2 8 11
3 7 10
8 retail stores. At the .01 4 9 12
level of significance, does 5 11 11
your client’s calculator sell 6 10 13
for less than their 7 9 12
competitor’s? 8 8 10
Paired-Difference Experiment Small-
Sample Test Solution*
H0:d = 0 (d = 1 – 2)
Test Statistic:
Ha:d < 0
d  d0 2.25  0
= .01 t   5.486
sd 1.16
df =
8–1=7
nd 8
Critical Value(s):
Decision:
Reject H0 Reject at  = .01
.01 Conclusion:
There is evidence client’s
-2.998 0 t brand (1) sells for less
Comparing Two
Population Proportions:
Independent Sampling
Inferences about the Differences between Two
Population Proportions
Letting p1 denote the proportion for population 1
and p2 denote the proportion for population 2,
consider inferences about the difference
between the two population pro- portions: p1 -
p2.
To make an inference about this difference,
select two independent random samples
consisting of n1 units from population 1 and n2
units from population 2.
Inferences about the Differences between Two
Population Proportions
A tax preparation firm is interested in comparing
the quality of work at two of its regional offices.
The Bureau of Transportation tracks the on-time
and delayed performance at major airports. A
flight is considered delayed if it is more than 15
minutes behind schedule. Comparing delayed
departures at Chicago O’Hare and İstanbul
Atatürk airports.
How well people like life in Russia. Compare the
responses by age group.
Properties of the Sampling Distribution of (p1 – p2)

1. The mean of the sampling distribution of ( p̂1 - p̂2 )


is (p1 – p2); that is,
E ( p̂1 - p̂2 ) = p1 - p2
2. The standard deviation of the sampling
distribution of ( p̂1 - p̂2 ) is
p1q1 p2 q2
s ( p̂ - p̂ ) = +
1 2
n1 n2
3. If the sample sizes n1 and n2 are large, the
sampling distribution of ( p̂1 - p̂2 ) is
approximately normal.
Large-Sample (1 – )% Confidence Interval for
(p1 – p2)

p1q1 p2 q2
( p̂1 - p̂2 ) ± za 2s ( p̂ - p̂ ) = ( p̂1 - p̂2 ) ± za 2
1 2
n1
+
n2
p̂1q̂1 p̂2 q̂2
» ( p̂1 - p̂2 ) ± za 2 +
n1 n2
Conditions Required for Valid Large-Sample
Inferences about (p1 – p2)

1. The two samples are randomly selected in an


independent manner from the two target
populations.
2. The sample sizes, n1 and n2, are both large so
that the sampling distribution of p̂1 - p̂2 will
be approximately normal. (This condition will be
satisfied if both n1 p̂1 ³ 15, n1q̂1 ³ 15, n2 p̂2 ³ 15,
and n2 q̂2 ³ 15.)
Large-SampleTest of Hypothesis about (p1 – p2)

H0: (p1 – p2) = 0

z=
( p̂1 - p̂2 )
Test Statistic:
s ( p̂ - p̂ )
1 2

p1q1 p2 q2 æ1 1ö x1 + x2
s ( p̂ - p̂ ) = + » p̂q̂ ç + ÷ , p̂ = .
1 2
n1 n2 è n1 n2 ø n1 + n2
Alternative Hypothesis Rejection Region

Ha: (p1 – p2) > 0 z  z


Ha: (p1 – p2) > 0 z   z
Ha: (p1 – p2) ≠ 0 z  z / 2 or z   z / 2
Example 1- Comparing Repair Rates of Two
Car Models
A consumer advocacy group wants to determine whether
there is a difference between the proportions of the two
leading automobile models that need major repairs (more
than $500) within two years of their purchase. A sample of
400 two-year owners of model 1 is contacted, and a sample
of 500 two-year owners of model 2 is contacted. The
numbers x1 and x2 of owners who report that their cars
needed major repairs within the first two years are 53 and 78,
respectively. Test the null hypothesis that no difference exists
between the proportions in populations 1 and 2 needing major
repairs against the alternative that a difference does exist.
Use α=0.10.
n1 400 H0 p1-p2=0

n2 500 Ha p1-p2≠0
x1 53

x2 78 Test stat (z) -0.99336

p1_hat 0.1325 Alpha 0.1

p2_hat 0.156 (Neg)z_Alpa/2 -1.64485

(Pos)z_Alpha/2 1.644854

p_hat 0.145556 Conc H0

Sigma 0.023657 p-value 0.320536


Example 2- Compare the Unemployment Rate
across Two Cities

You’re an economist for the


Ministry of Labor. You’re studying
unemployment rates. In Rize, 74
of 1500 people surveyed were
unemployed. In Izmir, 129 of
1500 were unemployed. At
the .05 level of significance, does
Rize have a lower unemployment
rate than Izmir?
Example 2- Compare the Unemployment
Rate

H0: pR – pI = 0
Ha: pR – pI < 0
 = .05
nR = 1500 nI = 1500
Critical Value(s):
Reject H0

.05

-1.645 0 z
Example 2- Compare the Unemployment Rate

x MA 74 xCA 129
p̂ MA = = = .0493 p̂CA = = = .0860
n MA 1500 nCA 1500

x MA + xCA 74 + 129
p̂ = = = .0677
n MA + nCA 1500 + 1500


( .0493 - .0860 ) - ( 0 )
æ 1 1 ö
( .0677 ) × (1 - .0677 ) × çè 1500 + 1500 ÷ø
= -4.00
Example 2- Compare the Unemployment

H0: pR – pI = 0 Test Statistic:


Ha: pR – pI < 0 z = –4.00
 = .05
nR = 1500 nI = 1500
Critical Value(s):
Decision:
Reject H0 Reject at  = .05
.05 Conclusion:
There is evidence Rize is
-1.645 0 z less than Izmir
Determining Sample Size
Determination of Sample Size for Estimating µ1 – µ2

To estimate (μ1 – μ2) with a given margin of error ME


and with confidence level (1 – ), use the following
formula to solve for equal sample sizes that will achieve
the desired reliability:

( z ) (s )
2
a 2
2
+s 2

n1 = n2 =
1 2

(ME)2
s
You will need to substitute estimates for the values of 1
2

and s 22 before solving for the sample size. These


estimates might be sample variances s12 and s22 from
prior sampling (e.g., a pilot sample) or from an educated
(and conservatively large) guess based on the range–
that is, s ≈ R/4.
Determination of Sample Size for Estimating p1 – p2

To estimate (p1 – p2) with a given margin of error


ME and with confidence level (1 – ), use the
following formula to solve for equal sample sizes
that will achieve the desired reliability:

( z ) (p q + p q )
2
a 2
n1 = n2 =
1 1 2 2

(ME)2

You will need to substitute estimates for the values


of p1 and p2 before solving for the sample size.
These estimates might be based on prior samples,
obtained from educated guesses, or, most
conservatively, specified as p1 = p2 = .5.
Example 3- Finding the Sample Sizes for
Estimating (μ1-μ2)

What sample size is needed to estimate μ1 –


μ2 with 95% confidence and a margin of
error of 5.8? Assume prior experience tells
us σ1 =12 and σ2 =18.

( )( + )
2 2 2
1.96 12 18
n1 = n2 = 2
= 53.44 » 54
(5.8)
Example 4- Finding the Sample Sizes for
Estimating (p1-p2)

A production supervisor suspects a difference


exists between the proportions p1 and p2 of
defective items produced by two different
machines. Experience has shown that the
proportion defective for each of the two machines
is in the neighborhood of 0.03. If the supervisor
wants to estimate the difference in the proportions
to within 0.005 using a 95% confidence interval,
how many items must be randomly sampled from
the production of each machine? (Assume that
the supervisor wants n1=n2=n).
Comparing Two
Population Variances:
Independent Sampling
Test of Hypothesis about s12/s22

Test Statistic: F=s12/s22

Where s12 is larger than s22

Alternative Hypothesis Rejection Region

Use F distribution with df n1-1 and n2-1


F-distribution

An F-distribution with 7 numerator and 9 denominator degrees of freedom


F-distribution
Conditions Required for a Valid F-Test for
Equal Variances

1. Both sampled populations are normally distributed.

2. The samples are random and independent.


Example 1- F-Test for Equal Variances Example

A manufacturer of paper products wants to


compare the variation in daily production levels at
two paper mills. Independent random samples of
days are selected from each mill, and the
production levels (in units) are recorded. The
data are given in PAPER. Do these data provide
sufficient evidence to indicate a difference in the
variability of production levels at the two paper
mills? (Use α=0.10).
Find the p-value for the test.

PAPERS
F-Test Two-Sample for Variances

Level Level
Mean 26.30769231 19.88889
Variance 69.8974359 23.51634
Observations 13 18
df 12 17
F 2.972292299
P(F<=f) one-tail 0.020035849
F Critical one-tail 2.380654162
Procedure

Вам также может понравиться