two population means hypothesis testing and confidence intervals with unknown standard deviations
DESCRIPTION
Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations. The Problem. 1 or 2 are unknown 1 and 2 are not known (the usual case) OBJECTIVES Test whether 1 > 2 (by a certain amount) or whether 1 2 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/1.jpg)
Two Population MeansTwo Population Means
Hypothesis Testing and Hypothesis Testing and Confidence IntervalsConfidence Intervals
With UnknownWith UnknownStandard DeviationsStandard Deviations
![Page 2: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/2.jpg)
The ProblemThe Problem1 or 2 are unknown1 and 2 are not known (the usual case)
OBJECTIVESOBJECTIVES• Test whether 1 > 2 (by a certain amount)
– or whether 1 2
• Determine a confidence interval for the difference in the means: 1 - 2
![Page 3: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/3.jpg)
KEY ASSUMPTIONSKEY ASSUMPTIONSSampling is done from two populations.
– Population 1 has mean µ1 and variance σ12.
– Population 2 has mean µ2 and variance σ22.
– A sample of size n1 will be taken from population 1.– A sample of size n2 will be taken from population 2.– Sampling is random and both samples are drawn
independently.– Either the sample sizes will be large or the
populations are assumed to be normally distribution.
1
21
1
111 n
σ variance, n
σ deviation standard ,μ mean :X variableRandom
2
22
2
222 n
σ variance, n
σ deviation standard ,μ mean :X variableRandom
![Page 4: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/4.jpg)
Distribution of Distribution of XX11 - - XX22
• Since X1 and X2 are both assumed to be normalnormal, or the sample sizes, n1 and n2 are assumed to be large, then because 11 and and 22 are unknown are unknown, the random variable X1 -X2 has a:– DistributionDistribution -- tt– MeanMean = 11 - - 22 – Standard deviationStandard deviation that depends on whether or not the
standard deviations of X1 and X2 (although unknown) can be assumed to be equal
– Degrees of freedomDegrees of freedom that also depends on whether or not the standard deviations of X1 and X2 can be assumed to be equal
![Page 5: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/5.jpg)
Appropriate Standard Deviation For Appropriate Standard Deviation For XX11 - -XX22 When Are When Are ’s Are Known’s Are Known
• Recall the appropriate standard deviation for X1 - X2 is:
• Now if 1 = 2 we can simply call it and write it as:
• So if the standard deviations are unknown, we need an estimate for the common variance, 2.
2
22
1
21
nσ
nσ
21
2
n1
n1σ
![Page 6: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/6.jpg)
Estimating Estimating 2 2
Degrees of FreedomDegrees of Freedom• If we can assume that the populations have equal
variances, then the variance of X1 - X2 is the weighted weighted average of saverage of s11
22 and s and s2222, weighted by:
DEGREES OF FREEDOMDEGREES OF FREEDOM• There are n1- 1 degrees of freedom from the first sample
and n2-1 degrees of freedom from the second sample, so• Total Degrees of FreedomTotal Degrees of Freedom for the hypothesis test or
confidence interval = (n1 -1) + (n2 -1) = n = n1 1 + n+ n2 2 -2-2
![Page 7: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/7.jpg)
The Appropriate Standard DeviationThe Appropriate Standard DeviationFor For XX11 - - XX22 When Are When Are ’s Unknown, ’s Unknown,
but Can Be Assumed to Be Equalbut Can Be Assumed to Be Equal• The best estimate for 2 then is the pooled
variance, sp2:
• Thus the best estimates for the variance and standard deviation of X1 - X2 are:
22
21
221
21
122
221
12p s
2nn1ns
2nn1ns
DF TotalDFs
DF TotalDFs
21
2PXX
21
2P
2XX
n1
n1s s
n1
n1s s
21
21
![Page 8: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/8.jpg)
21 xx t-Statistic
ErrorStandard
vEstimate
Point
t
t-Statistic and t-Confidence Interval t-Statistic and t-Confidence Interval Assuming Equal VariancesAssuming Equal Variances
Degrees of Freedom = n1 + n2 -2
Confidence Interval
Error
Standard t
EstimatePoint
/2 2x1x 2x1x
21
2p n
1n1s
21
2p n
1n1s
![Page 9: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/9.jpg)
The Appropriate Standard DeviationThe Appropriate Standard DeviationFor For XX11 - - XX22 When Are When Are ’s Unknown, ’s Unknown, And Cannot Be Assumed to Be EqualAnd Cannot Be Assumed to Be Equal
• If we cannot assume that the populations have equal variances, then the best estimate for 1
2 is s1
2 and the best estimate for 22 is s2
2.• Thus the best estimates for the variance and
standard deviation of X1 - X2 are:
2
22
1
21
XX
2
22
1
212
XX
ns
ns s
ns
ns s
21
21
![Page 10: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/10.jpg)
t-Statistic and t-Confidence Interval t-Statistic and t-Confidence Interval Assuming Unequal VariancesAssuming Unequal Variances
21 xx t-Statistic
ErrorStandard
vEstimate
Point
t
Confidence Interval
Error
Standardt
EstimatePoint
/2
Total Degrees of Freedom
1nns
1nns
ns
ns
2
2
2
22
1
2
1
21
2
2
22
1
21
2x1x 2x1x
2
22
1
21
ns
ns
2
22
1
21
ns
ns
Round the resulting value.
![Page 11: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/11.jpg)
Testing whether the Variances Testing whether the Variances Can Be Assumed to Be EqualCan Be Assumed to Be Equal
• The following hypothesis test tests whether or not equal variances can be assumed:H0:
They are equal)
HA:
They are different)
This is an F-test!This is an F-test!If the larger of s1
2 and s22 is put in the numerator, then
the test is:
Reject H0 if F = ss
> FDF1, DF2
![Page 12: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/12.jpg)
Hypothesis Test/Confidence Interval Hypothesis Test/Confidence Interval Approach With Unknown Approach With Unknown ’s ’s
• Take a sample of size n1 from population 1– Calculate x1 and s1
2
• Take a sample of size n2 from population 2– Calculate x2 and s2
2 • Perform an F-test to determine if the variances
can be assumed to be equal• Perform the Appropriate Hypothesis Test or
Construct the Appropriate Confidence Interval
![Page 13: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/13.jpg)
Example 1Example 1Based on the following two random samples,
– Can we conclude that women on the average score better than men on civil service tests?
– Construct a 95% for the difference in average scores between women and men on civil service tests.
• Because the sample sizes are large, we do not have to assume that test scores have a normal distribution to perform our analyses.
Number sampled = 32Sample Average = 75Sample St’d Dev. = 13.92
Women
Number sampled = 30Sample Average = 73
Sample St’d Dev. = 11.79
Men
![Page 14: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/14.jpg)
Example 1 – F-testExample 1 – F-testDo an F-test to determine if variances can be
assumed to be equal.H0: W
2/M2 = 1 (Equal Variances)
HA: W2/M
2 1 (Unequal Variances)• Select α = .05.• Reject H0 (Accept HA) if Larger s2/Smaller s2 >
F.025,DF(Larger s2),DF(Smaller s2) = F.025,31,29 = 2.09 * (*Note this is F.025,30,29 since the table does not give the value for F.025, 31,29)
Calculation: sW2/ sM
2 = (13.92)2/(11.79)2 = 1.39 Since 1.39 < 2.09, CannotCannot conclude unequal variances.Do Equal Variance t-test Equal Variance t-test with 32+30-2=60 60 degrees of freedom..
![Page 15: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/15.jpg)
Example 1 Example 1 The Equal Variance t-TestThe Equal Variance t-Test
H0: W - M = 0HA: W - M > 0
• Select α = .05.• Reject H0 (Accept HA) if t > t.05,60 = 1.658
Since .608 < 1.658, we cannotcannot conclude thatwomen average better than men on the tests.
.608
301
321167.30
073)(75t
167.30(11.79)6029(13.92)
6031s 222
p
![Page 16: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/16.jpg)
Example 1Example 195% Confidence Interval95% Confidence Interval
95% Confidence Interval
21
2P.025,60MW n
1n1s t)x x(
301
32130.167000.2)7375(
2 2 ± 6.57± 6.57-4.57 -4.57 8.57 8.57
![Page 17: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/17.jpg)
Example 2Example 2Based on the following random samples of
basketball attendances at the Staples Center,– Can we conclude that the Lakers average attendance is
more than 2000 more than the Clippers average attendance at the Staples Center?
– Construct a 95% for the difference in average attendance between Lakers and Clippers games at the Staples Center.
Since sample sizes are small, we must assume that attendance at Lakers and Clipper games have normal distributionsnormal distributions to perform the analyses.
Number sampled = 13Sample Average = 16,675Sample St’d Dev. = 1014.97
LA Lakers
Number sampled = 11Sample Average = 12,009Sample St’d Dev. = 3276.73
LA Clippers
![Page 18: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/18.jpg)
Example 2 – F-testExample 2 – F-test• Do an F-test to determine if variances can be
assumed to be equal.H0: C
2/L2 = 1 (Equal Variances)
HA: C2/L
2 1 (Unequal Variances)
Note: Clipper variance is the larger sample variance
• Choose α = .05.• Reject H0 (Accept HA) if Larger s2/Smaller s2 >
F.025,DF(Larger variance),DF(Smaller variance) = F.025,10,12 = 3.37
Calculation: sC2/ sL
2 = (3276.73)2/(1014.97)2 = 10.42 Since 10.42 > 3.37, CanCan conclude unequal variances.
Do Unequal Variance t-test. Unequal Variance t-test.
![Page 19: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/19.jpg)
Degrees of Freedom for the Unequal Degrees of Freedom for the Unequal Variance t-TestVariance t-Test
• The degrees of freedom for this test is given by:
1nns
1nns
ns
ns
2
2
2
22
1
2
1
21
2
2
22
1
21
= 11.626=
1213
(1014.97)
1011
(3276.73)
13(1014.97)
11(3276.73)
2222
222
This rounded to 1212 degrees of freedom.
![Page 20: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/20.jpg)
Proceed to the hypothesis test for the difference in means with unequal variances:
H0: L - C = 2000HA: L - C > 2000
• Select α = .05.• Reject H0 (Accept HA) if t > t.05,12 = 1.782
Since t = 2.595 > 1.782, we cancan conclude that the Lakers average more than 2000 per game more than the Clippers at the Staples Center.
Example 2 – the t-TestExample 2 – the t-Test
595.2
11)73.3276(
13)97.1014(
2000)009,12675,16(t22
![Page 21: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/21.jpg)
Example 1Example 195% Confidence Interval95% Confidence Interval
95% Confidence Interval
2
22
1
21
.025,12CL ns
ns t)x x(
11)73.3276(
13)97.1014(179.2)009,12675,16(
22
4666 4666 ± 2238.47± 2238.472427.53 2427.53 6904.47 6904.47
![Page 22: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/22.jpg)
Excel ApproachExcel Approach• F-test, t-test Assuming Equal Variances, t-
test Assuming Unequal Variances are all found in Data AnalysisData Analysis..
• Excel only performs a one-tail F-test. – Multiply this 1-tail p-value by 2 to get the p-
value for the 2-tail F-test.• Formulas must be entered for the LCL and
UCL of the confidence intervals.– All values for these formulas can be found in
the Equal or Unequal Variance t-test Output.
![Page 23: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/23.jpg)
Inputting/Interpreting Results Inputting/Interpreting Results From Hypotheses TestsFrom Hypotheses Tests
• Express H0 and HA so that the number on the right side is positive (or 0)
• The p-value returned for the two-tailed test will always be correct.
• The p-value returned for the one-tail test is usually correct. It is correct if:– HA is a “> test” and the t-statistic is positive
• This is the usual case• If t < 0, the true p-value is 1 – (p-value printed by Excel)
– HA is a “< test” and the t-statistic is negative• This is the usual case• If t>0, the true p-value is 1 – (p-value printed by Excel)
![Page 24: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/24.jpg)
Excel For Example 1 – F-TestExcel For Example 1 – F-TestGo Tools
Select Data Analysis
Select F-Test Two-Sample For Variances
![Page 25: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/25.jpg)
Example 1 – F-Test (Cont’d)Example 1 – F-Test (Cont’d)Use Women (Column A) for Variable Range 1
Use Men (Column B) for Variable Range 2
CheckLabels
Designate first cellfor output.
![Page 26: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/26.jpg)
Example 1 – F-Test (Cont’d)Example 1 – F-Test (Cont’d)
p-value forone-tail test
![Page 27: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/27.jpg)
Example 1 – F-Test (Cont’d)Example 1 – F-Test (Cont’d)
p-value forone-tail test
=2*D9Multiply the one-tail p-value by 2 to get the 2-tail p-value.
High p-value (.371671)
Cannot conclude Unequal Variances
Use Equal Variance t-testUse Equal Variance t-test
![Page 28: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/28.jpg)
Example 1 – t-TestExample 1 – t-TestGo Tools
Select Data Analysis
Select t-Test: Two-Sample Assuming Equal Variances
![Page 29: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/29.jpg)
Example 1 – t-Test (Cont’d)Example 1 – t-Test (Cont’d)Since HA is W - M > 0, enter
Column A for Range 1Column B for Range 2
0 for Hypothesized Mean Difference
CheckLabels Designate first cell
for output.
![Page 30: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/30.jpg)
Example 1 – t-test (Cont’d)Example 1 – t-test (Cont’d)
p-value forthe one-tail “>” test
p-value for attwo-tail “” test
High p-value for 1-tail test!
Cannot conclude average women’s score >
average men’s score
![Page 31: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/31.jpg)
Example 1 – 95% Confidence IntervalExample 1 – 95% Confidence Interval
=(D15-E15)-TINV(.05,D20)*SQRT(D18*(1/D17+1/E17))1x 2x- DF.025,t- 2
Ps1n
12n
1
Highlight Cell G19Add $ Signs Using
F4 keyDrag to cell G20
Change “-” to “+”
**
![Page 32: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/32.jpg)
Excel For Example 2 – F-TestExcel For Example 2 – F-TestGo Tools
Select Data Analysis
Select F-Test Two-Sample For Variances
![Page 33: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/33.jpg)
Example 2 – F-Test (Cont’d)Example 2 – F-Test (Cont’d)Use Lakers (Column B) for Variable Range 1
Use Clippers (Column D) for Variable Range 2
CheckLabels
Designate first cellfor output.
![Page 34: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/34.jpg)
Example 2 – F-Test (Cont’d)Example 2 – F-Test (Cont’d)
Enter =2*F9to give the p-value
for the two-tailed test
p-value forone-tail test
Low p-value (.000352) – Can conclude Unequal Variances
Use Unequal Variance t-testUse Unequal Variance t-test
![Page 35: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/35.jpg)
Example 2 – t-TestExample 2 – t-TestGo Tools
Select Data Analysis
Selectt-Test: Two Sample Assuming Unequal Variances
![Page 36: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/36.jpg)
Example 2 – t-Test (Cont’d)Example 2 – t-Test (Cont’d)
CheckLabels Designate first cell
for output.
Since HA is L - C > 2000, enterColumn B for Range 1Column D for Range 2
2000 for Hypothesized Mean Difference
![Page 37: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/37.jpg)
Example 2 – t-test (Cont’d)Example 2 – t-test (Cont’d)
Low p-value for 1-tail test
(compared to α = .05)!
CanCan conclude the Lakers average more than 2000 more people per
game than the Clippers.
p-value forthe one-tail “>” test
p-value for attwo-tail “” test
![Page 38: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/38.jpg)
Example 2 – 95% Confidence IntervalExample 2 – 95% Confidence Interval
=(F15-G15)-TINV(.05,F19)*SQRT(F16/F17+G16/G17)1x 2x- DF.025,t-
Highlight Cell I14Add $ Signs Using
F4 keyDrag to cell I15
Change “-” to “+”
1
21
ns
2ns
22
*
![Page 39: Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations](https://reader034.vdocuments.us/reader034/viewer/2022050910/56815be8550346895dc9dea9/html5/thumbnails/39.jpg)
ReviewReview• Standard Errors and Degrees of Freedom when:
– Variances are assumed equal– Variances are not assumed equal
• F-statistic to determine if variances differ• t-statistic and confidence interval when:
– Variances are assumed equal– Variances are not assumed equal
• Hypothesis Tests/ Confidence Intervals for Differences in Means (Assuming Equal or Unequal Variances)– By hand– By Excel