Categorical Data Representations, Contingency Tables, and Conditional Distributions

Categorical Data Representations and Misleading Graphs

  • Primary graphical displays for categorical data include pie charts and bar charts.

  • Visual Analysis Caution:

    • Graphs and charts can easily be visually misleading.

    • Data presented graphically must be critically analyzed to verify that visual representations accurately reflect underlying numeric values.

  • Example of a visually misleading graph:

    • A graph displaying run time ranges where a blue slice visually appears to be the largest section (occupying nearly a quarter or 25%25\% of the total display area).

    • Numeric analysis reveals that the yellow slice is actually the largest section at 12.6%12.6\%, or a slice labeled 10.21%10.21\% fails to match its visual proportions.

Frequency Distributions and Categorical Graphing Methods

  • Bar Charts:

    • Structure: Displays category names or labels on one axis (typically the x-axis) and frequency or relative frequency on the opposing axis (typically the y-axis).

    • Orientation: Can be rendered vertically or horizontally.

    • Structural Separation Rule: In a categorical bar chart, individual bars MUST NOT touch each other. This distinct gap differentiates bar charts from quantitative histograms, where bars touch.

    • Category Inclusion: Categorical datasets frequently incorporate an "Other" category to account for uncollected or remaining data points so that the total relative frequency equals 100%100\%.

    • Electricity Generation Example:

    • Categories include Coal, Hydroelectric, Nuclear, Natural Gas, Petroleum, and Other Renewable Sources.

    • Standard bar charts often require visual estimation of values relative to axis gridlines unless explicit numerical labels are provided.

  • Pie Charts:

    • Structure: Displays proportions as relative slices of a complete circle (100%100\%).

    • Displays precise numerical percentages directly alongside each corresponding category slice (e.g., Coal at 46.1%46.1\%, Petroleum at 1.2%1.2\%).

Desktop Conferencing Market Case Study

  • Dataset Context: A 20132013 report detailing market share for desktop conferencing applications.

  • Provided Market Share Data:

    • Cisco Systems: 58%58\% share

    • Citrix: 13%13\% share

    • Microsoft: 11%11\% share

  • Constructing the Relative Frequency Table:

    • Sum of provided market shares: 58%+13%+11%=82%58\% + 13\% + 11\% = 82\%

    • Calculated "Other" app category: 100%82%=18%100\% - 82\% = 18\%

    • Frequency Distribution Table:

    • Cisco: 58%58\% relative frequency (0.580.58

    • Citrix: 13%13\% relative frequency (0.130.13

    • Microsoft: 11%11\% relative frequency (0.110.11

    • Other: 18%18\% relative frequency (0.180.18

    • Total: 100%100\% (1.001.00

  • Graph Construction Rules:

    • Bar Chart: Place market categories on the horizontal axis (Cisco, Citrix, Microsoft, Other). Set vertical scale up to at least 58%58\% (e.g., intervals of 10%10\% up to 60%60\%). Ensure bars do not touch.

    • Pie Chart: Draw a circle with an approximate center point. Partition slices for Cisco (58%58\%), Other (18%18\%), Citrix (13%13\%), and Microsoft (11%11\%).

  • Examination Protocol Note: Exams consist of multiple-choice questions where manual graph construction is not required, but identifying correct graphs and reading graph data accurately is required.

Contingency Tables for Two Categorical Variables

  • Definition: A contingency table displays frequencies for two categorical variables simultaneously.

  • Structure:

    • Rows represent categories of one categorical variable.

    • Columns represent categories of the second categorical variable.

    • Cells contain joint frequencies (counts of cases meeting specific combined conditions of both variables).

    • Margins display row totals and column totals.

  • Proportions in Contingency Tables:

    • Joint Proportions (Relative Frequencies): Computed by dividing an individual cell frequency by the overall total sample size (NN) of the entire table.

    • Conditional Proportions: Computed by restricting/conditioning analysis to a specific row or column. That specific row total or column total becomes the denominator.

  • Rounding Conventions:

    • Proportions: Round to 44 decimal places (e.g., 0.56250.5625).

    • Percentages: Round to 22 decimal places (e.g., 56.25%56.25\%).

Optometry Customer Dataset and Joint vs. Conditional Probabilities

  • Optometry Dataset Summary:

    • Collected from an optometry shop with variables Gender (Male, Female) and Eye Condition (Nearsighted, Farsighted, Needs Bifocals).

    • Raw Contingency Table Data:

    • Nearsighted Row: Male = 66, Female = 44, Row Total = 1010

    • Farsighted Row: Male = 2020, Female = 1616, Row Total = 3636

    • Needs Bifocals Row: Male = 66, Female = 1212, Row Total = 1818

    • Column Totals: Male Total = 3232, Female Total = 3232, Overall Sample Total (NN) = 6464

  • Step-by-Step Probability Calculations:

    • Question 1: What percent of all customers are farsighted?

    • Denominator / Condition: All customers (N=64N = 64).

    • Numerator: Total farsighted customers (3636).

    • Proportion: 3664=0.5625\frac{36}{64} = 0.5625

    • Percentage: 56.25%56.25\%

    • Question 2: What percent of nearsighted customers are females?

    • Denominator / Condition: Nearsighted customers only (1010).

    • Numerator: Female nearsighted customers (44).

    • Proportion: 410=0.4000\frac{4}{10} = 0.4000

    • Percentage: 40.00%40.00\%

    • Question 3: What percent of all customers are nearsighted AND female?

    • Denominator / Condition: All customers (N=64N = 64).

    • Numerator: Nearsighted females overlapping cell (44).

    • Proportion: 464=0.0625\frac{4}{64} = 0.0625

    • Percentage: 6.25%6.25\%

    • Question 4: What percent of all customers are nearsighted OR female?

    • Denominator / Condition: All customers (N=64N = 64).

    • Logical Operator Distinctions:

      • "AND" requires meeting both categories simultaneously.

      • "OR" includes meeting either category or both categories.

    • Double-Counting Warning: Adding total nearsighted (1010) to total females (3232) equals 4242, which double-counts the 44 nearsighted females.

    • Calculation Method 1 (Inclusion-Exclusion): 10+32464=3864\frac{10 + 32 - 4}{64} = \frac{38}{64}

    • Calculation Method 2 (Sum of Non-Overlapping Cells): 6+4+16+1264=3864\frac{6 + 4 + 16 + 12}{64} = \frac{38}{64}

    • Proportion: 3864=0.593750.5938\frac{38}{64} = 0.59375 \approx 0.5938

    • Percentage: 59.38%59.38\%

Conditional Distributions by Category

  • Examination Calculator Requirements:

    • Calculators are required for exams to accurately compute decimals, proportions, and statistical functions.

  • Conditional Distribution of Eye Condition by Gender:

    • Conditioning by gender requires evaluating Male (N=32N = 32) and Female (N=32N = 32) columns independently as relative percentage distributions.

    • Male Conditional Distribution (N=32N = 32):

    • Nearsighted: 632=0.1875=18.75%\frac{6}{32} = 0.1875 = 18.75\%

    • Farsighted: 2032=0.6250=62.50%\frac{20}{32} = 0.6250 = 62.50\%

    • Needs Bifocals: 632=0.1875=18.75%\frac{6}{32} = 0.1875 = 18.75\%

    • Column Sum Verification: 18.75%+62.50%+18.75%=100.00%18.75\% + 62.50\% + 18.75\% = 100.00\%

    • Female Conditional Distribution (N=32N = 32):

    • Nearsighted: 432=0.1250=12.50%\frac{4}{32} = 0.1250 = 12.50\%

    • Farsighted: 1632=0.5000=50.00%\frac{16}{32} = 0.5000 = 50.00\%

    • Needs Bifocals: 1232=0.3750=37.50%\frac{12}{32} = 0.3750 = 37.50\%

    • Column Sum Verification: 12.50%+50.00%+37.50%=100.00%12.50\% + 50.00\% + 37.50\% = 100.00\%