๐

ย >ย

๐ย

ย >ย

๐

# 1.3 Representing a Categorical Variable with Tables

L

Lusine Ghazaryan

Jed Quiaoit

### AP Statisticsย ๐

265ย resources
See Units

Data can be enormous and hard to understand when observed in its raw, unprocessed likeness. For this purpose,ย statistics was created to help us organize and analyze data. First, values are organized in tables; then, data are graphed in different displays.
Tables are a necessary step to start analyzing data, but it may fail to highlight essential features with data. The graphical displays are visually attractive, easy to read, and see important patterns of the distribution. For categorical variables, the choices are limited. Bar graphs and pie charts are the most common displays when looking at data in chart-like formats.ย ๐ช

## Frequency Tables

Let's say we just finished sending out a survey to our AP Statistics class on how stressful being a student is as a hypothetical occupation with our categories being "very," "somewhat," and "none" (not stressful at all). We, then, have collected 30 responses. How do we organize these responses and make sense of them? ๐ค
One way to do so is to โpileโ the data by counting the number of data values in each category of interest. From there, we can organize these counts into a frequency table, which records the totals and the category names.
At this point, you might wonder: "Wait, what's a frequency table?"
A frequency table for qualitative data lists all categories in one column and the number of elements that belong to each of the categories on the next column. Tallies (e.g., ||||) can be used to number the raw data. The frequency table has the following look:ย

Source:ย  Prem S. Mann. Introductory Statistics. John Wiley and Sons Inc. 2010

The variable is stress on job, which assumes three categories; very, somewhat, and none. Since there is some order, stress on job can be ranked as an ordinal variable. The frequency table always reports the sum of the frequencies that makes up our sample. ๐งฎ

## Extension: Relative Frequency Tables

The concept of frequency tables can be extended using relative frequencies and percentages.
• The relative frequency is found by dividing the frequency for each category by the sum of all frequencies.
• The percentage is obtained by multiplying the relative frequency of category by 100. ย
Relative frequency of a category = Frequency of that cat category / Sum of all frequencies Percentage = Relative frequency * 100
With these quantities in mind, a relative frequency table is similar, but it gives the percentages for each category instead of counts. Based on the relative frequency and percentage distributions of stress on job, we can state that the 33.3% of the employees answered that their jobs are very stressful. Another way to interpret the data is by combining the groups "very" and "somewhat" stressed and report that 80% of the employeesย  answered that jobs are very or somewhat stressful. โ
The image below shows the difference between frequency and relative frequency. Unlike frequencies which typically add up to whatever total count of items/respondents there are, tThe sum of the relative frequencies should be 1.00 or close to 1.00 if the relative frequencies have been rounded. Similarly, the sum of the percentages is always 100 or close 100 if the percentages have been rounded as well.

Source: Basic Mathematics

### Summary

• A frequency table is a list that shows how often each value occurs in a set of data. It shows the number of times (or frequency) that each value appears in the data.
For example, consider the following data set: 2, 3, 3, 5, 5, 5, 7, 7, 9. A frequency table for this data set would look like this:

• A relative frequency table is similar to a frequency table, but it shows the relative frequency of each value in the data set. This means that the frequencies are expressed as a proportion of the total number of values in the data set.
For example, the relative frequencies for the data set above would be:

• The sum of the relative frequencies in a relative frequency table is always 1.
• Both frequency tables and relative frequency tables are useful tools for organizing and summarizing data. They can help you see patterns and trends in the distribution of the data, and they can be used to make predictions or draw conclusions about the data. ๐
๐ฅ Watch: AP Stats - Analyzing Categorical Variables
Browse Study Guides By Unit
๐Unit 1 โ Exploring One-Variable Data
โ๏ธUnit 2 โ Exploring Two-Variable Data
๐Unit 3 โ Collecting Data
๐ฒUnit 4 โ Probability, Random Variables, & Probability Distributions
๐Unit 5 โ Sampling Distributions
โ๏ธUnit 6 โ Proportions
๐ผUnit 7 โ Means
โณ๏ธUnit 8 โ Chi-Squares
๐Unit 9 โ Slopes
โ๏ธFree Response Questions (FRQs)
๐Big Reviews: Finals & Exam Prep