Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 10-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.

Post on 18-Dec-2015

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-1

Statistics for ManagersUsing Microsoft® Excel

5th Edition

Chapter 10

Two-Sample Tests

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-2

Learning Objectives

In this chapter, you learn how to use hypothesis testing for comparing the difference between:

The means of two independent populations with equal variances

The means of two independent populations with unequal variances

The means of two related populations The proportions of two independent populations The variances of two independent populations

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-3

Two-Sample Tests Overview

Two Sample Tests

Independent Population

Means

Means, Related

Populations

Independent Population Variances

Group 1 vs. Group 2

Same group before vs. after treatment

Variance 1 vs.Variance 2

Examples

Independent Population Proportions

Proportion 1vs. Proportion 2

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-4

Two-Sample TestsIndependent Populations

Independent Population Means

σ1 and σ2 known

σ1 and σ2 unknown

Different data sources Independent: Sample

selected from one population has no effect on the sample selected from the other population

Use pooled variance t test, or separate-variance t test

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-5

The Process

There are two tests to determine if the means of two

populations are different. One test assumes the

variances of the populations are equal the other is

needed if the variances are not equal. Rather than

make assumptions about the variances, I prefer to

perform an F test for the equality of population

variances and use the results to determine which

model should be used. Therefore the F test comes

first.

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-6

Testing Population Variances

Purpose: To determine if two independent populations have the same variability.

H0: σ12 = σ2

2

H1: σ12 ≠ σ2

2

H0: σ12 σ2

2

H1: σ12 < σ2

2

H0: σ12 ≤ σ2

2

H1: σ12 > σ2

2

Two-tail test Lower-tail test Upper-tail test

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-7

Testing Population Variances

22

21

S

SF

The F test statistic is:

= Variance of Sample 1

n1 - 1 = numerator degrees of freedom

n2 - 1 = denominator degrees of freedom

= Variance of Sample 2

21S

22S

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-8

F Test: An Example

You are a financial analyst for a brokerage firm. You want to compare dividend yields between stocks listed on the NYSE & NASDAQ. You collect the following data: NYSE NASDAQNumber 21 25Mean 3.27 2.53Std dev 1.30 1.16

Is there a difference in the variances between the NYSE & NASDAQ at the = 0.05 level?

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-9

F Test: Example Solution

The test statistic is:

256.116.1

30.1

S

SF

2

2

22

21

H0: σ12 = σ2

2

H1: σ12 ≠ σ2

2

The p-value is not < alpha, so we do not reject H0

(continued)

Conclusion: There is not sufficient evidence of a difference in the variances of dividend yield for the two exchanges

p-value= .588846 = .05

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-10

F test in PhStat

PHStat | Two-Sample Tests | F Test for Differences in Two Variances …

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-11

Hypothesis Tests forTwo Population Means

Lower tail test:

H0: μ1 μ2

H1: μ1 < μ2

i.e.,

H0: μ1 – μ2 0H1: μ1 – μ2 < 0

Upper tail test:

H0: μ1 ≤ μ2

H1: μ1 > μ2

i.e.,

H0: μ1 – μ2 ≤ 0H1: μ1 – μ2 > 0

Two-tailed test:

H0: μ1 = μ2

H1: μ1 ≠ μ2

i.e.,

H0: μ1 – μ2 = 0H1: μ1 – μ2 ≠ 0

Two Population Means, Independent Samples

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-12

Two-Sample Tests for MeansIndependent Populations

Independent Population Means

σ1 and σ2 known

σ1 and σ2 unknown

Assumptions:

Samples are randomly and independently drawn

Populations are normally distributed

or large sample sizes are used

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-13

Difference Between Two Means

Population means, independent

samples

σ1 and σ2 unknownbut equal

σ1 and σ2 unknownbut unequal

Use s to estimate unknown σ Use pooled variance t test

where 1=2 or individual variance t test

where 12 (proven by F test)

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-14

Population means, independent

samples

σ1 and σ2 Unknown but Equal

If an F test does not prove the variances to be unequal, we can assume that they are equal and pool them. The pooled standard deviation is

(continued)

1)n()1(n

S1nS1nS

21

222

211

p

σ1 and σ2 unknownbut equal

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-15

Population means, independent

samples

σ1 and σ2 Unknown but Equal

Where t has (n1 + n2 – 2) d.f.,

and

21

2p

21

n1

n1

S

XXt

The test statistic for

μ1 = μ2 is:

σ1 and σ2 unknownbut equal

1)n()1(n

S1nS1nS

21

222

2112

p

(continued)

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-16

Pooled Variance t Test: Example

You are a financial analyst for a brokerage firm. Is there a difference in dividend yield between stocks listed on the NYSE & NASDAQ? You collect the following data:

NYSE NASDAQNumber 21 25Sample mean 3.27 2.53Sample std dev 1.30 1.16

Is there a difference in the mean dividend yield between the NYSE & NASDAQ ( = 0.05)?

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-17

Solution

H0: μ1 = μ2

H1: μ1 ≠ μ2

= 0.05

df = 21 + 25 - 2 = 44

Pooled Test Statistic:

p-value:

Decision:

Conclusion:

Reject H0 at = 0.05

There is sufficient evidence of a difference in mean dividend yield for the two exchanges.

t0

.025

Reject H0 Reject H0

.025

2.0397

251

211

5021.1

2.533.27t

.047407

F = 1.256p = .5888Do Not Reject σ1

2 = σ22

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-18

Pooled Variance t Test in PhStat and Excel

If the raw data is available Tools | Data Analysis | t-Test: Two Sample

Assuming Equal Variances If only summary statistics are available

PHStat | Two-Sample Tests | t Test for Differences in Two Means …

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-19

Independent PopulationsUnequal Variance

If you cannot assume population variances are equal, the pooled-variance t test is inappropriate

Instead, use a separate-variance t test, which includes the two separate sample variances in the computation of the test statistic

The computations are not in the Text but are as follows:

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-20

The Unequal-Variance t Test

2

2

2

1

2

1

21 )(

ns

ns

XXt

1

)/(

1

)/(

)//(d.f.

2

22

22

1

21

21

22

221

21

n

ns

n

ns

nsns

),,(TDIST tailsdftp

Population means, independent

samples

σ1 and σ2 unknownand unequal

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-21

Unequal Variance t Test: Example

You are a financial analyst for a brokerage firm. Is there a difference in dividend yield between stocks listed on the NYSE & NASDAQ? You collect the following data:

NYSE NASDAQNumber 21 25Sample mean 3.27 2.53Sample std dev 2.30 1.16

Is there a difference in the mean dividend yield between the NYSE & NASDAQ ( = 0.05)?

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-22

Unequal Variance Solution

H0: 1 = 2

H1: 12

= 0.05

df = 92

Test Statistics:

Decision:

Conclusion:

Fail to Reject at = 0.05

There is not sufficient evidence of a difference in mean dividend yields for the two exchanges

t0

.025

Reject H0 Reject H0

.025

.1901

p-value =.1901t = 1.34

F = 3.9313p = .001794Reject HO: 21

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-23

Unequal Variance t Test in PhStat and Excel

If the raw data is available Tools | Data Analysis | t-Test: Two Sample

Assuming Unequal Variances If only summary statistics are available

Use the Excel spreadsheet downloaded from the Homework web page

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-24

Confidence IntervalsIndependent Populations

Independent Population Means

σ1 and σ2 known

σ1 and σ2 unknown

21

2p2-nn21

n

1

n

1SXX

21t

The confidence interval for

μ1 – μ2 is:

Where

1)n()1(n

S1nS1nS

21

222

2112

p

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-25

Two-Sample TestsRelated Populations

D = X1 - X2

Tests Means of 2 Related Populations Paired or matched samples Repeated measures (before/after) Use difference between paired values:

Eliminates Variation Among Subjects Assumptions:

Both Populations Are Normally Distributed or have large samples

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-26

If σD is unknown, we can estimate the unknown population standard deviation with a sample standard deviation. The test statistic for D is now a t statistic, with n-1 d.f.:

Paired samples

1n

)D(DS

n

1i

2i

D

n

SD

tD

Mean Difference, σD Unknown(continued)

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-27

Assume you send your salespeople to a “customer service” training workshop to reduce complaints. Is the training effective? You collect the following data:

Paired Samples Example

Number of Complaints: (2) - (1)Salesperson Before (1) After (2) Difference, Di

C.B. 6 4 - 2 T.F. 20 6 -14 M.H. 3 2 - 1 R.K. 0 0 0 M.O. 4 0 - 4 -21

D = Di

n

5.67

1n

)D(DS

2i

D

= -4.2

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-28

Has the training made a difference in the number of complaints (at the 0.05 level)?

- 4.2D =

1.6655.67/

4.2

n/St

D

D

H0: μD = 0H1: μD 0

Test Statistic:

d.f. = n - 1 = 4

Reject

/2

Decision: Do not reject H0

(p-value is not <.05)

Conclusion: There is not sufficient evidence of a change in the number of complaints.

Paired Samples: Solution

Reject

/2

-1.66 = .01

p-value= .1730

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-29

Related Sample t Test in PhStat and Excel

If the raw data is available Tools | Data Analysis | t-Test: Paired Two Sample for Means

If only summary statistics are available No test available

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-30

Two Population Proportions

Goal: Test a hypothesis or form a confidence interval for two independent population proportions, π1 = π2

Assumptions:

n1π1 5 , n1(1-π1) 5

n2π2 5 , n2(1-π2) 5

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-31

Two Population Proportions

Hypothesis for Population Proportions

Lower-tail test:

H0: π1 π2

H1: π1 < π2

i.e.,

H0: π1 – π2 0H1: π1 – π2 < 0

Upper-tail test:

H0: π1 ≤ π2

H1: π1 > π2

i.e.,

H0: π1 – π2 ≤ 0H1: π1 – π2 > 0

Two-tail test:

H0: π1 = π2

H1: π1 ≠ π2

i.e.,

H0: π1 – π2 = 0H1: π1 – π2 ≠ 0

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-32

Two Population Proportions

Since you begin by assuming the null hypothesis is true, you assume π1 = π2 and pool

the two sample (p) estimates.

21

21

nn

XXp

The pooled estimate for the overall proportion is:

where X1 and X2 are the number of successes in samples 1 and 2

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-33

Two Population Proportions

21

21

11)1(

nnpp

ppZ

The test statistic for π1 = 2 is a Z statistic:

2

22

1

11

21

21

n

X ,

n

X ,

nn

XXp

PPwhere

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-34

Example: Two population Proportions

Is there a significant difference between the proportion of men and the proportion of women who will vote Yes on Proposition A?

In a random sample, 36 of 72 men and 31 of 50 women indicated they would vote Yes

Test for a significant difference at the .05 level of significance

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-35

Check the Assumptions

The sample proportions are:

Men: ps1 = 36/72 = .50

Women: ps2 = 31/50 = .62

Assumptions

Men np=72(.5)=36 n(1-p)=72(.5)=36

Women np=50(.62)=31 n(1-p)50(.38)=19

All values > 5

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-36

Two Independent Population Proportions: Example H0: π1 = π2 (the two proportions are equal)

H1: π1 π2

The sample proportions are:

Men: p1 = 36/72 = .50

Women: p2 = 31/50 = .62 The pooled estimate for the overall proportion is:

.549122

67

5072

3136

nn

XXp

21

21

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-37

Two Independent Population Proportions: Example

The test statistic for π1 = π2 is:

1.31

501

721

.549)(1.549

.62.50

n1

n1

)p(1p

z

21

21

pp

P-value for -1.31 is .1902At = .05

.025

-1.96 1.96

.025

-1.31

Decision: Do not reject H0

There is not sufficient evidence of a difference in the proportions of men and women who will vote yes on Proposition A.

Reject H0 Reject H0

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-38

Confidence Interval - Two Independent Population Proportions

2

22

1

1121 n

)(1

n

)(1 ppppZpp

The confidence interval for π1 – π2 is:

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-39

Two Sample Tests in PHStat

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-40

Sample PHStat Output

Input

Output

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-41

Sample PHStat Output

Input

Output

(continued)

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-42

Chapter SummaryIn this chapter, we have

Compared two independent samples Performed pooled variance t test for the differences

in two means Examined unequal variance t test for the differences

in two means Formed confidence intervals for the differences

between two means Compared two related samples (paired samples)

Performed paired sample t test for the mean difference

Formed confidence intervals for the paired difference

Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-43

Chapter Summary

Compared two population proportions Performed Z-test for equality of two population

proportions Formed confidence intervals for the difference

between two population proportions

Performed F tests for the difference between two population variances

In this chapter, we have

top related