You are on page 1of 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

Chapter Contents

Two-Sample Tests

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

2 / 17

Chapter Contents

Two-Sample Tests Comparing Two Means: Independent Samples

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

2 / 17

Chapter Contents

Two-Sample Tests Comparing Two Means: Independent Samples Condence Interval for the Dierence of Two Means, 1 2

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

2 / 17

Chapter Contents

Two-Sample Tests Comparing Two Means: Independent Samples Condence Interval for the Dierence of Two Means, 1 2 Comparing Two Means: Paired Samples

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

2 / 17

Chapter Contents

Two-Sample Tests Comparing Two Means: Independent Samples Condence Interval for the Dierence of Two Means, 1 2 Comparing Two Means: Paired Samples Comparing Two Proportions

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

2 / 17

Chapter Contents

Two-Sample Tests Comparing Two Means: Independent Samples Condence Interval for the Dierence of Two Means, 1 2 Comparing Two Means: Paired Samples Comparing Two Proportions Condence Interval for the Dierence of Two Proportions, 1 2

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

2 / 17

Chapter Contents

Two-Sample Tests Comparing Two Means: Independent Samples Condence Interval for the Dierence of Two Means, 1 2 Comparing Two Means: Paired Samples Comparing Two Proportions Condence Interval for the Dierence of Two Proportions, 1 2 Comparing Two Variances

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

2 / 17

Learning Objectives - LO
1

Recognize and perform a test for two means with known 1 and 2 Recognize and perform a test for two means with unknown 1 and 2 Recognize paired data and be able to perform a paired t test Explain the assumptions underlying the two-sample test of means Perform a test to compare two proportions using z Check whether normality may be assumed for tow proportions Use Excel to nd p-values for two-sample tests using z or t Carry out a test of two variances using the F distribution Construct a condence interval for 1 2 or 1 2
Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 3 / 17

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

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

4 / 17

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 dierent estimates of a parameter due to chance.

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

4 / 17

Two-Sample Tests
What is a Two-Sample Test If the two sample statistics dier by more than the amount attributable to chance, then we conclude that the samples came from populations with dierent parameter values.

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

5 / 17

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

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 2 are : Left-Tailed Test H 0 : 1 2 0 H 1 : 1 2 < 0 Two-Tailed Test H 0 : 1 2 = 0 H 1 : 1 2 = 0 Right-Tailed Test H0 : 1 2 0 H1 : 1 2 > 0

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

7 / 17

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

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
2. to estimate a common pooled variance sp

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

9 / 17

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
2 and 2 with s 2 and s 2 in the known variance z formula, then use a 1 2 1 2

Students t test with adjusted degrees of freedom.

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

10 / 17

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

Comparing Two Means: Independent Samples


Summary for the Test Statistic
2 and 2 are known, then use the normal If the population variances 1 2

distribution.
2 and s 2 , If population variances are unknown and estimated using s1 2

then use the Students t distribution.

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

12 / 17

Steps in Testing Two Means:

Step 1: State the hypotheses Step 2: Specify the decision rule. Choose (the level of signicance) and determine the critical value(s).

Step 3: Calculate the Test Statistic Step 4: Make the decision Reject H0 if the test statistic falls in the rejection region(s) as dened by the critical value(s).

Step 5: Take action based on the decision.

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

13 / 17

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 dier. 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

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
2 s1 s2 + 2 n1 n2

(large samples, symmetric populations)

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

15 / 17

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.

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.

Is the dierence important as well as signicant? A small dierence in means or proportions could be signicant if the sample size is large.
Vo Duc Hoang Vu (ISB) Two-Sample Hypothesis Test April 16, 2014 16 / 17

LO9: Condence Interval for the Dierence of Two Means: 1 2

Construct a condence interval for 1 2 or 1 2 Assuming equal variances:


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

(1 x 2 ) t/2 Assuming unequal variances:

1 1 + n1 n2

(1 x 2 )

Vo Duc Hoang Vu (ISB)

Two-Sample Hypothesis Test

April 16, 2014

17 / 17

You might also like