Don’t Underestimate Descriptive Statistics: A Hands-on Course

Ask “who is this population?” before the analysis — with real epidemiological and cohort data

Published

October 17, 2026

Introduction

English version — machine-assisted translation (by generative AI, Anthropic Claude) of the original Japanese hands-on. 日本語版はこちら.

When analysing large datasets — from epidemiological studies, cohort studies, health check-ups, or insurance claims — it is tempting to focus straight away on regression models and hazard ratios. Yet most of the causes of misinterpreted results lie before the model.

  • You thought one row was “one person”, but the same person appeared many times
  • You reported a mean, but it was being pulled by a handful of extreme values
  • You analysed the data after dropping missing values, and ended up looking at a different population from the original one
  • You wrote “the prevalence among Japanese (Americans)”, but the sample actually over-represented certain groups
  • You got the result “smoking is not associated with death”, but smokers were simply younger

All of these can be noticed before the analysis if you do descriptive statistics (counting, arranging, and looking at the characteristics of the population) carefully.

In this hands-on, you will work with real epidemiological data in R and experience how skipping descriptive statistics leads you astray. Each chapter follows the flow “first analyse naively → predict and interpret the result → look at the descriptive statistics → the interpretation changes”.

Goals of this hands-on

  1. Build the habit of checking “what is one row, and who is this population?” before analysis
  2. Be able to describe, with tables and figures, distributions, missingness, how the sample was selected, follow-up, and differences between groups
  3. Be able to explain, from descriptive statistics, how the results of an analysis could be distorted
  4. Take home a descriptive statistics checklist you can use on your own data

Who this is for

  • People involved (or about to be involved) in analysing epidemiological, clinical research, or healthcare data
  • People who understand means, medians, proportions, and histograms (roughly the level of Japan’s Statistics Certificate Grade 3)
  • For R, it is enough if you can “read code, modify it a little, and run it”

R runs in your browser

The code cells in each chapter are executed by R inside your browser (a technology called webR). Edit the code and press “Run Code” and the result changes immediately. No installation is needed.

Note
  • Right after opening each chapter, loading R and the packages takes from several tens of seconds to about a minute
  • If you move the tab to the background while loading, processing slows down, so please wait until it is displayed
  • Viewing on a PC is recommended
TipPredict before you run

Each chapter contains “Make a prediction” questions. Before looking at the answer, try to predict it yourself. The places where your prediction and the result diverge are the points where you realise why descriptive statistics matter.

Chapter overview

Chapter Topic Data used
1 Do smokers live longer? — What happens when you skip descriptive statistics Whickham
2 Who is that one row? — Units of observation and coding Framingham
3 Look at the distribution before the mean — Skewness, outliers, rounding, upper limits Framingham, NHANES
4 Describe missingness — Whose data are missing? NHANES, Framingham
5 Whom does this sample represent? — Sampling and weights NHANES
6 Describe follow-up and dropout — Who remained until the end? Framingham
7 Before comparing groups — Table 1, confounding, and the p-value trap Framingham, NHANES
8 Exercises and a descriptive statistics checklist Framingham, NHANES

Data used (all real data)

Whickham (smoking and survival in the UK)

1314 women from a survey conducted in Whickham, UK, in 1972–74, and their vital status 20 years later. A small dataset with only 3 columns: smoker (smoking at the survey, Yes/No), age (age at the survey), and outcome (Alive/Dead 20 years later). Source: Appleton DR, French JM, Vanderpump MPJ (1996) The American Statistician 50(4): 340–341. Included in the R package mosaicData.

Framingham Heart Study (teaching dataset)

A landmark cohort study of cardiovascular disease that began in 1948 in Framingham, Massachusetts, USA. We use data that the US NHLBI anonymised and partly modified for teaching purposes (4434 people, up to 3 examinations, 24 years of follow-up), included in the R package riskCommunicator.

Warning

Part of the teaching dataset has been modified for anonymisation. The numbers obtained here cannot be cited as research findings.

Main variables:

Variable Meaning
RANDID Participant ID
PERIOD Examination round (1, 2, 3)
TIME Days from the first examination to that examination
SEX Sex (1 = male, 2 = female)
AGE Age
SYSBP, DIABP Systolic and diastolic blood pressure (mmHg)
TOTCHOL Total cholesterol (mg/dL)
GLUCOSE Blood glucose (mg/dL)
BMI BMI
CURSMOKE, CIGPDAY Current smoking (0/1), cigarettes per day
DIABETES, BPMEDS Diabetes (0/1), taking antihypertensive medication (0/1)
PREVCHD History of coronary heart disease at the time of the examination (0/1)
DEATH, TIMEDTH Death during follow-up (0/1), days until death or end of follow-up
ANYCHD, TIMECHD Onset of coronary heart disease (0/1), days until onset or end of follow-up

NHANES 2009–2012 (US National Health and Nutrition Examination Survey)

A health survey run by the US CDC, designed to represent the entire US population. We use the actual sample (about 20,000 people) from 2009–2010 and 2011–2012 (a subset of columns from NHANESraw in the R package NHANES). A distinctive feature is that it comes with survey weights (WTINT2YR, etc.), which we use in Chapter 5.

Using it on your own PC

install.packages(c("dplyr", "ggplot2", "survival", "survey", "gtsummary",
                   "cardx", "smd", "broom", "broom.helpers",
                   "mosaicData", "NHANES", "riskCommunicator"))

The browser version loads the three datasets above as data/*.rds. On your own PC, you can use the same data via mosaicData::Whickham, riskCommunicator::framingham, and NHANES::NHANESraw.