Describing data: types, tables, and graphs
Statistics begins by organising raw data so patterns become visible. The right summary depends on what kind of data you have.
What statistics is for
Statistics is the science of learning from data in the presence of variability. Descriptive statistics summarise the data you have; inferential statistics use a sample to draw conclusions about a larger population. A population is the whole group of interest, such as all voters in a country; a sample is the part you actually measure, such as 1,000 surveyed voters.
Types of variables
Categorical (qualitative) variables place individuals into groups, such as blood type or favourite app. Quantitative variables are numbers you can do arithmetic with, such as height or income. Quantitative variables can be discrete (counts, like the number of siblings) or continuous (measurements, like time). The variable type decides which graphs and summaries make sense.
Graphs for categorical data
Bar charts show the count or percentage in each category, with gaps between bars. Pie charts show parts of a whole, but they are hard to compare when slices are similar in size. A frequency table lists each category with its count and relative frequency (count divided by total).
Graphs for quantitative data
Histograms group values into equal-width intervals and show how many fall in each, with bars touching. Dot plots and stem-and-leaf plots show individual values for small data sets. Boxplots summarise the five-number summary and make it easy to compare groups side by side.
Describing a distribution
Describe a quantitative distribution by its shape, centre, and spread, and note any unusual values. Shape: symmetric, skewed right (a long tail to the right, like incomes), or skewed left. Peaks: unimodal or bimodal. Outliers are values far from the rest; always investigate them rather than deleting them automatically.
Worked example: reading a histogram
A histogram of commute times for 200 workers shows most values between 10 and 30 minutes, a peak around 20, and a long tail reaching 90 minutes. The distribution is unimodal and skewed right. We would expect the mean to be pulled above the median by the long commutes, so the median is the better 'typical' value here.
Misleading graphs
Graphs can mislead by starting the vertical axis far above zero (exaggerating differences), using unequal intervals, using 3D effects that distort area, or cherry-picking time ranges. Always read the axes and labels before trusting the visual impression.
Try it yourself
Classify each variable: number of pets (quantitative, discrete), eye colour (categorical), time to run a mile (quantitative, continuous), postcode (categorical, even though it is written with digits, since arithmetic on postcodes is meaningless).
Key takeaways
Know whether a variable is categorical or quantitative. Use bar charts for categories and histograms or boxplots for numbers. Describe distributions by shape, centre, spread, and outliers, and read every graph's axes critically.
Flashcard
The entire group of interest
Check your understanding
A data set of household incomes has a long tail toward high values. Its shape is best described as:
