文档介绍:Crosstabulation
Lecture 4 • Crosstabulations are also called
contingency tables or two-way frequency
tables. In their simplest form they are the
count of the categories of one variable for
Chi-Square Test each category of another variable.
• For example, we might like to examine a
crosstabulation of age of woman with
whether they have ever had a child.
1 3
This lecture covers
• Crosstabulation
• Chi-Square Test
2 4
1 2
• We can also calculate row or column
percentages. The following table shows
column percentages. It presents the
percentage age distribution for each
category of WCEB. We can see straight
away that the NO category is younger than
the YES category.
5 7
• We call this a 72 × table because it has 5-year age group * whether have any child
7 rows and 2 columns. A table with r rows Crosstabulation
and c columns is an rc × table. The % within whether have any child
whether have any
table shows the relationship between two child
categorical variables. The explanatory no yes Total
5-year 15-19 % .0% %
variable is the treatment (the drugs). The age 20-24 % % %
group
response variable is ess (no relapse) 25-29 % % %
30-34 % % %
or failure (relapse). The two-way table 35-39 % % %
gives the counts for all binations of 40-44 .6% % %
45-49 .9% % %
values of these variables. Each of the Total % % %
counts occupies a cell of the table.
6 8
3 4
• The question is: Is there a significant
relationship between woman’s age and
• When creating crosstabulations it is
having ever had a child?
standard practice to use the dependent
variable as the rows and the independent
variable as the columns.
.8 .8
• We can create a crosstabulation with three .6 .6
variables. For example, we may want to .4 .4
see the age distribution for WCEB for .2 .2
Mean whether have any child