Chapter 6. Two-Way Tables Topics covered in this chapter: • • • Creating a Two-Way Table Marginal Distribution Conditional Distribution Creating a Two-Way Table Example 6.1: I think I’ll be rich by age 30 The Problem: A sample survey of young adults asked, “What do you think are the chances you will have much more than a middle-class income at age 30?” Create a two-way table showing the results of this survey. 1. Open the data set ta06-01.por. 2. Go to the Data and scroll down to Weight Cases. 3. The following window appears: 4. 5. 6. 7. Click on Weight cases by. Highlight Count and click the arrow next to the Frequency Variable box. Click OK. Go to the Analyze menu, click on Descriptive Statistics, and then click on Crosstabs. You will see the following window: 58 59 Chapter 6 8. Highlight Chance and click on the arrow to the left of the Row(s) box. 9. Highlight Sex and click on the arrow to the left of the Column(s) box. 10. Click OK. 11. Your table will appear in the Output window. It will be labeled Chance*Sex Crosstabulation. Marginal Distribution Example 6.3: Creating a marginal distribution The Problem: A sample survey of young adults asked, “What do you think are the chances you will have much more than a middle-class income at age 30?” Find the Marginal Distribution young adults opinions of their chances of getting rich. To find the Marginal Distribution of the variable Chance, we need only to look at the subtotals for each of the “Chance” options divided by the total number of young adults surveyed. We can also do this by using SPSS. 1. Follow instructions 1 through 9 for Example 6.1 above to create the twoway table. Two-Way Tables 60 2. Click on the Cells button to the right of Row(s). You will see the following window: 3. Under the Percentages box, select Total. Click Continue. 4. Click the OK button. A table of counts and percentages will appear in the Output window. 61 Chapter 6 The marginal distribution of Chance may be found by looking at the percentages for each value of Chance under the Total column at the right hand side of the table. To get the Marginal Distribution of Sex, just look at the percentages for each value of Sex in the Total row at the bottom of the table. Conditional Distribution Example 6.3:Comparing women and men Problem: How do young men and young women differ in their responses to the question, “What do you think are the chances you will have much more than a middle-class income at age 30?” Find the Conditional Distribution of the student’s opinions given that the student is male. If we know that the student is male, we need to look only at the “Male” column of the two-way table. To find the distribution of the students’ opinions of their chances of getting rich given that the student is male, divide each count in the Male column by the column total. We can do this also by using SPSS. 1. Follow instructions 1 through 9 for Example 6.1 above to create the twoway table. 2. In the Crosstabs window, click on the box labeled Cells at the right side of the window. 3. To get the conditional probabilities of Chance given Sex, check the Column box under Percentages, since Sex is the column variable. Two-Way Tables 62 4. Select Continue and then click OK. 5. The following output will appear: Crosstabs 63 Chapter 6 The Chance * Sex Crosstabulation gives the conditional distribution of Chance given Sex for all Sex groups. To find the conditional distribution of Chance given that a young person is a male, just look at the percentages for each group in the Male column. The probability that a young person believes they will have “a good chance” of getting rich given that the person is male is 30.8%. The probabilities in this column should sum to 100% since all males surveyed fall into one of these 5 “Chance” groups. Likewise we can find the conditional distribution given that a young person is a female by looking at the percentages in the Female column. Chapter 6 Exercises 6.1 6.3 6.19 6.27 6.29 Attitudes towards recycled products. Attitudes towards recycled products. Helping cocaine addicts. Life at work. College degrees. 347 Chapter 6 SPSS Solutions 6.1 The table represents the opinions of 20 + 7 + 9 + 29 + 25 + 43 = 133 people. Of these, 36 were buyers of recycled paper coffee filters. The marginal distribution of opinions is 49/133 = 36.8% think the quality is higher, 32/133 = 24.1% think the quality is the same, and 52/133 = 39.1% think the quality is lower. 60.1% think the quality is the same or higher than other filters. 6.3 SPSS does not like data tables already summarized. To find the conditional distributions, we’ll simply divide each cell count by the total number of buyers (36) and non-buyers (97). There should be no surprises – more than half the buyers think the quality of the recycled filters is higher; almost half of the non-buyers think the quality of the recycled filters is lower. 6.19 The percents of relapsed subjects are 10/24 = 41.7% for the Desipramine group, 18/24 = 75% for the Lithium group, and 20/24 = 83.3% for the Placebo group. Enter these percents and the treatments into two variables. Then click Graphs, Legacy Dialogs, Bar and define a simple bar chart where Data in Chart are Values of Individual Cases. The bars represent the relapse percentages and the treatment type is the category variable. Give the graph a title, then click OK to generate the graph. 348 6.27 Open data file ex06-27. We’ll create a stacked bar chart to display these data and examine the effect of education on freedom at work. Click Graphs, Legacy Dialogs, Bar. Select a Stacked chart with Summaries for groups of cases. Click Define to continue. Move the button to Other statistic and enter Count; enter Degree as the Category axis and Define Stacks by Work. Give your graph an appropriate Titles. The intial graph is shown below. The bars are not all the same height because there were different numbers of individuals with a given education level. We’ll use the Chart Editor to make all the bars extend to 100%. 349 Double-click in a bar to bring up the Chart Editor. Click Options, Scale to 100%. You can also click on the Y axis label to change this label to Percent (type the new label in the box). To change from color fill to a black-and-white Pattern, click in a bar for a Properties window. Click the Variables tab and change the drop-down box entry for Work from Style:color to Style pattern. Apply your changes and Close the Chart Editor. 350 This chart clearly shows that individuals with more education have more freedom to organize their own work. Less than 10% (7.78%) of those with Bachelor’s degrees have no freedom while almost 40% (37.01%) of those with less than a high school diploma have no freedom. 6.29 Follow the instructions given in Exercise 6.27 to create another stacked bar chart after entering the data as shown at right. Our finished chart is below. While the projection is for women to earn far more degrees than men, the conditional distributions are remarkably similar. Men are slightly more likely to pursue professional and doctor’s degrees than women.
© Copyright 2026 Paperzz