Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

17
Two Population Means Two Population Means Hypothesis Testing and Hypothesis Testing and Confidence Intervals Confidence Intervals For Matched Pairs For Matched Pairs
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    217
  • download

    0

Transcript of Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Page 1: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Two Population MeansTwo Population Means

Hypothesis Testing and Hypothesis Testing and Confidence IntervalsConfidence IntervalsFor Matched PairsFor Matched Pairs

Page 2: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Matched PairsMatched Pairs• Sometimes experiments are conducted in such a

way that samples from two populations are matchedmatched with something in common so that the i-th sample taken from the first population has something in common with the i-th sample of the second population.– It is the “common element” (same date, same weight,

etc.) that is chosen at random and dictates the corresponding observations from each population.

– Differences between the sample values (dictated by the “common element”) from each population are computed.

– If it can be assumed that the differences have a normal distribution, t-tests can then be performed or t-intervals constructed for the average value of the differences.

– Pairing, in general, reduces the variability in the problem.

Page 3: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Hypothesis Tests and Confidence Hypothesis Tests and Confidence Intervals for Matched PairsIntervals for Matched Pairs

• Suppose there a random sample of n elements is taken. For each a corresponding sample from each population is observed. The difference is denoted di. So there are n observations of differences, di’s.

• Statistics calculated:

2DD

2i2

D

i

ss :difference theof DeviationStandard Sample

1n

)d(d s :difference theof Variance Sample

n

dd :difference Average

Page 4: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Distribution of average differenceDistribution of average difference__dd

• Distribution: t distribution

1-n : Freedomof Degree

S : Error)(Standard DeviationStandard Sample

:Mean

d

Dd

n

SD

Page 5: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Hypothesis Tests and Confidence Hypothesis Tests and Confidence Intervals for Matched PairsIntervals for Matched Pairs

• Hypothesis Test: H0: D = v

HA: D > v

Test statistic:

Error

Standard

Value edHypothesizEstimate

Point

t

n/s

vd t

D

Page 6: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Hypothesis Tests and Confidence Hypothesis Tests and Confidence Intervals for Matched PairsIntervals for Matched Pairs

• Confidence Interval:

Both the hypothesis test and the confidence interval have n-1 degrees of freedom: DF=n-1

Error

Standardt

Estimate

PointDFα/2,

n

std D

DFα/2,

Page 7: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

ExampleExampleObjective: Compare sales at two branch

stores, one in Anaheim, the other in Irvine.– Can it be concluded that average daily sales

in Anaheim is at least $200 greater than average daily sales in Irvine?

– Construct a 95% confidence interval for the average difference in daily sales between the Anaheim and Irvine branches.

Page 8: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Approach 1Approach 1• Records of sales on seven random dates in Anaheim are

selected and seven random dates in Irvine are selected.

• There is nothing in common between the Anaheim and Irvine samples.

Would have to use Difference in Means approach.Probably not the best approach.

Date Anaheim Date Irvine

15-Dec 9000 30-Nov 6700

25-Nov 8500 8-May 4900

30-Jun 4000 13-Mar 4800

22-Jul 5000 6-Mar 3600

15-Aug 5000 15-Jun 6500

1-Feb 6000 20-Oct 4200

15-Mar 7000 15-Apr 3100

Page 9: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Approach 2Approach 2• Do not choose the receipts at random, but choose

the dates at random and observe the sales at the Anaheim and Irvine branch stores on these dates.

These data are These data are pairedpaired by the random dates by the random dates..

Date Anaheim Irvine

25-Nov 8500 8200

2-Feb 2800 2700

5-May 4200 4000

25-Aug 5600 4900

25-Apr 5700 5300

12-Jun 7300 7000

21-Dec 10000 9200

Difference

300

100

200

700

400

300

800

CalculateDifferences

_

Calculate statistics: d =400 sD = 258.2

Page 10: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Hypothesis TestHypothesis Test

H0: D = 200

HA: D > 200• Select α = .05. • Reject H0 (Accept HA) if t > t.05,6 = 1.943

2.049 > 1.943; thus it can be concluded that average daily sales in Anaheim > $200 more than average daily sales in Irvine.

049.27/258.2

200 -400

7/s

200 -d t

D

Page 11: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

95% Confidence Interval95% Confidence Interval

n

std D

.025,6

7

258.2 X 2.447 400

400 ± 238.8161.2 638.8

Page 12: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Excel For Matched PairsExcel For Matched Pairs

• Hypothesis Tests– Go to Tools/Data Analysis and select

t-Test Paired Two Sample for Means.• Look at p-valuep-value for the test.

• Confidence Intervals– Create a column of differences.

• Go to Tools/Data Analysis and select Descriptive Statistics: Mean Mean ± Confidence± Confidence

Page 13: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Excel - Hypothesis TestExcel - Hypothesis Test

Go Tools

Select Data Analysis

Select t-Test: Paired Two Sample for Means

Page 14: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Excel: t-Test for Matched PairsExcel: t-Test for Matched PairsSince HA is D > 200, enter

Column B for Range 1

Column C for Range 2

200 for Hypothesized Mean Difference

Check

LabelsDesignate first cell

for output.

Page 15: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

Hypothesis Test (Cont’d)Hypothesis Test (Cont’d)

p-value for

one-tail test

Low p-value for 1-tail test (compared to α =.05)!

Can conclude average daily sales in Anaheim exceed those in Irvine by > $200

p-value for at

two-tail “” test

Page 16: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

95% Confidence Interval for 95% Confidence Interval for Matched PairsMatched Pairs

=B2-C2

Drag to D3:D8

=I3+I16

=I3-I16

Go to

Tools/Data Analysis

Descriptive Statistics

On Column D.

Store output

beginning in

cell H1.

Page 17: Two Population Means Hypothesis Testing and Confidence Intervals For Matched Pairs.

ReviewReview

• What constitutes “matched pairs”

• Matched pairs normally reduces variability from difference in means tests

• Create a set of differences

• Hypothesis Tests/Confidence Intervals for average difference– By hand– By Excel