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:
- Where represents a given row or column total, and 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:
- Where represents a specific cell count, and 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:
- Where represents the specific cell count, and represents the row or column total for that restricted subgroup.
- Marginal Percentage:
Identifying Misleading Graphical Representations
Vertical Axis Baseline Standard:
- The vertical axis of any bar graph displaying frequencies or relative frequencies must begin precisely at (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:
- Unemployment rate at the end of presidency for President B:
- Unemployment rate at the end of presidency for President C:
Evaluation of Misleading Visual Representation:
- The initial graph utilized a truncated vertical axis that began at rather than (with scale increments showing , , , , and ).
- 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 percentage points ().
Requirements for Corrected Visual Representation:
- The vertical axis must be re-anchored to start at .
- The vertical axis scale should ascend uniformly (e.g., , , , , ).
- With a baseline, the heights of the bars accurately communicate the true proportional relationship between President A (7.8\%$), President B (5.4\%$), and President C ().
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:
- Oakcrest:
- Pinewood Estates:
- 1960s Row Total:
- 1970s:
- Shady Lane:
- Oakcrest:
- Pinewood Estates:
- 1970s Row Total:
- 1980s:
- Shady Lane:
- Oakcrest:
- Pinewood Estates:
- 1980s Row Total:
- Marginal Column Totals (Neighborhood Totals):
- Shady Lane Total:
- Oakcrest Total:
- Pinewood Estates Total:
- Overall Grand Total: (or )
- 1960s:
Statistical Computations and Analysis:
- Proportion of Houses Built in Pinewood Estates:
- Marginal proportion formula:
- Calculation:
- Distribution of Decade Built (Relative Frequencies):
- 1960s Relative Frequency:
- 1970s Relative Frequency:
- 1980s Relative Frequency:
- Total Relative Frequency Sum:
- Joint Percentage of Homes Built in Oakcrest AND in the 1960s:
- Joint percentage formula:
- Calculation:
- Proportion of Houses Built in Pinewood Estates:
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: ()
- Falcons: ()
- Prairie Dogs: ()
- Total Teacher Sample:
- Student Sample Relative Frequencies:
- Rams: ()
- Falcons: ()
- Prairie Dogs: ()
- Total Student Sample:
- Teacher Sample Relative Frequencies:
Graphical Representations:
- Side-by-Side Bar Graphs: Displays separate relative frequency bar charts for Teachers and Students on a scale ranging from to .
- Segmented Bar Graph:
- Combines relative frequencies by stacking segments vertically within a single bar of total height for each group.
- Teacher Stack: Rams segment at base, Falcons segment in middle, Prairie Dogs segment at top.
- Student Stack: Rams segment at base, Falcons segment in middle, 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 100500 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 (31023060$$ for Prairie Dogs) due to strong support among the larger student sample size.