Measures of Variability, Box Plots, Variance, and Bivariate Associations

Review of Central Tendency, Percentiles, and Measures of Variability

  • Measures of Central Tendency Overview:

    • Mode: The most frequently occurring score in a dataset.

    • Median: The exact middle score dividing an ordered dataset into two equal halves (50th50\text{th} percentile).

    • Mean: The arithmetic average calculated by summing all observations and dividing by total sample size (nn).

    • Trade-offs: Each measure possesses distinct advantages and disadvantages based on measurement scale and distribution properties.

    • Skew Indicator: Misalignment among mode, median, and mean provides direct evidence of asymmetrical distribution skew.

  • Percentiles:

    • Percentiles describe an observation's relative standing within a data distribution.

    • The median corresponds precisely to the 50th50\text{th} percentile, splitting the distribution so 50%50\% of scores fall below it and 50%50\% fall above it.

  • Measures of Variability:

    • Essential for understanding how data points spread around a central value.

    • Crucial for statistical inference to evaluate whether an observed score is typical or unusual.

    • Primary metrics include range, quartiles, interquartile range (IQR), variance, and standard deviation.

Quartiles and the Interquartile Range (IQR)

  • Division and Properties of Quartiles:

    • Continuous and ordered distributions can be divided into four equal subsets called quartiles.

    • Each quartile subset contains exactly 14\frac{1}{4} or 25%25\% of the sorted data.

    • 1st Quartile (Q1)1\text{st Quartile } (Q_1): The 25th25\text{th} percentile mark; 25%25\% of sorted values fall at or below this point.

    • 2nd Quartile (Q2)2\text{nd Quartile } (Q_2): The 50th50\text{th} percentile mark, corresponding exactly to the dataset median.

    • 3rd Quartile (Q3)3\text{rd Quartile } (Q_3): The 75th75\text{th} percentile mark; 75%75\% of sorted values fall at or below this point.

  • Interquartile Range (IQR) Definition and Formulas:

    • Definition: The range spanned by the middle 50%50\% of scores in a distribution.

    • Mathematical formula:     IQR=Q3−Q1IQR = Q_3 - Q_1

    • Percentile formula:     IQR=75th percentile−25th percentileIQR = 75\text{th percentile} - 25\text{th percentile}

    • Key Property: The IQR always contains approximately 50%50\% of the data points regardless of distribution shape or skewness.

    • Robustness: The IQR is highly robust to extreme scores because it ignores the lowest 25%25\% and highest 25%25\% of observations, making it insensitive to minimum and maximum value changes.

  • Discrete Dataset Example Calculation:

    • Unsorted data: [20, 10, 8, 202, 18, 40, 102, 9, 101, 100, 21, 22, 88, 7, 41, 42, 33] (n=17n = 17 observations).

    • Sorted data (Min to Max): 7, 8, 9, 10, 18, 20, 21, 22, 33, 40, 41, 42, 88, 100, 101, 102, 202.

    • Five key summary positions:

    • Minimum: 77

    • 1st Quartile (Q1)=181\text{st Quartile } (Q_1) = 18 (25%25\% threshold)

    • 2nd Quartile (Q2)=332\text{nd Quartile } (Q_2) = 33 (50%50\% threshold / Median)

    • 3rd Quartile (Q3)=883\text{rd Quartile } (Q_3) = 88 (75%75\% threshold)

    • Maximum: 202202

    • IQR calculation:     IQR=88−18=70IQR = 88 - 18 = 70

  • Cumulative Proportion Plot Example (Binocular Rivalry):

    • Investigates perceptual state duration in young adults during a binocular rivalry task.

Binocular Rivalry Cumulative Proportion Plot
  • Empirical percentile cutoffs derived from plot:

    • 25th25\text{th} percentile duration cutoff ≈0.80 s\approx 0.80\,\text{s}

    • 75th75\text{th} percentile duration cutoff ≈1.90 s\approx 1.90\,\text{s}

  • Interquartile Range calculation:     IQR=1.90 s−0.80 s=1.10 sIQR = 1.90\,\text{s} - 0.80\,\text{s} = 1.10\,\text{s}

Visualizing Distributions: Histograms, Box Plots, and Tukey's 5-Point Summary

  • Tukey's 5-Point Data Summary:

    • Provides a concise numeric snapshot of distribution location and spread.

    • Consists of five sequential markers:

    1. Minimum value

    2. 1st Quartile (Q1/25th percentile)1\text{st Quartile } (Q_1 / 25\text{th percentile})

    3. 2nd Quartile (Q2/50th percentile / Median)2\text{nd Quartile } (Q_2 / 50\text{th percentile / Median})

    4. 3rd Quartile (Q3/75th percentile)3\text{rd Quartile } (Q_3 / 75\text{th percentile})

    5. Maximum value

  • Anatomy and Construction of a Box Plot (Box-and-Whisker Plot):

    • Central Box: Drawn between Q1Q_1 (25th25\text{th} percentile) and Q3Q_3 (75th75\text{th} percentile), spanning the IQRIQR.

    • Median Line: A prominent line drawn inside the box at Q2Q_2.

    • Whiskers Boundary Rule: Whiskers extend outward from box edges to the most extreme data points that fall within 1.5×IQR1.5 \times IQR from box edges.

    • Lower whisker limit: Q1−(1.5×IQR)Q_1 - (1.5 \times IQR)

    • Upper whisker limit: Q3+(1.5×IQR)Q_3 + (1.5 \times IQR)

    • Outlier Rule: Individual observations falling more than 1.5×IQR1.5 \times IQR beyond upper or lower box edges are classified as outliers and plotted as standalone points.

Tukey 5-point summary on cat body weight box plot
  • Case Study: Body Weight of 146 Cats (fatCats dataset):

    • Sample size: n=146n = 146 cats.

    • Median body weight: 2700 g2700\,\text{g}

    • 1st Quartile (Q1)=2300 g1\text{st Quartile } (Q_1) = 2300\,\text{g}

    • 3rd Quartile (Q3)=3100 g3\text{rd Quartile } (Q_3) = 3100\,\text{g}

    • IQR=3100 g−2300 g=800 gIQR = 3100\,\text{g} - 2300\,\text{g} = 800\,\text{g}

    • 1.5×IQR=1.5×800 g=1200 g1.5 \times IQR = 1.5 \times 800\,\text{g} = 1200\,\text{g}

    • Lower whisker threshold: 2300 g−1200 g=1100 g2300\,\text{g} - 1200\,\text{g} = 1100\,\text{g} (whisker extends to lowest observation within threshold, 2000 g2000\,\text{g}).

    • Upper whisker threshold: 3100 g+1200 g=4300 g3100\,\text{g} + 1200\,\text{g} = 4300\,\text{g} (whisker extends to highest non-outlier observation within threshold, 3900 g3900\,\text{g}).

    • Identified Outliers: Data observations exceeding 4300 g4300\,\text{g} (plotted individually at 4500 g4500\,\text{g} and 4750 g4750\,\text{g}).

    • Full dataset overall range: [2000 g,4750 g][2000\,\text{g}, 4750\,\text{g}].

  • Case Study: Annual Canadian Lynx Trappings (1821–1934):

    • Historical wildlife record over a 114-year period.

    • Summary metrics:

    • Overall range: [39,6991][39, 6991] trappings.

    • 1st Quartile (25%)=2481\text{st Quartile } (25\%) = 248

    • 2nd Quartile (50%/Median)=7712\text{nd Quartile } (50\% / \text{Median}) = 771

    • 3rd Quartile (75%)=25663\text{rd Quartile } (75\%) = 2566

    • IQR=2566−248=2318IQR = 2566 - 248 = 2318

    • Graphically demonstrates a heavy right tail with extreme upper outliers.

  • Comparing Visual Capabilities of Histograms and Box Plots:

    • Histograms: Excellent for displaying overall distribution shape, modality, peaks, skew, and full range, but cannot clearly identify exact values for median or IQR.

    • Box Plots: Clearly identify median, quartiles, IQR, and extreme outliers, revealing distribution spread and skew across distinct structural types:

Box plot sensitivity to distribution spread and skew
- Symmetrical distribution with moderate IQR.
- Positively skewed distribution with moderate IQR.
- Negatively skewed distribution with moderate IQR.
- Positively skewed distribution with narrow IQR.
  • Major Limitation of Box Plots:

    • Box plots are not complete summaries of data.

    • Two separate datasets can produce completely identical box plots and share the exact same Tukey 5-point summary (minimum, Q1Q_1, median, Q3Q_3, maximum).

    • However, the underlying distributions between those 5 summary points can differ radically (e.g., a uniform flat distribution versus a strongly bimodal distribution with heavy clusters around test scores of 2525 and 7575).

Variance and Standard Deviation

  • Measuring Variability Around the Mean:

    • Quantifies how far data points spread from sample mean Yˉ\bar{Y}.

    • Flaw in Simple Average Deviation:

    • Intuitively, one might calculate average deviation:       ∑i=1n(Yi−Yˉ)n\frac{\sum_{i=1}^n (Y_i - \bar{Y})}{n}

    • Mathematical reality: The sum of simple deviations from the mean is always zero:       ∑i=1n(Yi−Yˉ)=0\sum_{i=1}^n (Y_i - \bar{Y}) = 0

    • Positive deviations (scores above mean) and negative deviations (scores below mean) always cancel each other out completely, regardless of dataset variability.

  • Demonstration of Zero Deviation Sum (R Computation):

    • Sample dataset: my.scores = [111, 112, 96, 106, 107, 105, 110, 97, 132, 108] (n=10n = 10 observations).

    • Sample mean: Yˉ=108.4\bar{Y} = 108.4

    • Deviations from mean (Yi−YˉY_i - \bar{Y}): 2.6, 3.6, -12.4, -2.4, -1.4, -3.4, 1.6, -11.4, 23.6, -0.4

    • Sum of deviations:     2.6+3.6+(−12.4)+(−2.4)+(−1.4)+(−3.4)+1.6+(−11.4)+23.6+(−0.4)=02.6 + 3.6 + (-12.4) + (-2.4) + (-1.4) + (-3.4) + 1.6 + (-11.4) + 23.6 + (-0.4) = 0

  • Sample Variance (s2s^2) Solution and Formula:

    • To eliminate cancellation, each deviation is squared prior to summation.

    • Formula for sample variance:     s2=∑i=1n(Yi−Yˉ)2n−1s^2 = \frac{\sum_{i=1}^n (Y_i - \bar{Y})^2}{n - 1}

    • Degrees of Freedom: The quantity (n−1)(n - 1) in the denominator represents degrees of freedom.

    • Relation to Average: Variance is almost equal to average squared deviation; if nn were used instead of (n−1)(n - 1), it would equal average squared deviation.

    • Worked Example using my.scores:

    • Squared deviations: 2.6^2 = 6.76, 3.6^2 = 12.96, (-12.4)^2 = 153.76, (-2.4)^2 = 5.76, (-1.4)^2 = 1.96, (-3.4)^2 = 11.56, 1.6^2 = 2.56, (-11.4)^2 = 129.96, 23.6^2 = 556.96, (-0.4)^2 = 0.16.

    • Sum of squared deviations: 882.4882.4

    • Variance calculation:       s2=882.410−1=882.49=98.04s^2 = \frac{882.4}{10 - 1} = \frac{882.4}{9} = 98.04

  • Mathematical Rationale for (n−1)(n - 1) Denominator (Unbiased Estimation):

    • Dividing by nn makes s2s^2 a biased estimator that systematically underestimates true population variance \sigma^2$.\n - Dividing by (n - 1)makesmakess^2an∗∗unbiasedestimator∗∗ofpopulationvariancean **unbiased estimator** of population variance\sigma^2$.

    • Over repeated sampling, the long-run expected mean value of s2s^2 calculated with (n−1)(n - 1) equals \sigma^2$.\n\n- Sample Standard Deviation (s):\n - Drawbacks of Variance:\n 1. Units are squared relative to original measurements (e.g., if Y_iisinis in\text{cm},,s^2isinis in\text{cm}^2).\n 2. Numerical values are often disproportionately larger than original deviation magnitudes.\n - Definition and formula for standard deviation:\n    s = \sqrt{s^2}\n - Advantages: Standard deviation returns variability to original measurement units and provides a scale consistent with deviations around the mean.\n - Example: Test score distribution with quartiles (90, 100, 110):\n - Variance: s^2 = 235.81\n - Standard deviation: s = 15.36\n\n- Sensitivity to Extreme Outliers:\n - Both variance (s^2)andstandarddeviation() and standard deviation (s) are highly sensitive to extreme outliers.\n - Example: M&M Contest Guessing Dataset:\n - Distribution with outlier: s^2 = 19833,,s = 141\n - Distribution without outlier: s^2 = 7661,,s = 87.5\n - Inclusion of a single extreme guess dramatically inflates both variance and standard deviation.\n\n- Limitations of Mean and Standard Deviation:\n - Distribution shapes are **not completely determined** by mean and standard deviation.\n - Example 1: Data Set 1 and Data Set 2 share identical mean (\bar{Y} = 100)andstandarddeviation() and standard deviation (s = 10), but Data Set 2 is symmetric bell-shaped while Data Set 1 is strongly positively skewed.\n - Example 2: Class 1 and Class 2 test scores both feature mean \bar{Y} = 65andstandarddeviationand standard deviations = 5, but differ fundamentally in **kurtosis**:\n - Class 1 exhibits **high kurtosis** (leptokurtic: tall central peak with heavy tails containing extreme high/low marks).\n - Class 2 exhibits **low kurtosis** (platykurtic: flat top with tightly bounded mark boundaries).\n\n# Summary of Variability Measures\n\n- Need for Variability Measures:\n - Required to comprehensively describe statistical distributions.\n - Essential for determining whether a specific observed score is statistically unusual.\n\n- Comparison of Common Spread Measures:\n - **Range**: Difference between max and min values; simplest measure, highly sensitive to extreme outliers.\n - **Interquartile Range (IQR)**: Middle 50\%span(span (Q_3 - Q_1); most robust measure against extreme outliers.\n - **Variance (s^2)andStandardDeviation() and Standard Deviation (s)**: Square and root measures of mean deviation; sensitive to outliers, but algebraically convenient for statistical formulas and foundational to inferential hypothesis tests.\n\n# Describing Associations Between Two Variables: Correlation and Regression\n\n- Shift to Bivariate Analysis:\n - Univariate plots (box plots, histograms) show distributions of individual variables in isolation, but cannot reveal how two variables interact or co-vary.\n\n- Classification of Bivariate Trends:\n - **Linear relationship**: Best fitted by a straight line.\n - **Curvilinear relationship**: Best fitted by a curved non-linear line.\n - **Monotonic trend**: As Xincreases,increases,Y continuously increases or continuously decreases without changing direction (can be linear or curvilinear).\n - **Non-monotonic trend**: As Xincreases,increases,Y changes direction at least once (e.g., inverted U-shape).\n\n![Classification of linear, curvilinear, monotonic, and non-monotonic trends](https://assets.knowt.com/pdf-flow-prod/811e0374-3720-4438-9b3d-70f21c48f5b3-figures/65.png)\n\n- Case Study 1: Major League Baseball (MLB) Team Wins & Team OPS (Data from Sept 16, 2024):\n - On Base Plus Slugging (OPS): Measures a team's combined ability to get on base and hit for power to score runs.\n - Empirical question: Is Team OPS associated with winning more games?\n - MLB Sample Data Table (30 Teams):\n - Arizona Diamondbacks (`ARI`): 83\,\text{Wins},,0.557\,\text{wPCT},,0.778\,\text{OPS}\n - Atlanta Braves (`ATL`): 81\,\text{Wins},,0.540\,\text{wPCT},,0.715\,\text{OPS}\n - Baltimore Orioles (`BAL`): 84\,\text{Wins},,0.560\,\text{wPCT},,0.751\,\text{OPS}\n - Chicago White Sox (`CHW`): 35\,\text{Wins},,0.233\,\text{wPCT},,0.619\,\text{OPS}\n - Philadelphia Phillies (`PHI`): 90\,\text{Wins},,0.604\,\text{wPCT},,0.751\,\text{OPS}\n - Univariate vs. Bivariate Representations:\n - Side-by-side box plots show spread of Wins and OPS individually, but fail to demonstrate their linkage.\n - Scatter plot with linear regression line (r = 0.8) reveals a strong, positive, linear relationship between Team OPS and Team Wins.\n\n![Scatter plot displaying linear relationship between Team OPS and Wins](https://assets.knowt.com/pdf-flow-prod/811e0374-3720-4438-9b3d-70f21c48f5b3-figures/60.png)\n\n- Case Study 2: Visual Acuity vs. Age in Human Infants:\n - Examines infant visual acuity development across studies by Salomão et al. (47) and Birch (43) (monocular, binocular, preterm-monocular).\n - Y-axis measures visual acuity in \text{logMAR}units;X−axismeasuresinfantageinweeks(frombirthtounits; X-axis measures infant age in weeks (from birth to160\,\text{weeks}).\n - Demonstrates a strong **curvilinear monotonic** trend (rapid initial decline in \text{logMAR} representing steep visual acuity improvement, gradually leveling off).\n - Empirical measurement methods:\n - Preferential looking / Teller acuity cards.\n - Visual Evoked Potentials (VEP): EEG electrodes attached to scalp over visual cortex measure electrical brain responses to visual stimuli on a monitor screen.\n\n- Case Study 3: Brightness Discrimination Thresholds (König, 1888):\n - Investigates differential brightness threshold sensitivity \frac{\delta r}{r}acrossvaryinglogbackgroundintensitiesacross varying log background intensities\text{LOG } r(range(range-2toto5).\n - Reveals a **curvilinear monotonic** trend that drops sharply at low background intensity levels before flattening; visual theories must account for this threshold-to-background relationship.\n\n- Case Study 4: Global Average Temperature (1850–2023):\n - Prepared by Berkeley Earth (land data) and UK Hadley Centre (ocean data), measuring global temperature anomalies relative to 1850–1900 average.\n - Plot includes vertical error bars indicating 95\% confidence intervals.\n - Displays a clear **curvilinear monotonic** upward trend in global temperature anomalies, accelerating significantly over recent decades to reach over +1.4\,^\circ\text{C}$$.