In statistical analysis, we don't always have access to raw data; often, information is already summarized in frequency distributions. Furthermore, knowing the average isn't enough—we often need to know where a specific value stands in relation to others or if there are extreme values distorting the picture. Here is how statisticians handle grouped data, measure position, and visualize results.

Working with Grouped Data and Weighted Means

When data is already grouped into classes, we cannot calculate the exact mean or standard deviation, but we can approximate them. To approximate the mean, we use the midpoint of each class ($x_i$) multiplied by the frequency of that class ($f_i$).

A related concept is the weighted mean, which is used when certain values count more than others—such as calculating a Grade Point Average (GPA) where courses have different credit hours. The weighted mean is found by multiplying each value by its corresponding weight, summing these products, and dividing by the sum of the weights.

Measures of Position: Z-Scores and Percentiles

To understand how a specific data value compares to the rest of the set, we use measures of position.

  • Z-Scores: A z-score represents the distance a data value is from the mean in terms of the number of standard deviations. It is unitless, having a mean of 0 and a standard deviation of 1. This allows for the comparison of performance across different tests or metrics.
  • Percentiles: The $k^{th}$ percentile ($P_k$) is a value such that $k$ percent of observations are less than or equal to it. For example, being in the 74th percentile on an SAT exam means you scored higher than or equal to 74% of test-takers.

Quartiles and the Interquartile Range (IQR)

Quartiles divide data sets into four equal parts:

  • First Quartile ($Q_1$): Separates the bottom 25% from the top 75%.
  • Second Quartile ($Q_2$): Equivalent to the median (50th percentile).
  • Third Quartile ($Q_3$): Separates the bottom 75% from the top 25%.

The Interquartile Range (IQR) is the difference between the third and first quartiles ($Q_3 - Q_1$). It represents the range of the middle 50% of the observations. When data is highly skewed or contains extreme observations, the median and IQR are preferred over the mean and standard deviation because they are resistant measures.

Detecting Outliers and Exploratory Data Analysis

Outliers are extreme observations resulting from chance, errors, or sampling issues. To objectively identify them, we establish "fences" using the IQR:

  • Lower Fence: $Q_1 - 1.5(IQR)$.
  • Upper Fence: $Q_3 + 1.5(IQR)$.

Any data value falling outside these fences is considered an outlier.

These tools lead us to Exploratory Data Analysis (EDA), a term coined by statistician John Tukey. A primary tool of EDA is the Five-Number Summary, which consists of the minimum, $Q_1$, median, $Q_3$, and maximum. This summary is visualized using a boxplot, where a box encloses the quartiles, "whiskers" extend to the non-outlier extremes, and outliers are marked with asterisks. Boxplots are excellent for visualizing skewness; for instance, if the right whisker is longer and the median is left of center, the distribution is skewed right.