Comparing Distributions, Scatter Plots, Correlation, and Measures of Center

Comparing Distributions Using Frequency Polygons

  • Frequency Polygons Overview:

    • A frequency polygon is an alternative graphical representation of a quantitative dataset, serving a purpose similar to a histogram.
    • Overlapping multiple histograms on top of one another causes bars to hide each other, making comparisons difficult. Frequency polygons utilize line segments connecting class midpoints, allowing multiple distributions to be plotted on the same graph for comparative analysis.
  • Dataset Structure:

    • The dataset comparing distributions contains test scores for hypothetical students across two separate classes: Class A and Class B.
    • Each class dataset consists of test scores for 200200 students.
  • Step-by-Step Construction of Frequency Distributions in Excel:

    • Raw datasets cannot be plotted directly as a frequency polygon; a frequency distribution must be created first by grouping quantitative data into class intervals (bins).
    • Class A Frequency Distribution Procedure:
    1. Navigate to the Data tab in Excel and select Data Analysis.
    2. Choose Histogram from the analysis tools menu.
    3. Set the Input Range to the raw data column for Class A (Column B).
    4. Set the Bin Range to the predetermined bin values (upper class limits) to ensure consistency across both datasets.
    5. Select an appropriate Output Range on the spreadsheet and execute the command.
    • Class B Frequency Distribution Procedure:
    1. Reopen the Histogram tool in Data Analysis.
    2. Set the Input Range to the raw data column for Class B (Column C).
    3. Set the Bin Range to the exact same bin range used for Class A.
    4. Select a distinct Output Range adjacent to the Class A output table.
  • Preparing Data for Frequency Polygons (Zero-Frequency Anchors):

    • Excel automatically generates a row labeled "More" at the end of a histogram output, which is irrelevant when bins are explicitly defined and should be ignored or set to zero.
    • To ensure the frequency polygon line grounds properly to the horizontal axis at both ends, extra midpoints with a frequency of 00 must be added at the top and bottom of each frequency distribution table.
    • Given class interval gaps of 1010 units:
    • Add an upper bin/midpoint of 2020 with a frequency of 00 at the top of the range.
    • Add a lower bin/midpoint of 110110 with a frequency of 00 at the bottom of the range.
  • Plotting Combined Frequency Polygons in Excel:

    • Place the frequency columns for Class A and Class B side-by-side in separate adjacent columns (stacking them in the same column will confuse Excel's plotting mechanism).
    • Select the first frequency column, hold down the Ctrl key, and select the second frequency column simultaneously.
    • Go to Insert →\rightarrow Charts →\rightarrow Line Graph (select the 2D Line option without overlapping markers).
    • Modifying the Horizontal (X) Axis Labels:
    • By default, Excel labels the X-axis with sequential integers (1,2,3,...,101, 2, 3, \text{...}, 10).
    • Right-click the chart, choose Select Data, and navigate to Horizontal (Category) Axis Labels.
    • Click Edit, select the actual bin/midpoint range (2020 through 110110), and press OK to apply test score values to the X-axis.
  • Comparative Interpretation of Distributions:

    • Performance Comparison:
    • In the upper test score range of 6565 to 100100, Class B exhibits higher frequencies than Class A, showing that a greater number of students in Class B achieved high scores.
    • In the lower test score ranges, Class A shows higher student frequencies than Class B.
    • Overall comparative conclusion: Class B demonstrated superior performance relative to Class A.
    • Distribution Shapes:
    • Class B is left-skewed (negatively skewed), as its higher frequency concentration sits to the right with a tail extending leftward toward lower scores.
    • Class A is slightly right-skewed (positively skewed) or roughly bell-shaped/normal with a mild rightward tail.

Bivariate Data and Scatter Plots

  • Transition to Bivariate Analysis:

    • Univariate data analysis involves visualizing single quantitative variables (e.g., frequencies plotted on the Y-axis against class bins on the X-axis).
    • Bivariate data analysis evaluates the relationship between two quantitative variables or two distinct datasets simultaneously.
  • Definition of Scatter Plot:

    • A scatter plot (or scatter diagram) is a plot of paired quantitative (x,y)(x, y) data values drawn on a two-dimensional Cartesian coordinate system.
    • The horizontal axis (X-axis) represents the independent variable (xx), and the vertical axis (Y-axis) represents the dependent variable (yy).
    • Each distinct point on the graph represents one single paired measurement (x,y)(x, y).
  • Concept of Correlation:

    • A correlation exists between two variables when the values of one variable are somehow associated with the values of the other variable.
    • Correlation vs. Causation:
    • A statistical correlation between two variables does not imply that changes in one variable cause changes in the other.
    • Classic Example: Standardized municipal surveys demonstrate a strong positive correlation between average monthly per-person ice cream consumption and the total number of drowning deaths per city. However, eating ice cream does not cause drowning; both variables are independently influenced by an unobserved confounder (warm seasonal weather).
  • Definition of Linear Correlation:

    • A linear correlation exists between two variables when there is a correlation such that the plotted points in a scatter plot approximate a straight-line pattern.

Visualizing and Interpreting Patterns in Scatter Plots

  • Primary Scatter Plot Patterns:

    • Positive Linear Correlation: Points form a general pattern extending from bottom-left to top-right, indicating that as xx increases, yy tends to increase.
    • Negative Linear Correlation: Points form a general pattern extending from top-left to bottom-right, indicating that as xx increases, yy tends to decrease.
    • Nonlinear Correlation: Points exhibit a clear, distinct structural pattern (such as a quadratic curve or wave), but the pattern cannot be approximated by a single straight line.
    • No Correlation: Points are randomly dispersed across the plane with no discernible directional trend or mathematical pattern.
  • Three Essential Questions for Scatter Plot Evaluation:

    1. Is there a visible pattern among the plotted points?
    2. If a pattern exists, is it linear (formable by a straight line)?
    3. Are there significant gaps or distinct clusters present in the data?
  • Clusters and Gaps (Special Diagnostic Patterns):

    • The presence of distinct clusters separated by wide gaps can create an illusion of a global linear pattern when no true linear relationship exists across the entire domain.
    • Case Study (Penny Weights vs. Year of Manufacture):
    • A scatter plot analyzing weight against the year of manufacture for 7272 U.S. pennies displays two distinct, dense horizontal clusters separated by a sharp vertical gap near the year 19831983.
    • Interpretation: Pennies manufactured prior to 19831983 maintain a higher weight cluster, whereas pennies manufactured after 19831983 belong to a lower weight cluster (due to a change in metallic alloy composition made by the U.S. Mint).
    • Conclusion: There is no continuous linear correlation between manufacture year and weight; the apparent grouping is caused purely by a structural policy change in 19831983.
  • Evaluating Dataset Types in Excel:

    • Using the correlation types dataset exercise workbook:
    1. Select the entire paired dataset (x,y)(x, y).
    2. Navigate to Insert →\rightarrow Scatter (select the first style with markers only, omitting all connecting lines).
    3. Customize graph components by adding explicit titles and naming the primary horizontal axis (xx) and primary vertical axis (yy).
    • Classified Dataset Profiles:
    • Dataset 1: Clear positive linear correlation.
    • Dataset 2: Weak positive linear correlation (points display significant vertical spread around a subtle upward trend).
    • Dataset 3: Strong negative linear correlation.
    • Dataset 4: No correlation (points scattered uniformly without directional bias).
    • Dataset 5: Nonlinear correlation (points follow a clear curved trajectory).
    • Dataset 6: Clustered data / No single linear correlation (points form separate groups isolated by spatial gaps).

Quantifying Linear Relationships: Correlation Coefficient and Regression

  • Linear Correlation Coefficient (rr):

    • The linear correlation coefficient rr measures the strength and direction of a linear association between two quantitative variables.
    • The value of rr is strictly bounded within the closed interval: −1 ≤ r ≤ 1-1 \text{ ≤ } r \text{ ≤ } 1
    • Scale Interpretation:
    • r=+1r = +1: Perfect positive linear correlation.
    • r=−1r = -1: Perfect negative linear correlation.
    • r values close to +1 or −1r \text{ values close to } +1 \text{ or } -1 (e.g., r=0.95r = 0.95 or r=−0.95r = -0.95): Strong positive or strong negative linear correlation (points cluster tightly along a line).
    • r values around 0.5 or −0.5r \text{ values around } 0.5 \text{ or } -0.5: Weak positive or weak negative linear correlation.
    • r=0r = 0: Absolute absence of linear correlation.
  • Concept of P-Value in Correlation Analysis:

    • The P-valueP\text{-value} associated with a correlation analysis indicates the probability that the observed linear sample correlation rr occurred purely by random chance rather than an underlying population relationship.
  • Regression Line and Least-Squares Method:

    • Regression Line: The definitive straight line that mathematically best fits the scatter plot of paired data points (also designated as the line of best fit).
    • Least-Squares Property: The mathematical criteria used to construct a regression line such that the sum of the squared vertical distances (residuals) between individual scatter plot data points and the line itself is minimized.

Measures of Center: The Mean

  • Definition of Measure of Center:

    • A measure of center is a representative value that indicates the central or middle point of a statistical quantitative dataset.
  • The Arithmetic Mean:

    • The mean (or arithmetic average) is computed by summing all individual data values in a dataset and dividing the cumulative sum by the total count of data values.
  • Mathematical Notation:

    • ∑\sum: Capital Greek letter sigma, representing the sum of a set of values.
    • xx: Variable used to represent individual raw data values.
    • nn: Represents the total number of data values in a sample.
    • NN: Represents the total number of data values in a population.
    • xˉ\bar{x}: Symbol denoting the sample mean (pronounced "x-bar").
    • μ\mu: Lowercase Greek letter mu, denoting the population mean.
  • Mathematical Formulas:

    • Sample Mean Formula:     xˉ=∑xn\bar{x} = \frac{\sum x}{n}
    • Population Mean Formula:     μ=∑xN\mu = \frac{\sum x}{N}
  • Step-by-Step Calculation Example 1:

    • Consider an initial sample dataset of n=11n = 11 values:     25,30,30,35,35,35,40,40,40,45,7525, 30, 30, 35, 35, 35, 40, 40, 40, 45, 75
    • Step 1: Compute the sum of all data values:     ∑x=25+30+30+35+35+35+40+40+40+45+75=430\sum x = 25 + 30 + 30 + 35 + 35 + 35 + 40 + 40 + 40 + 45 + 75 = 430
    • Step 2: Divide the sum by n=11n = 11:     xˉ=43011≈39.1\bar{x} = \frac{430}{11} \approx 39.1
  • Step-by-Step Calculation Example 2 (Adding an Extreme Value):

    • Modify the sample dataset by appending a single extreme value (20002000), yielding n=12n = 12 values:     25,30,30,35,35,35,40,40,40,45,75,200025, 30, 30, 35, 35, 35, 40, 40, 40, 45, 75, 2000
    • Step 1: Compute the new sum of all data values:     ∑x=430+2000=2430\sum x = 430 + 2000 = 2430
    • Step 2: Divide by the new total count n=12n = 12:     xˉ=243012=202.5\bar{x} = \frac{2430}{12} = 202.5
  • Drawback of the Mean (Lack of Resistance to Outliers):

    • An outlier (or extreme value) is an observation that lies an abnormal distance away from other values in a random sample.
    • Including a single extreme value (20002000) pulled the calculated mean from 39.139.1 to 202.5202.5, a value higher than 1111 out of the 1212 total data points in the set.
    • Consequently, the mean is not resistant to outliers, making it a misleading measure of center when applied to heavily skewed datasets or datasets containing extreme outliers.
  • Key Properties of the Mean:

    1. Sampling Stability: Sample means drawn independently from the same general population tend to vary far less than other measures of center.
    2. Inclusivity: The calculation of the mean incorporates every single data value in the dataset.

Measures of Center: The Median

  • Definition of Resistant Statistics:

    • A statistical measure is considered resistant if its numerical value is not substantially affected or altered by the presence of extreme data values (outliers).
    • The mean is non-resistant; the median is resistant.
  • The Median:

    • The median is the measure of center that represents the exact middle value when raw quantitative data values are arranged in order of ascending (or descending) magnitude.
    • Notation: x~\tilde{x} (pronounced "x-tilde").
  • Algorithmic Rules for Calculating the Median:

    1. Sort all raw data values in ascending order from lowest to highest.
    2. If the total count of data values (nn) is ODD:
    • Select the single data value positioned in the exact geometric center of the ordered list.
    1. If the total count of data values (nn) is EVEN:
    • Identify the two central data values located in the middle of the ordered list.
    • Calculate the arithmetic mean (midpoint) of these two central numbers.
  • Step-by-Step Calculation Examples:

    • Example 1 (n=11n = 11, Odd Count):
    • Ordered dataset:       25,30,30,35,35,35,40,40,40,45,7525, 30, 30, 35, 35, \mathbf{35}, 40, 40, 40, 45, 75
    • The 6th6\text{th} value isolates 55 values to its left and 55 values to its right.
    • x~=35\tilde{x} = 35
    • Example 2 (n=12n = 12, Even Count with Outlier 20002000):
    • Ordered dataset:       25,30,30,35,35,35,40,40,40,45,75,200025, 30, 30, 35, 35, \mathbf{35}, \mathbf{40}, 40, 40, 45, 75, 2000
    • The two central numbers located at positions 66 and 77 are 3535 and 4040
    • Calculate the mean of these two middle values:       x~=35+402=37.5\tilde{x} = \frac{35 + 40}{2} = 37.5
  • Comparing Outlier Impact (Mean vs. Median):

    • When the outlier 20002000 was introduced, the mean shifted drastically from 39.139.1 to 202.5202.5.
    • In contrast, the median shifted only slightly from 3535 to 37.537.5, staying squarely within the core cluster of the data set.
    • This proves that the median successfully resists the distortion caused by extreme values.
  • Key Properties of the Median:

    1. Outlier Resistance: The median is resistant to extreme outliers, making it the ideal measure of center for skewed distributions or datasets containing severe extreme values.
    2. Selective Inclusion: The median does not directly incorporate the magnitude of every individual data point; it relies primarily on data placement and position, taking into account at most the value of the one or two middle numbers.