What is a Two-Sample Test - McGraw Hill Higher Education
Download
Report
Transcript What is a Two-Sample Test - McGraw Hill Higher Education
10
Chapter
Two-Sample Hypothesis
Tests
Two-Sample Tests
Comparing Two Means: Independent Samples
Comparing Two Means: Paired Samples
Comparing Two Proportions
Comparing Two Variances
McGraw-Hill/Irwin
Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved.
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 against a nonsample benchmark.
•
If the two sample statistics differ by more than the amount
attributable to chance, then we conclude that the samples came
from populations with different parameter values.
•
Two samples that are drawn from the same population may yield
different estimates of a parameter due to chance.
10-2
Comparing Two Means:
Independent Samples
Format of Hypotheses
•
The hypotheses for comparing two independent population
means µ1 and µ2 are:
Test Statistic
•
•
If the population variances 12 and 22 are known, then use the
normal distribution.
If population variances are unknown and estimated using s12 and
s22, then use the Students t distribution.
10-3
Comparing Two Means:
Independent Samples; Paired Samples
Paired t Test
Table 10.1
•
Paired data typically come from a before/after experiment.
•
In the paired t test, the difference between x1 and x2 is
measured as d = x1 – x2
10-4
Comparing Two Means:
Paired Samples
•
The mean d and standard deviation sd of the sample of n
differences are calculated with the usual formulas for a mean
and standard deviation.
Apply the 1-sample t-test to these differences.
•
Comparing Two Proportions
Testing for Zero Difference: 1 = 2
•
To compare two population proportions, 1, 2, use the
following hypotheses
10-5
Comparing Two Proportions
Pooled Proportion
•
If H0 is true, there is no difference between
1 and 2, so the samples are pooled (averaged) into one “big”
sample to estimate the common population proportion.
10-6
Comparing Two Proportions
Test Statistic
•
The test statistic for the hypothesis 1 = 2 may also be written as:
Assuming normality with
n > 10 and n(1-) > 10 for
both samples.
10-7
Comparing Two Proportions
Analogy to Confidence Intervals
•
The confidence interval for 1 – 2 without pooling the samples is:
•
If the confidence interval does not include
0, then we reject the null hypothesis.
10-8
Comparing Two Proportions
Testing for Non-Zero Differences
•
Testing for equality is a special case of testing for a specified
difference D0 between two proportions.
•
If the hypothesized difference D0 is non-zero, the
test statistic is:
calc
10-9
Comparing Two Variances
Format of Hypotheses
•
•
To test whether two population means are equal, we may also
need to test whether two population variances are equal.
The hypotheses may be stated as
10-10
Comparing Two Variances
Format of Hypotheses
•
An equivalent way to state these hypotheses would be to use
ratios since the variance can never be less than zero and it would
not make sense to take the difference between two variances.
10-11
Comparing Two Variances
The F Test
•
The test statistic is the ratio of the sample variances:
•
If the variances are equal, this ratio should be near
unity: F = 1
10-12
Comparing Two Variances
The F Test
•
•
If the test statistic is far below 1 or above 1, we would reject the
hypothesis of equal population variances.
The numerator s12 has degrees of freedom
1 = n1 – 1 and the denominator s22 has degrees of freedom 2 =
n2 – 1.
• Critical values for the F test are denoted
FL (left tail) and FR (right tail).
10-13
Comparing Two Variances
The F Test
•
•
A right-tail critical value FR may be found from Appendix F using
1 and 2 degrees of freedom.
FR = F1, 2
A left-tail critical value FR may be found by reversing the
numerator and denominator degrees of freedom, finding the
critical value from Appendix F and taking its reciprocal:
FL = 1/F2, 1
10-14
Comparing Two Variances
The F Test
•
•
•
Reject the null hypothesis if Fcalc > FR for a right-tail test for
a given .
Reject the null hypothesis if Fcalc < FL for a left-tail test for a
given .
Reject the null hypothesis if Fcalc > FR or if Fcalc < FL for a
two-tail test. Here we use /2 to obtain the critical values.
10-15