Analyzing Categorical Data and Graphical Representations

Fundamentals of Categorical and Quantitative Variables

  • Quantitative Variable:

    • Definition: A variable that takes numerical values representing a measured or counted quantity.
    • Examples include measured continuous or discrete amounts such as height, weight, time, house counts, or total individual responses.
  • Categorical Variable:

    • Definition: A variable that takes on values consisting of category names or group labels.
    • Examples include categorical classifications such as presidential administrations, neighborhood names, decades, or mascot choices.
  • Graphical Displays for Categorical Data:

    • Bar Graphs: Displays categorical distributions where each category is represented by a separate bar whose height corresponds to either frequency or relative frequency.
    • Pie Charts: Circular charts divided into sectors that demonstrate relative frequencies (percentages) of each category relative to the whole.
    • Frequency: The total literal count of individuals or items belonging to a specific category.
    • Relative Frequency: The proportion or percentage of individuals or items falling into a specific category relative to the complete total sample size.

Two-Way Tables and Categorical Proportions

  • Structure of Two-Way Tables:

    • Used to organize, summarize, and compare data involving two categorical variables simultaneously.
    • Consists of rows representing categories of one variable and columns representing categories of a second variable, complete with marginal total counts along the edges and a grand total count.
  • Calculating Percentages and Proportions from Two-Way Tables:

    • Marginal Percentage:
      • Definition: The percentage distribution of a single categorical variable relative to the overall total sample.
      • Formula/Relationship: Marginal %=Row Total or Column TotalGrand Total=BC\text{Marginal \%} = \frac{\text{Row Total or Column Total}}{\text{Grand Total}} = \frac{B}{C}
      • Where BB represents a given row or column total, and CC represents the grand total.
    • Joint Percentage:
      • Definition: The percentage of individuals or items that satisfy conditions from two distinct categories simultaneously (the intersection of a row and a column).
      • Formula/Relationship: Joint %=Cell CountGrand Total=AC\text{Joint \%} = \frac{\text{Cell Count}}{\text{Grand Total}} = \frac{A}{C}
      • Where AA represents a specific cell count, and CC represents the grand total.
    • Conditional Percentage:
      • Definition: The percentage of individuals or items within a specific restricted subgroup (a single row or column) that satisfy a second category condition.
      • Formula/Relationship: Conditional %=Cell CountSubgroup Row or Column Total=AB\text{Conditional \%} = \frac{\text{Cell Count}}{\text{Subgroup Row or Column Total}} = \frac{A}{B}
      • Where AA represents the specific cell count, and BB represents the row or column total for that restricted subgroup.

Identifying Misleading Graphical Representations

  • Vertical Axis Baseline Standard:

    • The vertical axis of any bar graph displaying frequencies or relative frequencies must begin precisely at 00 (zero).
    • Starting a vertical axis at a non-zero value (truncating the axis) visually distorts category differences, exaggerating minor numerical variances into large visual differences.
  • Avoidance of Pictographs and Images:

    • Using pictorial icons or images in place of standard rectangular bars in bar graphs creates misleading visual representations.
    • When scaling images to represent larger quantities, both height and width expand simultaneously, causing the image's overall area to scale quadratically rather than linearly, distorting visual perception.

Case Study: Unemployment Rates Across Presidencies

  • Data Summary:

    • Unemployment rate at the end of presidency for President A: 7.8%7.8\%
    • Unemployment rate at the end of presidency for President B: 5.4%5.4\%
    • Unemployment rate at the end of presidency for President C: 4.0%4.0\%
  • Evaluation of Misleading Visual Representation:

    • The initial graph utilized a truncated vertical axis that began at 4%4\% rather than 0%0\% (with scale increments showing 4%4\%, 5.4%5.4\%, 6%6\%, 7.8%7.8\%, and 8%8\%).
    • This non-zero baseline created an exaggerated display where the bar for President C (4.0\%$) appeared to have no height at all, while the bar for President A (7.8\%$) appeared disproportionately larger than President C, even though the actual difference was only 3.83.8 percentage points (7.8%−4.0%=3.8%7.8\% - 4.0\% = 3.8\%).
  • Requirements for Corrected Visual Representation:

    • The vertical axis must be re-anchored to start at 0%0\%.
    • The vertical axis scale should ascend uniformly (e.g., 0%0\%, 2%2\%, 4%4\%, 6%6\%, 8%8\%).
    • With a 0%0\% baseline, the heights of the bars accurately communicate the true proportional relationship between President A (7.8\%$), President B (5.4\%$), and President C (4.0%4.0\%).

Case Study: Housing Construction Analysis Across Neighborhoods and Decades

  • Dataset Overview:

    • A real estate agent collected data tracking the number of houses constructed across three neighborhoods (Shady Lane, Oakcrest, Pinewood Estates) across three decades (1960s, 1970s, 1980s).
  • Complete Two-Way Frequency Table:

    • 1960s:
      • Shady Lane: 4040
      • Oakcrest: 6060
      • Pinewood Estates: 00
      • 1960s Row Total: 100100
    • 1970s:
      • Shady Lane: 3030
      • Oakcrest: 1515
      • Pinewood Estates: 4545
      • 1970s Row Total: 9090
    • 1980s:
      • Shady Lane: 1010
      • Oakcrest: 55
      • Pinewood Estates: 1515
      • 1980s Row Total: 3030
    • Marginal Column Totals (Neighborhood Totals):
      • Shady Lane Total: 40+30+10=8040 + 30 + 10 = 80
      • Oakcrest Total: 60+15+5=8060 + 15 + 5 = 80
      • Pinewood Estates Total: 0+45+15=600 + 45 + 15 = 60
      • Overall Grand Total: 80+80+60=22080 + 80 + 60 = 220 (or 100+90+30=220100 + 90 + 30 = 220)
  • Statistical Computations and Analysis:

    • Proportion of Houses Built in Pinewood Estates:
      • Marginal proportion formula: Total Pinewood Estates HousesGrand Total\frac{\text{Total Pinewood Estates Houses}}{\text{Grand Total}}
      • Calculation: 60220=311≈0.2727\frac{60}{220} = \frac{3}{11} \approx 0.2727
    • Distribution of Decade Built (Relative Frequencies):
      • 1960s Relative Frequency: 100220=511≈45.5%\frac{100}{220} = \frac{5}{11} \approx 45.5\%
      • 1970s Relative Frequency: 90220=922≈40.9%\frac{90}{220} = \frac{9}{22} \approx 40.9\%
      • 1980s Relative Frequency: 30220=322≈13.6%\frac{30}{220} = \frac{3}{22} \approx 13.6\%
      • Total Relative Frequency Sum: 45.5%+40.9%+13.6%=100.0%45.5\% + 40.9\% + 13.6\% = 100.0\%
    • Joint Percentage of Homes Built in Oakcrest AND in the 1960s:
      • Joint percentage formula: Oakcrest and 1960s Cell CountGrand Total\frac{\text{Oakcrest and 1960s Cell Count}}{\text{Grand Total}}
      • Calculation: 60220=311≈27.3%\frac{60}{220} = \frac{3}{11} \approx 27.3\%

Case Study: High School Mascot Selection, Segmented Bar Graphs, and Mosaic Plots

  • Survey Background:

    • In 1969, a newly constructed high school needed to select a mascot.
    • The principal surveyed random samples of teachers and students to vote between three mascot options: Rams, Falcons, or Prairie Dogs.
  • Sample Relative Frequency Distributions:

    • Teacher Sample Relative Frequencies:
      • Rams: 80%80\% (0.800.80)
      • Falcons: 10%10\% (0.100.10)
      • Prairie Dogs: 10%10\% (0.100.10)
      • Total Teacher Sample: 100%100\%
    • Student Sample Relative Frequencies:
      • Rams: 30%30\% (0.300.30)
      • Falcons: 60%60\% (0.600.60)
      • Prairie Dogs: 10%10\% (0.100.10)
      • Total Student Sample: 100%100\%
  • Graphical Representations:

    • Side-by-Side Bar Graphs: Displays separate relative frequency bar charts for Teachers and Students on a scale ranging from 0.0%0.0\% to 100.0%100.0\%.
    • Segmented Bar Graph:
      • Combines relative frequencies by stacking segments vertically within a single bar of total height 100.0%100.0\% for each group.
      • Teacher Stack: 80%80\% Rams segment at base, 10%10\% Falcons segment in middle, 10%10\% Prairie Dogs segment at top.
      • Student Stack: 30%30\% Rams segment at base, 60%60\% Falcons segment in middle, 10%10\% Prairie Dogs segment at top.
  • Initial Support Interpretation (Relative Frequency Only):

    • Looking strictly at relative frequency percentage bars, Rams initially appears to have the most support because the individual relative frequency bar for Rams among teachers (80\%$) is the largest single segment.\n\n* **Sample Size Disparity and Count Calculations**:\n * The survey sampled 100teachersandteachers and500 students.\n * Calculated Count Table:\n * **Teacher Sample Counts (N = 100)**:\n * Rams: 0.80 \times 100 = 80 teachers\n * Falcons: 0.10 \times 100 = 10 teachers\n * Prairie Dogs: 0.10 \times 100 = 10 teachers\n * Total Teachers Sampled = 100\n * **Student Sample Counts (N = 500)**:\n * Rams: 0.30 \times 500 = 150 students\n * Falcons: 0.60 \times 500 = 300 students\n * Prairie Dogs: 0.10 \times 500 = 50 students\n * Total Students Sampled = 500\n\n* **Transition from Segmented Bar Graph to Mosaic Plot**:\n * **Sample Size Ratio**: \frac{500 \text{ students}}{100 \text{ teachers}} = 5 times more students were sampled than teachers.\n * **Mosaic Plot Construction**:\n * A Mosaic Plot is created by modifying a segmented bar graph so that the **width** of each stack is proportional to the total sample size of that group.\n * To adjust the graph for sample sizes, the Student bar is drawn 5 times wider than the Teacher bar.\n\n* **Final Choice Determination**:\n * **Absolute Support Counts**:\n * Rams Total Votes: 80 \text{ (teachers)} + 150 \text{ (students)} = 230 total votes\n * Falcons Total Votes: 10 \text{ (teachers)} + 300 \text{ (students)} = 310 total votes\n * Prairie Dogs Total Votes: 10 \text{ (teachers)} + 50 \text{ (students)} = 60 total votes\n * **Mascot Recommendation and Explanation**:\n * The school should select **Falcons** as the official mascot.\n * Explanation: Although Rams had higher percentage support among teachers, Falcons received significantly more total votes (310totalvotescomparedtototal votes compared to230forRamsandfor Rams and60$$ for Prairie Dogs) due to strong support among the larger student sample size.