Introduction to Statistical Variation, Quartiles, and Standardization

Review of Measures of Central Tendency and Sample Variance

  • Recap of Last Lecture: The discussion began with a review of mean, median, and mode, as well as the initial introduction to measuring variation through range and standard deviation.

  • Calculating Sample Variance (Method 1):

    • Step 1: Find the Sample Mean (xbarx_{bar}): In an example dataset containing 6 data points, the sample mean is identified as 5050.

    • Step 2: Calculate Deviations: For every data point (xix_i), subtract the sample mean. These are known as the deviations: (xixbar)(x_i - x_{bar}). Note that subscript ii refers to the number's position in the dataset list, not an interval.

    • Step 3: Calculate Squared Deviations: Multiply each deviation by itself to obtain the squared deviation: (xixbar)2(x_i - x_{bar})^2.

    • Step 4: Summation: Get the total sum of all squared deviations: (xixbar)2\sum (x_i - x_{bar})^2.

    • Step 5: Variance (s2s^2): Divide the summation of squared deviations by n1n - 1 (where nn is the sample size).

    • Step 6: Standard Deviation (ss): The standard deviation is the positive square root of the variance.

  • Alternative Formula for Variation:

    • A second way to calculate the sum of squared deviations is:     (xixbar)2=xi2n×(xbar)2\sum (x_i - x_{bar})^2 = \sum x_i^2 - n \times (x_{bar})^2

    • This formula can also be expressed as:     xi2(xi)2n\sum x_i^2 - \frac{(\sum x_i)^2}{n}

  • Interpreting Variation:

    • Standard deviation is the most widely used measure of variation.

    • The more the data is spread out, the larger the standard deviation will be.

    • City Comparison Example: In a comparison of two cities, City B (SBS_B) has a much larger standard deviation than City A (SAS_A). This implies that the data points for City B are distributed more widely than those in City A.

Linear Transformations of Data

  • Effect on Mean:

    • If a constant bb is added to every data point in a dataset (yi=xi+by_i = x_i + b), the new sample mean (ybary_{bar}) will increase by that same value bb.

  • Effect on Variance and Standard Deviation:

    • Additive Shifts: Shifting data points to the left or right by adding or subtracting a number does not change the spread or variation. Therefore, adding a constant does not affect the variance or standard deviation.

    • Multiplicative Scaling: Multiplying the data by a number does affect the variation. If you multiply by a large number (e.g., 22), the data becomes more spread out. If you multiply by a very small number, the data points become more clustered.

Quartiles and Interquartile Range (IQR)

  • Process for Finding Quartiles:

    • Step 1: Order the Data: Arrange all values in increasing order.

    • Step 2: Find the Median (Q2Q_2): Determine the middle value of the dataset. If there is an even number of data points (e.g., 1212), the median is the average of the two middle numbers.

    • Step 3: Divide into Halves: Split the ordered dataset into a bottom half and a top half.

      • If there is an odd number of data points (e.g., 77), exclude the median from both halves.

      • Example: For data points 3,4,5,5,6,7,83, 4, 5, 5, 6, 7, 8, the median is 55. The bottom half is 3,4,53, 4, 5 and the top half is 6,7,86, 7, 8.

    • Step 4: Find Q1Q_1: Calculate the median of the bottom half of the data.

    • Step 5: Find Q3Q_3: Calculate the median of the top half of the data.

  • The Interquartile Range (IQR):

    • The IQR is a measure of variation that is less affected by outliers than the range.

    • Formula: IQR=Q3Q1IQR = Q_3 - Q_1

Identifying Potential Outliers

  • Definition: Outliers are observations that fall far outside the overall pattern of the data, being either significantly larger or smaller than the rest of the points.

  • The 1.5 IQR Rule (Fences):

    • Potential outliers can be identified by building two "fences" (lower and upper limits).

    • Lower Limit: Q11.5×IQRQ_1 - 1.5 \times IQR

    • Upper Limit: Q3+1.5×IQRQ_3 + 1.5 \times IQR

    • Any data point falling outside these two limits is considered a potential outlier.

  • Example Calculations:

    • HILD Temperature Dataset:

      • Median (Q2Q_2): 70.570.5

      • Q1Q_1: Approximately 7070

      • Q3Q_3: 71.571.5

      • IQRIQR: 71.570=1.571.5 - 70 = 1.5

      • 1.5×IQR=2.251.5 \times IQR = 2.25 (Note: Transcript mentions 3.353.35, possibly a calculation variant or error).

    • Second Exercise:

      • Median (Q2Q_2): 278278

      • Q1Q_1: 268268

      • Q3Q_3: 301301

      • Data points such as 341341 may be checked against limits to see if they are potential outliers.

Five-Number Summary and Box Plots

  • Five-Number Summary:

    • The dataset is described using five specific values: Minimum, Q1Q_1, Median (Q2Q_2), Q3Q_3, and Maximum.

    • These numbers divide the data into four quarters, each containing 25%25\% of the observations.

  • Box Plots:

    • A visual tool to display the five-number summary and the variation within the data.

    • It is particularly useful for comparing several different samples or datasets.

    • Modified Box Plot: In a modified version, outliers are indicated with stars (*). Whiskers extend to the largest and smallest values that are not outliers.

Measures for Population Data

  • Statistics vs. Parameters:

    • Statistics: Measures calculated from a sample (e.g., sample mean xbarx_{bar}, sample variance s2s^2).

    • Parameters: Measures calculated from the entire population (e.g., population mean μ\mu, population variance σ2\sigma^2).

  • Notation Differences:

    • Mean: Sample is xbarx_{bar}; Population is μ\mu (mu).

    • Variance: Sample is s2s^2; Population is σ2\sigma^2 (sigma squared).

    • Standard Deviation: Sample is ss; Population is σ\sigma (sigma).

    • Size: Sample size is nn; Population size is NN.

  • Formula Difference for Variance:

    • For sample variance, the sum of squared deviations is divided by n1n - 1.

    • For population variance, the sum of squared deviations is divided by the total population size NN.

Standardization and Z-Scores

  • Standardized Variable (zz):

    • A standardized version of a variable xx is created to allow for fair comparisons between datasets with different units (e.g., meters vs. inches).

    • Formula: z=xμσz = \frac{x - \mu}{\sigma}

    • Centering: Subtracting the mean (μ\mu) ensures the new mean of the standardized data is 00.

    • Scaling: Dividing by the standard deviation (σ\sigma) ensures the new standard deviation of the standardized data is 11.

  • Interpreting Z-Scores:

    • If z=0z = 0, the value is equal to the mean (x=μx = \mu).

    • If z=2z = -2, the value is two standard deviations below the mean.

    • Example Calculation: Given μ=3\mu = 3 and σ=2\sigma = 2:

      • For a value xx: z-score=x32\text{z-score} = \frac{x - 3}{2}.

      • If the score is 00, xx is the mean.

      • Negative scores indicate the number of deviations below the mean.