chapter 10 - two sample hypothesis test

24
Two-Sample Hypothesis Test Vo Duc Hoang Vu University of Economics Ho Chi Minh City April 16, 2014 Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 1 / 17

Upload: vuvo

Post on 13-May-2017

238 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Chapter 10 - two sample hypothesis test

Two-Sample Hypothesis Test

Vo Duc Hoang Vu

University of Economics Ho Chi Minh City

April 16, 2014

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 1 / 17

Page 2: Chapter 10 - two sample hypothesis test

Chapter Contents

Two-Sample Tests

Comparing Two Means: Independent Samples

Confidence Interval for the Difference of Two Means, µ1 − µ2

Comparing Two Means: Paired Samples

Comparing Two Proportions

Confidence Interval for the Difference of Two Proportions, π1 − π2

Comparing Two Variances

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 2 / 17

Page 3: Chapter 10 - two sample hypothesis test

Chapter Contents

Two-Sample Tests

Comparing Two Means: Independent Samples

Confidence Interval for the Difference of Two Means, µ1 − µ2

Comparing Two Means: Paired Samples

Comparing Two Proportions

Confidence Interval for the Difference of Two Proportions, π1 − π2

Comparing Two Variances

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 2 / 17

Page 4: Chapter 10 - two sample hypothesis test

Chapter Contents

Two-Sample Tests

Comparing Two Means: Independent Samples

Confidence Interval for the Difference of Two Means, µ1 − µ2

Comparing Two Means: Paired Samples

Comparing Two Proportions

Confidence Interval for the Difference of Two Proportions, π1 − π2

Comparing Two Variances

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 2 / 17

Page 5: Chapter 10 - two sample hypothesis test

Chapter Contents

Two-Sample Tests

Comparing Two Means: Independent Samples

Confidence Interval for the Difference of Two Means, µ1 − µ2

Comparing Two Means: Paired Samples

Comparing Two Proportions

Confidence Interval for the Difference of Two Proportions, π1 − π2

Comparing Two Variances

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 2 / 17

Page 6: Chapter 10 - two sample hypothesis test

Chapter Contents

Two-Sample Tests

Comparing Two Means: Independent Samples

Confidence Interval for the Difference of Two Means, µ1 − µ2

Comparing Two Means: Paired Samples

Comparing Two Proportions

Confidence Interval for the Difference of Two Proportions, π1 − π2

Comparing Two Variances

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 2 / 17

Page 7: Chapter 10 - two sample hypothesis test

Chapter Contents

Two-Sample Tests

Comparing Two Means: Independent Samples

Confidence Interval for the Difference of Two Means, µ1 − µ2

Comparing Two Means: Paired Samples

Comparing Two Proportions

Confidence Interval for the Difference of Two Proportions, π1 − π2

Comparing Two Variances

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 2 / 17

Page 8: Chapter 10 - two sample hypothesis test

Chapter Contents

Two-Sample Tests

Comparing Two Means: Independent Samples

Confidence Interval for the Difference of Two Means, µ1 − µ2

Comparing Two Means: Paired Samples

Comparing Two Proportions

Confidence Interval for the Difference of Two Proportions, π1 − π2

Comparing Two Variances

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 2 / 17

Page 9: Chapter 10 - two sample hypothesis test

Learning Objectives - LO

1 Recognize and perform a test for two means with known σ1 and σ2

2 Recognize and perform a test for two means with unknown σ1 and σ2

3 Recognize paired data and be able to perform a paired t test

4 Explain the assumptions underlying the two-sample test of means

5 Perform a test to compare two proportions using z

6 Check whether normality may be assumed for tow proportions

7 Use Excel to find p-values for two-sample tests using z or t

8 Carry out a test of two variances using the F distribution

9 Construct a confidence interval for µ1 − µ2 or π1 − π2

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 3 / 17

Page 10: Chapter 10 - two sample hypothesis test

Two-sample Tests

What is a Two - Sample Test

A Two-sample test compares two sample estimates with each other.

A one-sample test compares a sample estimate to a non-sample

benchmark

Basis of Two-Sample Tests

The logic of two-sample tests is based on the fact that two samples

drawn from the same population may yield different estimates of a

parameter due to chance.

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 4 / 17

Page 11: Chapter 10 - two sample hypothesis test

Two-sample Tests

What is a Two - Sample Test

A Two-sample test compares two sample estimates with each other.

A one-sample test compares a sample estimate to a non-sample

benchmark

Basis of Two-Sample Tests

The logic of two-sample tests is based on the fact that two samples

drawn from the same population may yield different estimates of a

parameter due to chance.

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 4 / 17

Page 12: Chapter 10 - two sample hypothesis test

Two-Sample Tests

What is a Two-Sample Test

If the two sample statistics differ by more than the amount

attributable to chance, then we conclude that the samples came from

populations with different parameter values.

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 5 / 17

Page 13: Chapter 10 - two sample hypothesis test

Test Procedure

State the hypotheses

Set up the decision rule

Insert the sample statistics

Make a decision based on the critical values or using p − values

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 6 / 17

Page 14: Chapter 10 - two sample hypothesis test

Comparing Two Means: Independent Samples

Recognize and perform a test for two means with known σ1 and σ2

The hypotheses for comparing two independent population means

µ1 and µ2are :

Left-Tailed Test Two-Tailed Test Right-Tailed Test

H0 : µ1 − µ2 ≥ 0 H0 : µ1 − µ2 = 0 H0 : µ1 − µ2 ≤ 0

H1 : µ1 − µ2 < 0 H1 : µ1 − µ2 6= 0 H1 : µ1 − µ2 > 0

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 7 / 17

Page 15: Chapter 10 - two sample hypothesis test

Comparing Two Means: Independent Samples

LO4: Explain the assumptions underlying the two-sample test of

means:

Case 1: Known Variances

When the variances are known, use the normal distribution for the

test (assuming a normal population).

The test statistic is:

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 8 / 17

Page 16: Chapter 10 - two sample hypothesis test

Recognize and perform a test for two means with unknownσ1 and σ2

Case 2: Unknown Variances, assumed equal

Since the variances are unknown, they must be estimated and the

Students t distribution used to test the means.

Assuming the population variances are equal, s12 and s22 can be used

to estimate a common pooled variance s2p .

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 9 / 17

Page 17: Chapter 10 - two sample hypothesis test

Recognize and perform a test for two means with unknownσ1 and σ2

Case 3: Unknown Variances, assumed unequal

If the unknown variances are assumed to be unequal, they are not

pooled together.

In this case, the distribution of the random variable x̄1x̄2 is not certain

(Behrens-Fisher problem).

Use the Welch-Satterthwaite test which replaces

σ21 and σ22 with s21 and s22 in the known variance z formula, then use a

Students t test with adjusted degrees of freedom.

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 10 / 17

Page 18: Chapter 10 - two sample hypothesis test

Comparing Two Means: Independent Samples

Case 3: Unknown Variances, assumed unequal

Welch-Satterthwaite test

A Quick Rule for degrees of freedom is to use min(n1 − 1, n2 − 1).

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 11 / 17

Page 19: Chapter 10 - two sample hypothesis test

Comparing Two Means: Independent Samples

Summary for the Test Statistic

If the population variances σ21 and σ22 are known, then use the normal

distribution.

If population variances are unknown and estimated using s21 and s22 ,

then use the Students t distribution.

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 12 / 17

Page 20: Chapter 10 - two sample hypothesis test

Steps in Testing Two Means:

1 Step 1: State the hypotheses

2 Step 2: Specify the decision rule. Choose α (the level of significance)

and determine the critical value(s).

3 Step 3: Calculate the Test Statistic

4 Step 4: Make the decision Reject H0 if the test statistic falls in the

rejection region(s) as defined by the critical value(s).

5 Step 5: Take action based on the decision.

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 13 / 17

Page 21: Chapter 10 - two sample hypothesis test

Comparing Two Means: Independent Samples

Which Assumption is Best:

If the sample sizes are equal, the Case 2 and Case 3 test statistics will

be identical, although the degrees of freedom may differ.

If the variances are similar, the two tests will usually agree.

If no information about the population variances is available, then the

best choice is Case 3.

The fewer assumptions, the better.

Must Sample Sizes Be Equal?

Unequal sample sizes are common and the formulas still apply.

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 14 / 17

Page 22: Chapter 10 - two sample hypothesis test

Comparing Two Means: Independent Sample

Large Samples?

For unknown variances, if both samples are large

(n1 ≥ 30 and n2 ≥ 30) and the population is not badly skewed, use

the following formula with appendix C.

zcalc =x̄1 − x̄2√s21n1

+s22n2

(large samples, symmetric populations)

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 15 / 17

Page 23: Chapter 10 - two sample hypothesis test

Comparing Two Means: Independent Sample

Caution: Three Issues

1 Are the populations skewed? Are there outliers?

Check using histograms and/or dot plots of each sample. t-tests are

OK if moderately skewed, especially if samples are large. Outliers are

more serious.

2 Are the sample sizes large (n ≥ 30)?

If samples are small, the mean is not a reliable indicator of central

tendency and the test may lack power.

3 Is the difference important as well as significant?

A small difference in means or proportions could be significant if the

sample size is large.

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 16 / 17

Page 24: Chapter 10 - two sample hypothesis test

LO9: Confidence Interval for the Difference of Two Means:µ1 − µ2

Construct a confidence interval for µ1 − µ2 or π1 − π2Assuming equal variances:

(1 − x̄2)± tα/2

√(n1 − 1)s21 + (n2 − 1)s22

n1 + n2 − 2

√1

n1+

1

n2

Assuming unequal variances:

(1 − x̄2)±

Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 17 / 17