Descriptive Statistics, Graphical Representations, and Contingency Table Analysis

Effect of Data Values on Standard Deviation

  • Kelly's Homework Assignment Data:

    • Summary statistics calculated from Kelly's first 77 homework assignments:
      • Sample Mean (xˉ\bar{x}): 27.7127.71
      • Sample Standard Deviation (ss): 6.346.34
    • Standard Deviation as a Measure of Spread:
      • Standard deviation quantifies the dispersion or spread of individual data points relative to a central typical value (such as the mean or median).
      • It represents the typical distance of data values from the mean. For example, in an exam with a mean score of 90%90\%, a score of 60%60\% represents a large deviation or spread from the typical value.
  • Determining the Impact of Additional Data Values on Standard Deviation:

    • Rather than manually recalculating the standard deviation formula or re-entering data into a calculator for every new observation, an interval-based method can determine whether a new score increases or decreases the standard deviation.
    • Interval Construction Method (μ±σ\mu \pm \sigma):
      • Calculate the bounds for one standard deviation around the mean:
        • Lower Bound=Mean−Standard Deviation=27.71−6.34=21.37\text{Lower Bound} = \text{Mean} - \text{Standard Deviation} = 27.71 - 6.34 = 21.37
        • Upper Bound=Mean+Standard Deviation=27.71+6.34=34.05\text{Upper Bound} = \text{Mean} + \text{Standard Deviation} = 27.71 + 6.34 = 34.05
      • This establishes three distinct region intervals:
        1. Interval 1 (Below 1 SD):x<21.37\text{Interval 1 (Below } 1\,SD\text{)}: x < 21.37
        2. Interval 2 (Within 1 SD):21.37≤x≤34.05\text{Interval 2 (Within } 1\,SD\text{)}: 21.37 \le x \le 34.05
        3. Interval 3 (Above 1 SD):x>34.05\text{Interval 3 (Above } 1\,SD\text{)}: x > 34.05
  • Rules for Increasing vs. Decreasing Standard Deviation:

    • Decreasing Standard Deviation: Any new data value falling within one standard deviation of the mean ([21.37,34.05][21.37, 34.05]) pulls the overall spread closer to the center, thereby decreasing the standard deviation.
    • Increasing Standard Deviation: Any new data value falling outside or beyond one standard deviation of the mean (<21.37< 21.37 or >34.05> 34.05) adds relative spread to the dataset, thereby increasing the standard deviation.
  • Evaluation of Specific Homework Scores:

    • Score of 4141: Lies in Interval 3 (41>34.0541 > 34.05) →\rightarrow Increases standard deviation.
    • Score of 2626: Lies in Interval 2 (21.37≤26≤34.0521.37 \le 26 \le 34.05) →\rightarrow Decreases standard deviation.
    • Score of 4646: Lies in Interval 3 (46>34.0546 > 34.05) →\rightarrow Increases standard deviation.
    • Score of 2222: Lies in Interval 2 (21.37≤22≤34.0521.37 \le 22 \le 34.05) →\rightarrow Decreases standard deviation.

Matching Boxplots to Histograms and Estimating Standard Deviation

  • Technique for Matching Boxplots and Histograms:

    • Compare the extreme values (range) of the distribution between the two graphical representations:
      • Identify the minimum (smallest value) and maximum (largest value) on the horizontal axis of the histogram.
      • In a vertical boxplot, locate the lower boundary or whisker (minimum value) and upper boundary or whisker/outlier (maximum value).
      • Match the histogram to the boxplot displaying the closest corresponding minimum and maximum values.
    • Golf Ball Brand Example:
      • Unlabeled histogram feature bounds: minimum value near 2525, maximum value near 6060
      • Comparison across brand boxplots (Nike, Callaway, etc.):
        • Drawing a horizontal line from the histogram minimum (2525) intersects the Nike boxplot lower boundary.
        • Drawing a horizontal line from the histogram maximum (6060) aligns with the top height of the Nike boxplot distribution.
        • Result: The histogram uniquely corresponds to the Nike boxplot.
  • Shortcut Formula for Estimating Standard Deviation from a Histogram:

    • When precise summary statistics are unavailable, standard deviation can be estimated directly from a histogram using the range rule of thumb:         Estimated Standard Deviation=Range6=Maximum−Minimum6\text{Estimated Standard Deviation} = \frac{\text{Range}}{6} = \frac{\text{Maximum} - \text{Minimum}}{6}
    • Theoretical Rationale:
      • In a symmetric distribution, substantially all data falls within 33 standard deviations on either side of the mean (μ±3σ\mu \pm 3\sigma).
      • Dividing the total span into 66 equal standard deviation intervals covers approximately the entire spread of the data.
    • Sample Calculation:
      • Maximum=60\text{Maximum} = 60
      • Minimum=25\text{Minimum} = 25
      • Range=60−25=35\text{Range} = 60 - 25 = 35
      • Estimated Standard Deviation=356≈5.8\text{Estimated Standard Deviation} = \frac{35}{6} \approx 5.8

Comparative Analysis of Boxplots and Skewness Relationships

  • Comparing Interquartile Range (IQR) Visually:

    • IQR=Q3−Q1\text{IQR} = Q_3 - Q_1 (Upper Quartile minus Lower Quartile).
    • On a boxplot, IQR is physically represented by the vertical height (or horizontal length) of the central box.
    • Comparison: Comparing Callaway vs. Nike boxplots shows that the box height for Callaway is visibly taller than the box height for Nike. Consequently, IQRCallaway>IQRNike\text{IQR}_{\text{Callaway}} > \text{IQR}_{\text{Nike}}.
  • Evaluating Maximum Values with Outliers:

    • When identifying the absolute maximum value of a distribution from a boxplot, individual outlier points plotted beyond the whiskers represent the true maximum data values.
    • If an outlier exists above the upper whisker, the outlier point dictates the maximum value rather than the top whisker itself.
  • Determining Skewness and the Relationship Between Mean and Median:

    • While the median (Q2Q_2) is explicitly drawn as a line inside a boxplot, the mean is not directly displayed. The relationship between mean and median is determined by inspecting the skewness of the boxplot:
      • Right-Skewed Distribution:
        • The upper section of the box (between median Q2Q_2 and upper quartile Q3Q_3) is noticeably larger/wider than the lower section (between Q1Q_1 and median Q2Q_2), or the upper whisker/tail is longer.
        • Extreme larger values pull the mean upward.
        • Mathematical Relationship: Mean>Median\text{Mean} > \text{Median}.
      • Left-Skewed Distribution:
        • The lower section of the box (between Q1Q_1 and median Q2Q_2) is larger than the upper section, or the lower whisker/tail is longer.
        • Extreme smaller values pull the mean downward.
        • Mathematical Relationship: Mean<Median\text{Mean} < \text{Median}.
      • Symmetrical Distribution:
        • The median line divides the box into equal upper and lower halves.
        • Mathematical Relationship: Mean=Median\text{Mean} = \text{Median}.
    • Application to Nike Brand Data:
      • The upper portion of the Nike box is larger than the lower portion above the median line, indicating a right-skewed distribution.
      • Conclusion: For Nike, Mean>Median\text{Mean} > \text{Median}.
  • Comparing Proportions of Data from Boxplots:

    • By definition of quartiles:
      • Proportion of data above the median (Q2)=50% or 0.50\text{Proportion of data above the median } (Q_2) = 50\% \text{ or } 0.50
      • Proportion of data below the median (Q2)=50% or 0.50\text{Proportion of data below the median } (Q_2) = 50\% \text{ or } 0.50
    • Example (Comparing Customer Age relative to 40 years old):
      • For Callaway customers, age 4040 aligns exactly with the median (Q2Q_2) line. Therefore, exactly 50%50\% of Callaway customers are older than 4040
      • For Nike customers, the line representing age 4040 lies above the median line (Q2Q_2). Therefore, the proportion of Nike customers older than 4040 is less than 50%50\% (<0.50< 0.50).
      • Conclusion: The proportion of Callaway customers older than 4040 (50%50\%) is greater than the proportion of Nike customers older than 4040 (<50%< 50\%).

Visualizing Categorical Data and Sample Statistics

  • Distinguishing Graphical Tools by Data Type:

    • Numerical (Quantitative) Variables: Visualized using dot plots, histograms, and boxplots.
    • Categorical (Qualitative) Variables: Visualized using bar graphs, pie charts, and mosaic plots (for two categorical variables).
  • Bar Graphs for Categorical Data:

    • Displays individual categories along one axis and counts/frequencies along the opposing axis.
    • The height of each bar represents the total frequency (number of observations) falling into that specific category.
    • Ames, Iowa Housing Dataset Example:
      • Variables: Exterior material (Vinyl Siding, Wood Siding, Brick Face, Cement Board) and Overall Quality Rating (High, Good, Fair, Poor).
      • Most Common Category: Identified by the tallest bar (Vinyl Siding).
      • Least Common Category: Identified by the shortest bars (Brick Face and Cement Board).
      • Frequency Estimation: High overall quality rating category corresponds to approximately 88 homes out of a total sample of 4545 homes.
  • Categorical Proportions and Notation:

    • A proportion represents the fraction of observations falling into a specific category:         Proportion=Count in CategoryTotal Number of Observations (Cases)\text{Proportion} = \frac{\text{Count in Category}}{\text{Total Number of Observations (Cases)}}
    • Notation Distinction between Sample and Population:
      • p^\hat{p} ("p-hat"): Represents the sample proportion calculated from observed sample data.
      • pp: Represents the true population proportion for the entire population parameter.
    • Sample Proportion Calculations:
      • High Quality Rating Homes: p^=845≈0.178\hat{p} = \frac{8}{45} \approx 0.178
      • Wood Siding Homes: p^≈0.30\hat{p} \approx 0.30 (30%30\%) based on bar height relative to total sample size.

Contingency Tables and Two-Way Categorical Relationships

  • Evaluating Relationships Between Two Categorical Variables:

    • To determine whether two categorical variables are related or associated, evaluate whether Variable A is independent of Variable B.
    • Contingency Table (Two-Way Table):
      • A grid format used to summarize bivariate categorical data.
      • Rows represent the categories of one variable (e.g., Early Class status).
      • Columns represent the categories of a second variable (e.g., Class Year).
      • Cells contain joint counts (frequencies) for each combination of categories.
  • Student Survey Dataset Example:

    • Sample Size: 253253 randomly selected students surveyed regarding class schedules and academic year.
    • Variables: Early Class status (No Early Class vs. Early Class) and Class Year (Freshman, Sophomore, Junior, Senior).
    • Joint and Marginal Counts from Table:
      • Total students surveyed = 253253
      • Total students with an early class = 168168
      • Freshmen with no early class = 88
      • Freshmen with an early class = 3939
      • Total Freshmen surveyed = 4747 (8+39=478 + 39 = 47)
      • Seniors with an early class = 3232
    • Proportion Calculations:
      • Overall proportion of surveyed students with an early class:             p^overall=168253≈0.664\hat{p}_{\text{overall}} = \frac{168}{253} \approx 0.664
      • Proportion of Freshmen with an early class:             p^Freshmen=3947≈0.830\hat{p}_{\text{Freshmen}} = \frac{39}{47} \approx 0.830

Mosaic Plots and Testing for Independence

  • Mosaic Plot Construction:

    • A mosaic plot displays bivariate categorical data using stacked rectangular segments.
    • Vertical Columns: Each column represents a category of the primary explanatory variable (e.g., Class Year: Freshman, Sophomore, Junior, Senior). The width of each column reflects the relative sample size of that category.
    • Stacked Segments: Each column is divided vertically into stacked segments representing the proportion of subcategories for the second variable (e.g., Early Class vs. No Early Class).
  • Determining Association vs. Independence from a Mosaic Plot:

    • Associated (Dependent) Variables:
      • If the vertical segment heights for a specific response category differ noticeably across the primary variable's columns, the two variables are associated (a relationship exists).
      • Class Schedule Example: Freshmen have a significantly higher proportion segment for early classes (p^≈0.83\hat{p} \approx 0.83) compared to Sophomores, Juniors, and Seniors. Because segment heights vary across years, Class Year and Early Class status are associated.
    • Independent Variables:
      • If the vertical segment heights for each category remain identical or equal across all columns of the primary variable, the variables are independent (no relationship exists).
  • Political Affiliation and Iraq War Support Example:

    • Variables: Political Affiliation (Democrat, Independent, Republican) and Iraq War Support (Support vs. Oppose).
    • Mosaic Plot Observation: Comparing the blue "Support" segment heights across columns reveals distinct differences between Democrats, Independents, and Republicans.
    • Conclusion: Iraq War Support and Political Affiliation are associated (dependent).