Section 1.1: Analyzing Categorical Data

Learning Targets for Analyzing Categorical Data

  • Make and interpret bar graphs for categorical data.

  • Identify what makes some graphs of categorical data misleading.

  • Calculate marginal and joint relative frequencies from a two-way table.

  • Calculate conditional relative frequencies from a two-way table.

  • Use bar graphs to compare distributions of categorical data.

  • Describe the nature of the association between two categorical variables.

Organizing Categorical Data

  • Categorical variables provide characteristic data for individuals. For example, a dataset might include:

    • Province: Saskatchewan, Ontario, Alberta, Nunavut.

    • Gender: Male, Female.

    • Number of languages spoken: 11, 22, or 44.

    • Handedness: Right or Left.

    • Height (cm): e.g., 175.0175.0, 162.5162.5, 178.0178.0, 169.0169.0, 166.0166.0, 168.5168.5, 157.5157.5, 150.5150.5, 171.0171.0.

    • Wrist circumference (mm): e.g., 180180, 160160, 174174, 6565, 165165, 147147, 187187.

    • Preferred communication: In person, Facebook, Cell phone, Text messaging.

  • Frequency tables are used to organize these data points by counting the occurrences of each category:

    • Cell phone: 22

    • Facebook: 11

    • In person: 33

    • Text messaging: 44

  • Relative frequency tables organize data by proportions or percentages, calculated by dividing the category count by the total number of individuals (n=10n=10 in this sample):

    • Cell phone: 210=0.20\frac{2}{10} = 0.20 or 20%20\%

    • Facebook: 110=0.10\frac{1}{10} = 0.10 or 10%10\%

    • In person: 310=0.30\frac{3}{10} = 0.30 or 30%30\%

    • Text messaging: 410=0.40\frac{4}{10} = 0.40 or 40%40\%

Displaying Categorical Data

  • To display the distribution of categorical data, two primary types of charts are utilized:

    • Bar graphs: These display the count, proportion, or percent of individuals in each category.

    • Pie charts: These display the distribution as parts of a whole.

  • Precautions for Graphing:

    • Bar graphs can be considered dull, leading to the temptation to use pictures or 3-D effects.

    • Beware the pictograph: Using pictures instead of bars can distort the true area and lead to misinterpretation.

    • Watch the scales: Inconsistent or non-zero starting points on axes can make differences between categories appear larger or smaller than they actually are.

    • Avoid using special 3-D effects as they often obscure the data's readability.

Analyzing Data on Two Categorical Variables

  • When a data set involves two categorical variables, a two-way table is used. This is a table of counts that summarizes the relationship between two categorical variables for a group of individuals and typically includes row and column totals.

  • Marginal Relative Frequency:

    • This gives the percent or proportion of individuals that have a specific value for one categorical variable.

    • A marginal relative frequency tells you about only one of the variables in a two-way table and ignores the other variable.

  • Joint Relative Frequency:

    • This gives the percent or proportion of individuals that have a specific value for one categorical variable AND a specific value for another categorical variable.

    • A joint relative frequency helps answer questions involving both variables simultaneously.

    • Example question: "What percent of people in the sample are environmental club members and own snowmobiles?"

    • Example question: "What proportion of people in the sample are not environmental club members and never use snowmobiles?"

Relationships and Conditional Distributions

  • Marginal and joint relative frequencies are often insufficient to describe the relationship between two variables, such as environmental club membership and snowmobile use.

  • Conditional Relative Frequency:

    • This gives the percent or proportion of individuals that have a specific value for one categorical variable among individuals who share the same value for another categorical variable (the condition).

    • Example question: "What percent of environmental club members in the sample are snowmobile owners?"

  • Conditional Distribution:

    • The distribution of one variable (e.g., snowmobile use) restricted to individuals who occupy a specific category of another variable (e.g., environmental club members) is called a conditional distribution.

    • Distributions can be compared for different conditions, such as comparing the snowmobile use of club members versus non-members.

AP® Exam Tips for Data Analysis

  • When comparing groups of different sizes, always use relative frequencies (percents or proportions) rather than raw frequencies (counts).

  • Precision in language is required: avoid saying "More club members never use snowmobiles" when the data actually shows that "A greater percentage of club members never use snowmobiles."

Comparing Distributions Graphically

  • Side-by-side bar graph: This displays the distribution of a categorical variable for each value of another categorical variable. The bars for different categories are grouped and placed next to each other.

  • Segmented bar graph: This displays the distribution of a categorical variable as segments of a single rectangle. The area of each segment is proportional to the percent of individuals in that specific category. The total height of the rectangle represents 100%100\%.

  • Mosaic Plot: This is a modified segmented bar graph where the width of each rectangle is proportional to the number of individuals in the corresponding category of the conditioning variable. This allows for the visualization of both the relative proportions within categories and the relative sizes of the categories themselves.

Association and Causation

  • Association exists between two variables if knowing the value of one variable helps predict the value of the other.

  • No association exists if knowing the value of one variable provides no predictive advantage for the value of the other variable.

  • Crucial Caution: Association does not necessarily imply causation. Even if two variables are strongly associated, it does not mean that changes in one variable cause changes in the other.