Stat Lesson 2

Table of contents

  1. Visualization of Qualitative data
  2. Visualization of Quantitative data 2
  3. Measures of Center & Variability
  4. Measures of Position & Relative Standing
  5. Five Number Summary 5

1. Visualization of Qualitative data

Data cleaning is done to make data easier to analyze. It involves removing irrelevant data, checking data types, and standardizing formats.

It also includes deciding how to handle missing values, removing duplicate records, and correcting errors like misspellings or incorrect codes. Identifying unusual observations is also part of this process.

Minor inconveniences or known false information do not always require removal from the dataset 1.

A frequency table lists items, events, or values and the number of times each occurs. It provides a summary of data values for a single variable.

  • Classes: These are the categories used to sort the data, such as labels or unique identifiers.
  • Frequency: This is the total number of observations that fall into a specific class.
  • Relative frequency: This expresses the frequency of a specific value as a proportion of the total number of observations 1.

A bar chart displays frequency using the height or length of each bar. It compares the absolute or relative size of various categories.

The categories are typically shown on the x-axis, and the frequency is shown on the y-axis. A bar chart is generally preferred over a pie chart because it can display all the information more clearly 1.

📝 A frequency table for survey responses about favorite colors might list "Blue" with a frequency of 50, "Red" with 35, and "Green" with 20. A bar chart would then show three bars, with heights corresponding to these frequencies for each color 1.

2. Visualization of Quantitative data 2

A histogram is a plot used to show the underlying frequency distribution, or shape, of a set of continuous data. While it can be used for discrete variables, it is most commonly applied to continuous data.

Instead of showing individual values, a histogram displays a range of values, with boundaries serving as borders between values, meaning there is no gap present 1.

Properties of a distribution help describe its shape:

  • Skewness: This measures the symmetry of the distribution.
  • Symmetric distribution: The left and right sides are mirror images of each other.
  • Negatively skewed: The tail points toward lower scores, indicating a skew to the left.
  • Positively skewed: The tail points toward higher scores, indicating a skew to the right.
  • Kurtosis: This describes the clustering in the tails of a distribution.
  • Platykurtic (<0): Has too few observations in the tails, resulting in a flatter distribution.
  • Mesokurtic (=0): Represents a typical distribution shape with no extreme flatness or peakedness.
  • Leptokurtic (>0): Has too many observations in the tails, resulting in a more peaked distribution 2.
Skewness TypeDescription
SymmetricLeft and right sides are reflections of each other.
Negatively skewedTail points toward lower scores (left side).
Positively skewedTail points toward higher scores (right side).
Kurtosis TypeDescription
Platykurtic (<0)Too few observations in the tails; flat distribution.
Mesokurtic (=0)Typical distribution shape; neither too flat nor too peaked.
Leptokurtic (>0)Too many observations in the tails; too peaked distribution.

📝 A histogram of exam scores might show a positively skewed distribution if most students scored high, but a few scored very low, creating a tail to the left 2.

3. Measures of Center & Variability

Measures of center and variability are used to communicate large amounts of information in simple terms. They help identify what looks normal and odd, and allow for comparisons of data on the same variable across different groups 2.

Center measures attempt to describe an entire set of data with a single value, identifying its central position.

  • Mean: This measure uses all values in the dataset. Extreme values can pull the mean. It is used for quantitative data and is best for symmetric histograms.
  • Population mean (μ\mu): μ=∑XN\mu = \frac{\sum X}{N}
  • Sample mean (xˉ\bar{x}): xˉ=∑xn\bar{x} = \frac{\sum x}{n}.
  • Median: This is the middlemost value in a dataset that has been ordered. It divides the dataset into upper and lower halves and is resistant to outliers. It is used for quantitative data and is good for skewed histograms. For an even number of data points, it is the average of the two middle values. 2.
  • Mode: This measure uses the counts of categories or classes and is used for categorical/qualitative data. It is the value with the highest frequency. A dataset can be unimodal (1 mode), bimodal (2 modes), or multimodal (3+ modes) 3.

There is no single best measure of center; the choice depends on the type of data, the presence of outliers, the shape of the distribution, and what you are trying to show 3.

Measures of Variability, Dispersion, and Spread describe how far apart data points lie from each other and from the center of the distribution 3.

  • Range: This is the difference between the maximum and minimum values in the dataset.
  • Interquartile Range (IQR): This gives the range of the middle 50% of the data (Q3 - Q1). It is used for skewed histograms.
  • Variance: This measures how close scores in a distribution are to the mean. It magnifies the effect of outliers and is not in the same unit as the scores it represents.
  • Population variance (σ2\sigma^2): σ2=∑(xi−μ)2N\sigma^2 = \frac{\sum(x_i - \mu)^2}{N}
  • Sample variance (s2s^2): s2=∑(x−xˉ)2n−1s^2 = \frac{\sum(x - \bar{x})^2}{n-1}.
  • Standard Deviation: This is the square root of the variance. It represents the standard or typical difference between each data point and the mean. It is in the same unit as the scores it represents and is used for symmetric histograms 3.

Measures of center alone are insufficient to describe data because they only provide a single value, which can lead to discrepancies in understanding the data's spread 3.

📝 For the dataset the mean is 6, the median is 6, and the mode does not exist. The range is 8 (10-2). The standard deviation would quantify how spread out these numbers are around the mean of 6. 2 3 4 .

4. Measures of Position & Relative Standing

Measures of position, also known as relative standing, determine a value's position within a dataset compared to other values. This involves arranging the data in increasing order and finding where a data point would be located relative to others, or finding the value at a given position 4.

To find a data point's position:

  1. Arrange the data from lowest to highest.
  2. Solve for the position (cc) of the data point.
  3. Locate the data point at position cc.
  • If cc is a whole number, use the value halfway between the cthc^{th} and (c+1)th(c+1)^{th} values, counting up from the lowest value.
  • If cc is not a whole number, round up to the next whole number. Starting from the lowest value, count to the number corresponding to the rounded-up value 4.

Key characteristics include:

  • Median: The middlemost value that divides the dataset into two equal parts. It is denoted by η\eta or xˉ\bar{x}. When the mean is not appropriate, the median can represent the center as a position within the dataset. The position is calculated as c=n/2c = n/2.
  • Quartiles: These divide the dataset into four equal parts. There are three quartiles (Q1, Q2, Q3), which act as thresholds or cut-off points. The position is calculated as c=nQ/4c = nQ/4.
  • Deciles: These divide the dataset into ten equal parts. There are nine deciles (D1 to D9). The position is calculated as c=nD/10c = nD/10.
  • Percentiles: These divide the dataset into 100 equal parts. There are 99 percentiles (P1 to P99). The position is calculated as c=nP/100c = nP/100. 4 5.

📝 In the dataset the median (Q2) is 30. Q1 is 20, and Q3 is 40. The 75th percentile (P75) would be 40, as it divides the data into the lowest 75% and the highest 25% 4 .

5. Five Number Summary 5

The five-number summary provides a concise overview of a dataset's distribution. It consists of five key values: the smallest data value (minimum), the first quartile (Q1), the median (Q2), the third quartile (Q3), and the largest data value (maximum) 5.

A box plot is a graphical representation based on the five-number summary.

  • The length of the "whiskers" (tails) indicates the minimum and maximum values.
  • The edges of the box represent the first quartile (Q1) and the third quartile (Q3).
  • A line in the middle of the box marks the median (Q2) 5.

A box plot visually shows where the median is located relative to the rest of the data. Turning the graph clockwise can resemble a histogram.

If one side of the box plot has a long tail, it suggests a skewed distribution 5.

  • Upper fence: Q3 + 1.5 * IQR
  • Lower fence: Q1 - 1.5 * IQR
  • Outlier: A data point beyond the fences that is considered too extreme relative to the rest of the data set 5.
ComponentRepresents
MinimumSmallest data value
First Quartile (Q1)25th percentile; lower edge of the box
Median (Q2)50th percentile; middle line of the box
Third Quartile (Q3)75th percentile; upper edge of the box
MaximumLargest data value

📝 For the dataset the five-number summary is: Minimum=10, Q1=25, Median=40, Q3=55, Maximum=70. A box plot would show a box from 25 to 55, with a line at 40, and whiskers extending to 10 and 70 5 .

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also