of 25

• date post

28-May-2018
• Category

## Documents

• view

213

0

Embed Size (px)

### Transcript of Two-Sample Tests Samples Comparing Two Means: Paired Samples Comparing Two Proportions ... Two...

• 1/5/2018

1

McGraw-Hill/Irwin Copyright 2009 by The McGraw-Hill Companies, Inc.

TwoTwo--Sample HypothesisSample HypothesisTestingTesting

Chapter10101010

Two-Sample TestsComparing Two Means: Independent

SamplesComparing Two Means: Paired

SamplesComparing Two ProportionsComparing Two Variances

10-2

TwoTwo--Sample TestsSample Tests

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

A oneA one--sample test compares a samplesample test compares a sampleestimate against a nonestimate against a non--sample benchmark.sample benchmark.

What is a TwoWhat is a Two--Sample TestSample Test

Basis of TwoBasis of Two--Sample TestsSample Tests Two samples that are drawn from the sameTwo samples that are drawn from the same

population may yield different estimates ofpopulation may yield different estimates ofa parameter due to chance.a parameter due to chance.

• 1/5/2018

2

10-3

TwoTwo--Sample TestsSample Tests

If the two sample statistics differ by moreIf the two sample statistics differ by morethan the amount attributable to chance,than the amount attributable to chance,then we conclude that the samples camethen we conclude that the samples camefrom populations with different parameterfrom populations with different parametervalues.values.

What is a TwoWhat is a Two--Sample TestSample Test

Figure 10.1

10-4

TwoTwo--Sample TestsSample Tests

State the hypothesesState the hypotheses Set up the decision ruleSet up the decision rule Insert the sample statisticsInsert the sample statistics Make a decision based on the criticalMake a decision based on the critical

values or usingvalues or using pp--valuesvalues If our decision is wrong, we could commit aIf our decision is wrong, we could commit a

type I or type II error.type I or type II error. Larger samples are needed to reduce type ILarger samples are needed to reduce type I

or type II errors.or type II errors.

Test ProcedureTest Procedure

• 1/5/2018

3

10-5

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

The hypotheses for comparing twoThe hypotheses for comparing twoindependent population meansindependent population meansmm11 andandmm22are:are:

Format of HypothesesFormat of Hypotheses

10-6

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

If the population variancesIf the population variancesss1122 andandss2222 areareknown, then use the normal distribution.known, then use the normal distribution.

If population variances are unknown andIf population variances are unknown andestimated usingestimated using ss1122 andand ss2222, then use the, then use theStudentsStudents tt distribution.distribution.

Test StatisticTest Statistic

Table 10.1

• 1/5/2018

4

10-7

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

Excels Tools | Data Analysis menu handlesExcels Tools | Data Analysis menu handlesall three cases.all three cases.

Test StatisticTest Statistic

Figure 10.2

10-8

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

When the variances are known, use theWhen the variances are known, use thenormal distribution for the test (assuming anormal distribution for the test (assuming anormal population).normal population).

The test statistic is:The test statistic is:

CaseCase 11: Known Variances: Known Variances

• 1/5/2018

5

10-9

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

Since the variances are unknown, theySince the variances are unknown, theymust be estimated and the Studentsmust be estimated and the Students ttdistribution used to test the means.distribution used to test the means.

Assuming the population variances areAssuming the population variances areequal,equal, ss1122 andand ss2222 can be used to estimate acan be used to estimate acommon pooled variancecommon pooled variance sspp22..

CaseCase 22: Unknown Variances, Assumed Equal: Unknown Variances, Assumed Equal

10-10

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

The test statistic isThe test statistic isCase 2: Unknown Variances, Assumed EqualCase 2: Unknown Variances, Assumed Equal

With degrees of freedomWith degrees of freedomnn== nn11 ++ nn22 -- 22

• 1/5/2018

6

10-11

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

If the unknown variances are assumed toIf the unknown variances are assumed tobe unequal, they are not pooled together.be unequal, they are not pooled together.

CaseCase 33: Unknown Variances, Assumed Unequal: Unknown Variances, Assumed Unequal

In this case, the distribution of the randomIn this case, the distribution of the randomvariablevariable xx11 xx22 is not certain (Behrensis not certain (Behrens--Fisher problem).Fisher problem).

Use the WelchUse the Welch--SatterthwaiteSatterthwaite test whichtest whichreplacesreplacesss1122 andandss2222 withwith ss1122 andand ss2222 in thein theknown varianceknown variance zz formula, then uses aformula, then uses aStudentsStudents tt test with adjusted degrees oftest with adjusted degrees offreedom.freedom.

10-12

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

CaseCase 33: Unknown Variances, Assumed Unequal: Unknown Variances, Assumed Unequal

WelchWelch--SatterthwaiteSatterthwaite testtest

with degrees of freedomwith degrees of freedom

A Quick Rule for degrees of freedom is toA Quick Rule for degrees of freedom is touse min(use min(nn11 11,, nn22 11).).

• 1/5/2018

7

10-13

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

StepStep 11: State the hypotheses: State the hypotheses

StepStep 22:: SpecifySpecify the decision rulethe decision ruleChooseChooseaa(the level of significance) and(the level of significance) anddetermine the critical value(s).determine the critical value(s).

StepStep 33: Calculate the Test Statistic: Calculate the Test Statistic

Steps in Testing Two MeansSteps in Testing Two Means

10-14

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

StepStep 44: Make the decision: Make the decisionRejectReject HH00 if the test statistic falls in theif the test statistic falls in therejection region(s) as defined by the criticalrejection region(s) as defined by the criticalvalue(s).value(s).

Steps in Testing Two MeansSteps in Testing Two Means

For example,for a two-tailedtest forStudents tand = .05

Figure 10.4

• 1/5/2018

8

10-15

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

If the sample sizes are equal, theIf the sample sizes are equal, the CaseCase 22andand CaseCase 33 test statistics will be identical,test statistics will be identical,although the degrees of freedom mayalthough the degrees of freedom maydiffer.differ.

If the variances are similar, the two testsIf the variances are similar, the two testswill usually agree.will usually agree.

If no information about the populationIf no information about the populationvariances is available, then the best choicevariances is available, then the best choiceisis CaseCase 33..

The fewer assumptions, the better.The fewer assumptions, the better.

Which Assumption Is Best?Which Assumption Is Best?

10-16

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

Must Sample Sizes Be Equal?Must Sample Sizes Be Equal? Unequal sample sizes are common and theUnequal sample sizes are common and the

formulas still apply.formulas still apply.Large SamplesLarge Samples

For unknown variances, if both samplesFor unknown variances, if both samplesare large (are large (nn11 >> 3030 andand nn22 >> 3030) and the) and thepopulation isnt badly skewed, use thepopulation isnt badly skewed, use thefollowing formula with appendix C.following formula with appendix C.

• 1/5/2018

9

10-17

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

Caution: Three IssuesCaution: Three Issues1.1. Are the populations skewed? Are thereAre the populations skewed? Are there

outliers?outliers?Check using histograms and dot plots ofCheck using histograms and dot plots ofeach sample.each sample.tt tests are OK if moderately skewed,tests are OK if moderately skewed,especially if samples are large.especially if samples are large.Outliers are more serious.Outliers are more serious.

10-18

Comparing Two Means:Comparing Two Means:Independent SamplesIndependent Samples

Caution: Three IssuesCaution: Three Issues2.2. Are the sample sizes largeAre the sample sizes large (n(n >> 3030)?)?

If samples are small, the mean is not aIf samples are small, the mean is not areliable indicator of central tendency andreliable indicator of central tendency andthe test may lack power.the test may lack power.

3.3. Is the differenceIs the difference importantimportant as well asas well assignificant?significant?A small difference in means or proportionsA small difference in means or proportionscould be significant if the sample size iscould be significant if the sample size islarge.large.

• 1/5/2018

10

10-19

Comparing Two Means:Comparing Two Means:Paired SamplesPaired Samples

Paired Data