1 portions of these notes are adapted from statistics 7e © 1997 prentice- hall, inc. making...
TRANSCRIPT
11
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Making ComparisonsMaking Comparisons
Inferences Based on Two Samples: Inferences Based on Two Samples: Confidence Intervals & Tests of HypothesesConfidence Intervals & Tests of Hypotheses
PBAF 527 Winter 2005PBAF 527 Winter 2005
22
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.TodayToday
1.1. Scallops, Sampling and the LawScallops, Sampling and the Law• Confidence Intervals, Hypothesis Testing, and SamplingConfidence Intervals, Hypothesis Testing, and Sampling
2.2. Hypothesis TestingHypothesis Testing• Special Cases: Small samples, proportionsSpecial Cases: Small samples, proportions
3.3. Making ComparisonsMaking Comparisons• Solve Hypothesis Testing Problems for Two PopulationsSolve Hypothesis Testing Problems for Two Populations
MeanMean Proportion Proportion
• Distinguish Independent & Related PopulationsDistinguish Independent & Related Populations• Create Confidence Intervals for the DifferencesCreate Confidence Intervals for the Differences
33
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Scallops, Sampling, and Scallops, Sampling, and the Lawthe Law
• Read CaseRead Casea.a. Can a reliable estimate of the mean weight of all Can a reliable estimate of the mean weight of all
the scallops be obtained from a sample size of the scallops be obtained from a sample size of 18?18?
b.b. Do you see any flaws in the rule to confiscate a Do you see any flaws in the rule to confiscate a scallop catch if the sample mean weight is less scallop catch if the sample mean weight is less than 1/36 of a pound?than 1/36 of a pound?
c.c. Develop your own procedure for determining Develop your own procedure for determining whether a ship is in violation of the weight whether a ship is in violation of the weight restriction using the data provided.restriction using the data provided.
d.d. Apply your procedure to the data provided.Apply your procedure to the data provided.
44
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.TodayToday
1.1. Scallops, Sampling and the LawScallops, Sampling and the Law• Confidence Intervals, Hypothesis Testing, and SamplingConfidence Intervals, Hypothesis Testing, and Sampling
2.2. Hypothesis TestingHypothesis Testing• Special Cases: Small samples, proportionsSpecial Cases: Small samples, proportions
3.3. Making ComparisonsMaking Comparisons• Solve Hypothesis Testing Problems for Two PopulationsSolve Hypothesis Testing Problems for Two Populations
MeanMean Proportion Proportion
• Distinguish Independent & Related PopulationsDistinguish Independent & Related Populations• Create Confidence Intervals for the DifferencesCreate Confidence Intervals for the Differences
55
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Hypothesis Testing When Hypothesis Testing When
n is Small and n is Small and σσ UnknownUnknown
Because the sample is smallBecause the sample is small Cannot assume normalityCannot assume normality Cannot assume s is a good approximation for Cannot assume s is a good approximation for
σσ
So, use t-distribution:So, use t-distribution:
with n-1 degrees of freedomwith n-1 degrees of freedom
n
sx
t
n
sx
t
66
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small Sample t-test Small Sample t-test Example 1 (1)Example 1 (1)
Most water treatment facilities monitor the quality of their drinking Most water treatment facilities monitor the quality of their drinking water on hourly basis. One variable monitored it is pH, which water on hourly basis. One variable monitored it is pH, which measures the degree of alkalinity or acidity in the water. A pH measures the degree of alkalinity or acidity in the water. A pH below 7.0 is acidic, one above 7.0 is alkaline, and a pH of 7.0 is below 7.0 is acidic, one above 7.0 is alkaline, and a pH of 7.0 is neutral. One water treatment plant has a target pH of 8.5 (most neutral. One water treatment plant has a target pH of 8.5 (most try to maintain a slightly alkaline level). The mean and standard try to maintain a slightly alkaline level). The mean and standard deviation of 1 hour’s test results, based on 17 water samples at deviation of 1 hour’s test results, based on 17 water samples at this plant are:this plant are:
Does this sample provide sufficient evidence that the mean pH Does this sample provide sufficient evidence that the mean pH level in the water differs from 8.5?level in the water differs from 8.5?
s=.16s=.1624.8x 24.8x
77
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small Sample t-test Small Sample t-test Example 1 (2)Example 1 (2)
1. Establish hypotheses1. Establish hypotheses
2. Set the decision rule for the test: 2. Set the decision rule for the test:
pick pick find tfind t at n-1 dfat n-1 df
3.3. Find test statisticFind test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
05.2039.
08.
17
16.5.842.8
n
sx
t
05.2039.
08.
17
16.5.842.8
n
sx
t
=.05 (for two-sided test this is .025 in each tail)
H 0:=8.5 Ha: 8.5
if |t|>t at n-1 df then reject the null hypothesis
t=2.12 with 16 degrees of freedom
Since |t|< t we cannot the null hypothesis at a 5% level. We cannot conclude that that the mean pH differs from the target based on the sample evidence.
88
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small Sample t-test Small Sample t-test Example 2 (1)Example 2 (1)
A major car manufacturer wants to test a new engine to A major car manufacturer wants to test a new engine to determine whether it meets new air-pollution standards. The determine whether it meets new air-pollution standards. The mean emission mean emission for all engines of this type must be less than for all engines of this type must be less than 20 parts per million of carbon. 10 engines are manufactured for 20 parts per million of carbon. 10 engines are manufactured for testing purposes, and the emission level for each is determined. testing purposes, and the emission level for each is determined. The mean and standard deviation for the tests are: The mean and standard deviation for the tests are:
Do the data supply enough evidence to allow the manufacturer Do the data supply enough evidence to allow the manufacturer to conclude that this type of engine meets the pollution to conclude that this type of engine meets the pollution standard? Assume the manufacturer is willing to risk a Type I standard? Assume the manufacturer is willing to risk a Type I error with probability error with probability =.01.=.01.
s=2.98s=2.9817.17x 17.17x
99
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small Sample t-test Small Sample t-test Example 2 (2)Example 2 (2)
1. Establish hypotheses1. Establish hypotheses
2. Set the decision rule for the test: 2. Set the decision rule for the test:
pick pick find tfind t
3.3. Find test statisticFind test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
00.3
10
98.22017.17
n
sx
t
00.3
10
98.22017.17
n
sx
t
=.01 (for one-sided test this is .01 in the tail)
H 0:≥20 Ha: <20
if t<t then reject the null hypothesis
t=-2.821 with 9 degrees of freedom
We can reject the null. The actual value is less than 20 ppm, and the new engine type meets the pollution standard.
1010
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Large Sample Test for Large Sample Test for the Population the Population
ProportionProportion
When the sample size is large (np and nq When the sample size is large (np and nq are greater than 5)are greater than 5) Assume is distributed normally with Assume is distributed normally with
mean p and standard deviationmean p and standard deviation where q=1-pwhere q=1-p
Test statistic: Test statistic:
2- or 1-tailed tests2- or 1-tailed tests
p̂p̂
n
pqn
pq
nqp
ppz
00
0ˆ
nqp
ppz
00
0ˆ
1111
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Large Sample Tests Large Sample Tests for Proportion for Proportion Example (1)Example (1)
In screening women for breast cancer, doctors use a In screening women for breast cancer, doctors use a method that fails to detect cancer in 20% of the women method that fails to detect cancer in 20% of the women who actually have the disease. Suppose a new method who actually have the disease. Suppose a new method has been developed that researchers hope will detect has been developed that researchers hope will detect cancer more accurately. This new method was used to cancer more accurately. This new method was used to screen a random sample of 140 women known to have screen a random sample of 140 women known to have breast cancer. Of these, the new method failed to detect breast cancer. Of these, the new method failed to detect cancer in 12 women. cancer in 12 women.
Does this sample provide evidence that the failure rate Does this sample provide evidence that the failure rate of the new method differs from the one currently in use?of the new method differs from the one currently in use?
1212
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Large Sample Tests Large Sample Tests for Proportion for Proportion Example (2)Example (2)
1. Establish hypotheses1. Establish hypotheses
2. Set the decision rule for the test: 2. Set the decision rule for the test:
pick pick find tfind t
3.3. Find test statisticFind test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
=.05 (for two-sided test this is .025 in each tail)
H 0:p=.2 Ha: p≠.2
if |z|>z then reject the null hypothesis
z=1.96 36.3
034.
114.
140)8)(.2(.
2.086.ˆ
00
0
nqp
ppz 36.3
034.
114.
140)8)(.2(.
2.086.ˆ
00
0
nqp
ppz
Since the test statistic falls in the rejection region, we can reject the null. The rate of detection for the new test differs from the old at a .05 level of significance.
1313
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.TodayToday
1.1. Scallops, Sampling and the LawScallops, Sampling and the Law• Confidence Intervals, Hypothesis Testing, and SamplingConfidence Intervals, Hypothesis Testing, and Sampling
2.2. Hypothesis TestingHypothesis Testing• Special Cases: Small samples, proportionsSpecial Cases: Small samples, proportions
3.3. Making ComparisonsMaking Comparisons• Solve Hypothesis Testing Problems for Two PopulationsSolve Hypothesis Testing Problems for Two Populations
MeanMean Proportion Proportion
• Distinguish Independent & Related PopulationsDistinguish Independent & Related Populations• Create Confidence Intervals for the DifferencesCreate Confidence Intervals for the Differences
1414
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
How Would You Try to How Would You Try to Answer These Answer These
Questions?Questions?1. Do house prices in two Seattle neighborhoods differ? 1. Do house prices in two Seattle neighborhoods differ?
By how much?By how much?
2. Does one method of teaching reading produce better 2. Does one method of teaching reading produce better results than another? results than another? Can I still have a reliable result with a small sample size? Can I still have a reliable result with a small sample size? How much better are the results of the method?How much better are the results of the method?
3. Do energy conservation efforts really reduce 3. Do energy conservation efforts really reduce consumption over time? consumption over time? How much of a reduction?How much of a reduction?
4. Is the proportion of subprime mortgages to low-income 4. Is the proportion of subprime mortgages to low-income households greater than that for moderate-income households greater than that for moderate-income households? households? How much greater?How much greater?
1515
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Two Population TestsTwo Population Tests
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
1616
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Comparison of Means for Comparison of Means for Independent SubsamplesIndependent Subsamples
Three scenarios:Three scenarios:
1. H1. H00: : 11--22=0=0 Ha: Ha: 11--2200
2. H2. H00: : 11--2200 Ha: Ha: 11--22>0>0
3.3. HH00: : 11--22DD Ha: Ha: 11--22>D >D
(not common, nor is 2-tailed test of D)(not common, nor is 2-tailed test of D)
Could be:Could be: Separate (unequal) Variances (Large Samples)Separate (unequal) Variances (Large Samples) Equal Population Variances (Small Samples)Equal Population Variances (Small Samples)
1717
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Two Population TestsTwo Population Tests
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
1818
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Comparison of MeansComparison of MeansSeparate (Unequal) Variances Separate (Unequal) Variances for 2 Independent Subsamplesfor 2 Independent Subsamples
1.1. AssumptionsAssumptions Independent, Random SamplesIndependent, Random Samples Populations Are Normally DistributedPopulations Are Normally Distributed If Not Normal, Can Be Approximated by Normal If Not Normal, Can Be Approximated by Normal
Distribution (Distribution (nn11 30 & 30 & nn22 30 ) 30 ) For n’s<30, use t with the smaller of nFor n’s<30, use t with the smaller of n11-1, n-1, n22-1 df-1 df
2.2. Two Independent Sample Z-Test StatisticTwo Independent Sample Z-Test Statistic
ZZXX XX
nn nn
11 22 11 22
1122
11
2222
22
XX XX
nn nn
11 22 11 22
1122
11
2222
22
ss ss
1919
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Example Example Separate (unequal) Separate (unequal)
VariancesVariances
You gather data on property value for a random sample You gather data on property value for a random sample of 32 properties in Sandpoint and find that =$345,650 of 32 properties in Sandpoint and find that =$345,650 and s=$48,500. Then you gather data on the value of a and s=$48,500. Then you gather data on the value of a random sample of 35 properties in Ravenna and find random sample of 35 properties in Ravenna and find that =$289,440 and s=$87,090. Is the average property that =$289,440 and s=$87,090. Is the average property value of all properties in both locations equal or not?value of all properties in both locations equal or not?
Do house prices in two Seattle Neighborhoods differ? Do house prices in two Seattle Neighborhoods differ?
By how much?By how much?Is the average price of a home of a certain size equal Is the average price of a home of a certain size equal in Sandpoint and Ravenna?in Sandpoint and Ravenna?
2020
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Separate (unequal) Separate (unequal) Variances Variances SolutionSolution
HH00::
HHaa::
nn11 = = , , nn22 = =
Critical Value(s) Critical Value(s) or or /2? /2?::
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
2121
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Separate (unequal) Separate (unequal) Variances Variances SolutionSolution
HH00::
HHaa::
nn11 = = , , nn22 = =
Critical Value(s) Critical Value(s) or or /2? /2?::
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
µµ11 - µ - µ2 2 = 0 (µ= 0 (µ1 1 = µ= µ22))
µµ11 - µ - µ2 2 ≠≠ 0 (µ 0 (µ1 1 ≠ µ≠ µ22))
.05.05
35353232
zz00 1.961.96-1.96-1.96
.025.025
Reject HReject H00 Reject HReject H00
.025.025
3.3
35090,87
32650,48
)0(440,289650,34522
2
22
1
21
02121
nn
xxz
|z|>z|z|>z/2/2
Reject at Reject at = .05 = .05
There is Evidence of a There is Evidence of a Difference in MeansDifference in Means
2222
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Confidence Interval for Confidence Interval for the Differencethe Difference
A (1-A (1-)100% confidence interval for the difference )100% confidence interval for the difference between two population means between two population means 11--22 using independent using independent
random sampling:random sampling:
Do house prices in two Seattle Neighborhoods differ? Do house prices in two Seattle Neighborhoods differ?
By how much?By how much?
for n’s<30 use tfor n’s<30 use t/2/2 with the with the
lesser of nlesser of n11-1, n-1, n22-1 df-1 df 2
22
1
21
2/21 nnzxx
NB: are the variances of each of the two populations; when NB: are the variances of each of the two populations; when 1122 and and 22
22 are are
unknown, use sunknown, use s1122 and sand s
2222..
2323
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Confidence Interval for Confidence Interval for the Differencethe Difference
Construct a 95% confidence interval around the Construct a 95% confidence interval around the difference and interpret it in words.difference and interpret it in words.
Do house prices in two Seattle Neighborhoods differ? Do house prices in two Seattle Neighborhoods differ?
By how much?By how much?
2424
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Two Population TestsTwo Population Tests
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
2525
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Comparison of MeansComparison of MeansEqual Population Equal Population
Variances Variances
1.1.Tests Means of 2 Independent Tests Means of 2 Independent Populations Having Populations Having EqualEqual Variances Variances
2.2.AssumptionsAssumptions Independent, Random SamplesIndependent, Random Samples Both Populations Are Normally DistributedBoth Populations Are Normally Distributed Population Variances Are Population Variances Are UnknownUnknown But But
Assumed Assumed EqualEqual
3. 3. Usually small samplesUsually small samples
2626
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Comparison of MeansComparison of MeansEqual Population Equal Population
Variances Variances
2
2
11
11
21
21
222
2112
21
2
2121
nndf
nn
snsns
nns
xxt
P
P
2
2
11
11
21
21
222
2112
21
2
2121
nndf
nn
snsns
nns
xxt
P
P
Estimate of Estimate of Standard Standard ErrorError
We select two independent random samples: from population 1 of size n1 with mean 1x and variance s1
2
from population 2 of size n2 with mean 2x and variance s22
For large n’s, use zFor large n’s, use z
Pooled Pooled Estimate of Estimate of VarianceVariance
2727
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Comparison of MeansComparison of MeansEqual Population Equal Population
VariancesVariances
Example:Example:
Does one method of teaching reading Does one method of teaching reading produce better results than another? produce better results than another?
Can I still have a reliable result with a Can I still have a reliable result with a small sample size? small sample size?
How much better are the results of the How much better are the results of the method?method?
2828
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Comparison of MeansComparison of MeansEqual Population VariancesEqual Population Variances
ExampleExample
You decide to base this comparison on the results of a reading test You decide to base this comparison on the results of a reading test given at the end of a learning period of 6 months. given at the end of a learning period of 6 months.
Of a random sample of 22 slow learners, 10 are taught by the new Of a random sample of 22 slow learners, 10 are taught by the new method and 12 are taught by the standard method. Qualified method and 12 are taught by the standard method. Qualified instructors under similar conditions teach all 22 children for a 6-month instructors under similar conditions teach all 22 children for a 6-month period. The results of the reading test at the end of 6 months are as period. The results of the reading test at the end of 6 months are as follows:follows:
New Method: =76.4; sNew Method: =76.4; s1122=34.04=34.04
Standard Method: =72.33; sStandard Method: =72.33; s2222=40.24=40.24
Are the reading scores of children using the new method greater Are the reading scores of children using the new method greater than those of children using the standard method with than those of children using the standard method with alpha=.05?alpha=.05?
Compare a new method of teaching reading to “slow Compare a new method of teaching reading to “slow learners” to the current standard method.learners” to the current standard method.
1x1x
2x2x
2929
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Comparison of MeansComparison of MeansEqual Population VariancesEqual Population Variances
SolutionSolution
HH00::
HHaa::
df df Critical Value(s):Critical Value(s):
Decision Rule:Decision Rule:
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
n1+n2-2=10+12-2=20 df
3030
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small-Sample t Test Small-Sample t Test SolutionSolution
45.37
21210
24.4011204.34110
2
11
35.0
121
101
45.37
033.724.76
11
21
222
2112
21
2
2121
nn
SnSnS
nnS
XXt
P
P
45.37
21210
24.4011204.34110
2
11
35.0
121
101
45.37
033.724.76
11
21
222
2112
21
2
2121
nn
SnSnS
nnS
XXt
P
P
3131
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Comparison of MeansComparison of MeansEqual Population VariancesEqual Population Variances
SolutionSolution
HH00::
HHaa::
df df Critical Value(s):Critical Value(s):
Decision Rule:Decision Rule:
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
n1+n2-2=10+12-2=20 df
55.1
121
101
45.37
033.724.76
t
55.1
121
101
45.37
033.724.76
t
We do not have enough evidence to reject the null hypothesis and conclude that the new method of testing does not improve reading scores.
3232
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Confidence Interval for the Confidence Interval for the Difference Difference
(equal population variances)(equal population variances)
Does one method of teaching reading produce better results than Does one method of teaching reading produce better results than another? another?
How much better are the results of the method?How much better are the results of the method?
Construct a 95% confidence interval for the difference between the Construct a 95% confidence interval for the difference between the two means and interpret it.two means and interpret it.
]54.9,4.1[47.507.4)62.2)(086.2(07.4
12
1
10
145.37086.233.724.76
11
21
22/21
nn
stxx p
]54.9,4.1[47.507.4)62.2)(086.2(07.4
12
1
10
145.37086.233.724.76
11
21
22/21
nn
stxx p
3333
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Two Population TestsTwo Population Tests
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
3434
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Paired-Sample t Test Paired-Sample t Test for Mean Differencefor Mean Difference
1.1. Tests Means of 2 Related PopulationsTests Means of 2 Related Populations Paired or MatchedPaired or Matched Repeated Measures (Before/After)Repeated Measures (Before/After)
2.2. Eliminates Variation Among SubjectsEliminates Variation Among Subjects
3.3. AssumptionsAssumptions Both Population Are Normally DistributedBoth Population Are Normally Distributed If Not Normal, Can Be Approximated by If Not Normal, Can Be Approximated by
Normal Distribution (Normal Distribution (nn11 30 & 30 & nn22 30 ) 30 )
Is a population parameter different over time or between groups?
3535
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Paired-Sample t Test Paired-Sample t Test HypothesesHypotheses
Note: Note: DDii = = XX11ii - - XX22ii for ith for ith observationobservation
Research QuestionsResearch Questions
HypothesisHypothesis No DifferenceNo DifferenceAny DifferenceAny Difference
Pop 1 Pop 1 Pop 2Pop 2Pop 1 < Pop 2Pop 1 < Pop 2
Pop 1 Pop 1 Pop 2Pop 2Pop 1 > Pop 2Pop 1 > Pop 2
HH00 DD = 0= 0 DD 00 DD 00
HH11 DD 00 DD < 0< 0 DD > 0> 0
3636
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Paired-Sample t Test Paired-Sample t Test Data Collection TableData Collection Table
ObservationObservation Group 1Group 1 Group 2Group 2 DifferenceDifference
11 xx1111 xx2121 DD11 = x= x1111-x-x2121
22 xx1212 xx2222 DD22 = x= x1212-x-x2222
ii xx1i1i xx2i2i DDii = x= x1i1i - x- x2i2i
nn xx1n1n xx2n2n DDnn = x= x1n1n - x- x2n2n
3737
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Paired-Sample t Test Paired-Sample t Test Test StatisticTest Statistic
Sample MeanSample Mean Sample Sample Standard Standard DeviationDeviation
z or tz or txxDD
ss
nn
dfdf nn
xxDD
nnss
(D(Dii - x - xDD))22
nn
00
DD
iiii
nn
DDii
nn
11 11
11
11
DD
DD
DD DD
DD
DD
When n>30,use z When n>30,use z When n<30 use t(n-1) dfWhen n<30 use t(n-1) df
DD00=0 when testing whether =0 when testing whether
there is any difference or not.there is any difference or not.
3838
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Paired-Sample t TestPaired-Sample t TestExampleExample
A study is undertaken to determine how consumers react to energy A study is undertaken to determine how consumers react to energy conservation efforts. A random group of 60 families is chosen. conservation efforts. A random group of 60 families is chosen. Each family’s rate of consumption of electricity is monitored in Each family’s rate of consumption of electricity is monitored in equal length time periods before and after they are offered financial equal length time periods before and after they are offered financial incentives to reduce their energy consumption rate. The difference incentives to reduce their energy consumption rate. The difference in electric consumption between the periods is recorded for each in electric consumption between the periods is recorded for each family. The average reduction in consumption is 0.2 kW and the family. The average reduction in consumption is 0.2 kW and the standard deviation of the differences sstandard deviation of the differences sDD=1.0 kW. At =1.0 kW. At =0.01, is =0.01, is
there evidence to conclude that the incentives reduce there evidence to conclude that the incentives reduce consumption?consumption?
Do energy conservation efforts really reduce consumption Do energy conservation efforts really reduce consumption over time? By how much?over time? By how much?
3939
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
Paired-Sample t Test Paired-Sample t Test SolutionSolution
HH00::
HHaa: :
==
Decision Rule:Decision Rule:
Critical Value(s):Critical Value(s):
μD=0
μD<0
.01
n>30, so use z; z<z
zz00-2.326-2.326
.01.01
ttxx
ss
nn
00
DD
DD -0.2-0.2 00
11 00
6060
-1.55-1.55..
DD
DD
z is not less than z; we cannot reject the null hypothesis.
We do not have enough evidence to say that incentives reduce consumption.
4040
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Confidence Interval for Confidence Interval for Paired ObservationsPaired Observations
A (1-A (1-)100% confidence interval for the mean difference is )100% confidence interval for the mean difference is constructed using the t distribution for small sample sizes and z constructed using the t distribution for small sample sizes and z distribution for large sample sizes.distribution for large sample sizes.
n
szx D
D 2/n
szx D
D 2/
Do energy conservation efforts really reduce consumption Do energy conservation efforts really reduce consumption over time? over time? By how much?By how much?
When n>30,use z When n>30,use z When n<30 use t(n-1) df When n<30 use t(n-1) df
]1.0,5.0[60
0.1576.22.02/
n
szx D
D ]1.0,5.0[60
0.1576.22.02/
n
szx D
D
4141
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Two Population TestsTwo Population Tests
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
4242
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Z Test for Difference Z Test for Difference in Two Proportionsin Two Proportions
1.1. Can testCan test HH00: p: p11-p-p22=0=0 HHaa: p: p11-p-p2200
HH00: p: p11-p-p2200 HHaa: p: p11-p-p22>0>0
2. Assumptions2. Assumptions Populations Are IndependentPopulations Are Independent Normal Approximation Can Be UsedNormal Approximation Can Be Used
Does Not Contain 0 or nDoes Not Contain 0 or n
3.3. Z-Test Statistic for Two ProportionsZ-Test Statistic for Two Proportions
21
21
21
21 ˆ where11
ˆ1ˆ
0ˆˆ
nn
xxp
nnpp
ppz
21
21
21
21 ˆ where11
ˆ1ˆ
0ˆˆ
nn
xxp
nnpp
ppz
ˆ1ˆ3ˆ ppnpn ˆ1ˆ3ˆ ppnpn
4343
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Z Test for Difference Z Test for Difference in Two Proportionsin Two Proportions
In 1998, a sample of mortgages was taken from the over 1 In 1998, a sample of mortgages was taken from the over 1 million mortgages disclosed nationally under HMDA. Here is million mortgages disclosed nationally under HMDA. Here is a decription of the sample: a decription of the sample:
Income GroupIncome Group Percent SubprimePercent Subprime nn
Low-incomeLow-income 26%26% 400400
Moderate-incomeModerate-income 11%11% 600600
Is the proportion of sub-prime mortgages to low-income Is the proportion of sub-prime mortgages to low-income households greater than than for moderate-income households? households greater than than for moderate-income households? How much greater?How much greater?
Is there sufficient evidence to claim that the proportion of sub-Is there sufficient evidence to claim that the proportion of sub-prime mortgages to low-income households exceeds that prime mortgages to low-income households exceeds that among moderate income households? Test using among moderate income households? Test using ==.01.01
4444
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Test Statistic: Test Statistic:
Decision: Decision:
Conclusion:Conclusion:
Z Test for Two Z Test for Two Proportions SolutionProportions Solution
HH00: :
HHaa: :
= =
nn11 = = nn22 = =
Decision Rule:Decision Rule:
Critical Value(s):Critical Value(s):
p1-p2>0
p1-p2≤0
.01
4545
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
19.6
6001
4001
17.117.
011.26.
11ˆ1ˆ
0ˆˆ
17.600400
66104ˆ
6611.600ˆ10426.400ˆ
21
21
21
21
2211
nnpp
ppZ
nn
XXp
pnpn
19.6
6001
4001
17.117.
011.26.
11ˆ1ˆ
0ˆˆ
17.600400
66104ˆ
6611.600ˆ10426.400ˆ
21
21
21
21
2211
nnpp
ppZ
nn
XXp
pnpn
Z Test for Two Z Test for Two Proportions SolutionProportions Solution
4646
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Test Statistic: Test Statistic:
Decision: Decision:
Conclusion:Conclusion:
Z Test for Two Z Test for Two Proportions SolutionProportions Solution
HH00: :
HHaa: :
= =
nn11 = = nn22 = =
Decision Rule:Decision Rule:
Critical Value(s):Critical Value(s):
p1-p2>0
p1-p2≤0
.01
4747
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Confidence Interval for Confidence Interval for the Difference in the Difference in
ProportionsProportions
A large sample (1-A large sample (1-)100% confidence interval for the difference )100% confidence interval for the difference between two population proportions:between two population proportions:
2
22
1
112/21
ˆ1ˆˆ1ˆˆˆ
n
pp
n
ppzpp
2
22
1
112/21
ˆ1ˆˆ1ˆˆˆ
n
pp
n
ppzpp
Is the proportion of sub-prime mortgages to low-income Is the proportion of sub-prime mortgages to low-income households greater than than for moderate-income households? households greater than than for moderate-income households? How much greater?How much greater?
]18,.12[.)02538.0(575.215.
600
11.111.
400
26.126.575.211.26.
]18,.12[.)02538.0(575.215.600
11.111.
400
26.126.575.211.26.
How much greater is the proportion of subprime mortgages to How much greater is the proportion of subprime mortgages to low-income buyers compared to moderate-income buyers?low-income buyers compared to moderate-income buyers?
4848
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Two Population TestsTwo Population Tests
TwoPopulations
Z Test(Large
sample)
t Test(Pairedsample)
Z Test
Proportion Variance
F Testt Test(Small
sample)
Paired
Indep.
Mean
4949
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.TodayToday
1.1. Scallops, Sampling and the LawScallops, Sampling and the Law• Confidence Intervals, Hypothesis Testing, and Confidence Intervals, Hypothesis Testing, and
SamplingSampling
2.2. Making ComparisonsMaking Comparisons• Solve Hypothesis Testing Problems for Two Solve Hypothesis Testing Problems for Two
PopulationsPopulations MeanMean Proportion Proportion
• Distinguish Independent & Related PopulationsDistinguish Independent & Related Populations• Create Confidence Intervals for the DifferencesCreate Confidence Intervals for the Differences
End of Chapter
Any blank slides that follow are blank intentionally.