# Worksheet: Chapters 3 & 4

## Entering a Contingency Table

Approve Disapprove Don't Know 646 751 105 265 379 114 296 311 151

Results are from the PEW Research Center for the People & the Press.

Tables don't get entered into Minitab as tables, they get get entered in as cases. There are nine different values in the table, so there will be nine cases.

There are two categorical variables. Each of these would be a "what" in the context of the data. In other language that we'll use later in the book, there are two "factors" that each have three "levels". The factor is given first and the levels are given in parentheses.

2. Job Approval Rating (Approve, Disapprove, Don't Know)

The data will look like this when it is entered into Minitab.

Job Approval Ratings in Minitab format
C1-T C2-T C3
Who Job Freq
1 President Approve 646
2 President Disapprove 751
3 President Don't Know 105
4 Republican Approve 265
5 Republican Disapprove 379
6 Republican Don't Know 114
7 Democratic Approve 296
8 Democratic Disapprove 311
9 Democratic Don't Know 151

### Label the columns in Minitab

1. Label the first column who
2. Label the second column job
3. Label the third column freq

### Entering the labels for the categorical variables

You could go through and enter the levels for each factor as shown above, but Minitab has a wonderful tool to automate this for you.

#### Entering the levels for the Who column

1. Choose Calc / Make Patterned Data / Text Values
2. Store the patterned data in who
3. The text values are President Republican Democratic
4. List each value 3 times
5. List the entire sequence 1 time
6. Click OK

#### Entering the levels for the Job column

1. Choose Calc / Make Patterned Data / Text Values
2. Store the patterned data in job
3. The text values are (be sure to enclose don't know in quotes since there is a space in it) Approve Disapprove "Don't Know"
4. List each value 1 time
5. List the entire sequence 3 times
6. Click OK

#### Entering the frequencies

Unfortunately, there is no way to automatically enter the frequency data. You'll have to manually type that information. This will go faster if you'll use the numeric keypad.

#### Note: Order of Categories

Unless you tell it otherwise, Minitab will arrange the output so that the levels for the categorical variables are displayed in alphabetical order. This is fine for the job approval rating, but we would like the President's approval rating to come first, not the Democratic (which is first alphabetically).

To set the display order, do the following

1. Click the left mouse button anywhere in the column where you want to specify the order.
2. Right-click the mouse button and choose Column / Format / Value Order
3. Click Order of occurrence in worksheet
4. Click OK

When you do this, nothing will happen on the screen. This order is only applied when outputing information.