P. STATISTICS LESSON 13

Download Report

Transcript P. STATISTICS LESSON 13

AP STATISTICS
LESSON 13 -2
(DAY 1)
INFERENCE FOR TWO – WAY TABLES
ESSENTIAL QUESTION:
How is Chi-square Used to Test
for Homogeneity of Populations?
Objectives:
• To create two-way tables.
• To use techniques to test data for
homogeneity of populations.
Inference for Two-way Tables
We want to compare more than two groups.
The test we will use starts by presenting the
data in a new way, as a two-way table.
Two-way tables have more general uses than
comparing the proportions of success in
several groups.
They describe relationships between any
two categorical variables.
Example 13.4 Page 744
Treating Cocaine Addiction
The subjects were 72 chronic users of
cocaine who wanted to break their drug
habit. Twenty-four of the subjects were
randomly assigned to each treatment.
The Problem of Multiple Comparisons
Call the population proportions of successes in the
three groups p1, p2 , p3 .
• Test Ho : p1 = p2 to see if the success rate of
desipramine differs from that of lithium.
• Test Ho : p1 = p2 to see if the success rate of
desipramine differs the placebo.
• Test Ho : p1 = p3 to see if the success rate of lithium
differs the placebo.
The weakness of doing three tests is that we get three
P-values.
Statistical Methods for Dealing with Many
Comparisons Usually Have Two Parts
1. An overall test to see if there is good evidence of
any differences among the parameters that we
want to compare.
2. A detailed follow-up analysis to decide which of
the parameters differ and to estimate how large
the differences are.
The overall test is one with which we are familiar
– the chi-square test – but in this new setting it
will be used for comparing several population
proportions.
Two-way Tables
The first step in the overall test for comparing
several proportions is to arrange the data in a twoway table that gives counts for both successes and
failures.
Relapse
NO
YES
Desipramine
14
10
Lithium
6
18
Placebo
4
20
This is a 3 x 2 table because it has 3 rows and 2
columns. A table with r rows and c columns is an
r x c table.
Two-way Tables (continued…)
The table shows the relationship between two
categorical variables. The explanatory variable is
the treatment (one of three drugs).
The response variable is success (no relapse) or
failure ( relapse). The two-way table gives the
counts for all 6 combinations of values of these
variables.
Each of the 6 counts occupies a cell of the table.
Expected Counts
We want to test the null hypothesis that there are no
differences among the proportions of successes for
addicts given the three treatments:
H0 : p1 = p2 = p3
The alternative hypothesis is that there is some
difference, that not all three proportions are equal:
Ha: not all of p1, p2, p3 are equal
The alternative hypothesis is no longer one-sided or
two-sided. It is many-sided, because it allows any
relationship other than all three equal.
Expected Counts (continued…)
The expected count in any cell of a two-way
table when Ho is true is
expected count = row total x column total
table total
Example 13.5 Page 747
Free Throws
If we have n independent trials and the
probability f a success oneach trila is p, we
expect np successes. If we draw and SRS
of n individuals from a population in whiich
the proportion of successes is p, we expect
np successes in the sample.
Example 13.6
Page 748
Comparing Observed and Expected Counts
Observed
Expected
No
Yes
No
Yes
Desipramine
14
10
8
16
Lithium
6
18
8
16
Placebo
4
20
8
16