Statistics Chapter 1 of 15

Chapter 1: What Is Statistics?

Populations, samples, variables, and the investigative cycle

All chapters
On this page
What you will be able to do after this chapter
  • Explain what statistics is for and how it differs from probability, mathematics, and "data science".
  • Distinguish a population from a sample and a parameter from a statistic, and use the standard notation.
  • Identify observational units and variables in a dataset, and classify every variable by type and by scale of measurement.
  • Describe the five stages of the statistical investigative cycle and apply them to a real question.
  • Explain why variability is the central idea of the subject, and why human intuition about randomness is unreliable.
  • Spot common ways statistics are misused, and state the ethical duties of anyone who collects or reports data.
1.1

Why statistics?

Every day, people make decisions with incomplete information. A hospital must decide whether a new drug is better than the old one, though it can only test the drug on a few hundred patients. A company must decide which version of a web page keeps visitors longer, though it can only show each version to a slice of its audience. A government must estimate unemployment, though it cannot interview every citizen every month. In each case, what we see (a limited set of observations) is not what we want to know (the truth about a much larger group or process).

Definition: Statistics

Statistics is the science of collecting, organizing, analyzing, interpreting, and communicating data, especially in order to draw conclusions about a larger group or process from limited and imperfect information, while honestly measuring how uncertain those conclusions are.

The last clause matters most. Anyone can compute an average. What makes statistics a discipline is the second half of the job: saying how far off that average could be, and why we believe it. A statistician never reports "the answer is 62 percent" without also saying something like "give or take 5 percentage points, with 95 percent confidence".

Three families of statistical work

  1. Description. Summarizing a dataset with tables, graphs, and numbers such as the mean and standard deviation. Chapters 3 and 4.
  2. Inference. Using a sample to draw conclusions about a population, with a measured amount of uncertainty. Chapters 8 to 14.
  3. Design. Deciding how to collect data so that conclusions are trustworthy in the first place. Chapter 2. A poorly designed study cannot be rescued by clever analysis.

Probability is the mathematics that connects them. Probability reasons from a known model to the data we should expect (a fair coin, so what will 100 flips look like?). Statistics reasons in the opposite direction, from the data we have to plausible models of the world (we saw 62 heads in 100 flips, so is the coin fair?). Chapters 5 to 8 build the probability we need for that reverse journey.

Where the word comes from

The word is usually traced to the German Statistik of the 1700s, meaning knowledge useful to the state: population counts, trade, and taxes. The modern subject grew from three streams: state record-keeping, the mathematics of games of chance, and the analysis of measurement error in astronomy and surveying.

Statistics in the wild

FieldTypical questionWhat is uncertain
MedicineDoes the new treatment lower blood pressure more than the standard one?Patients differ; a difference in a trial may be luck.
TechnologyDoes the redesigned checkout page increase purchases?Visitors behave differently on different days.
Public policyWhat percentage of households lack clean drinking water?Only a sample of households can be surveyed.
ManufacturingIs the machine still producing bolts of the correct diameter?Each bolt varies slightly; how much is too much?
SportsIs a striker's hot streak skill or chance?Small numbers of attempts produce streaks by luck.
EducationDo students taught with method A learn more than with method B?Students differ before the teaching even begins.
1.2

Populations, samples, parameters, and statistics

Almost every statistical problem has the same skeleton: a large group we care about, and a small group we can actually measure.

Definitions
  • A population is the complete collection of individuals, objects, or measurements we want to learn about.
  • A sample is the subset of the population that we actually observe.
  • A census is an attempt to measure every member of the population.
  • A parameter is a numerical summary of the population. It is a fixed number, usually unknown.
  • A statistic is a numerical summary of a sample. We can compute it, but it changes from sample to sample.

A helpful memory trick: Population goes with Parameter, and Sample goes with Statistic.

Notation used throughout this course

Statisticians use Greek letters for parameters and Latin letters (often with a hat or bar) for statistics. Learn this table now; every later chapter depends on it.

QuantityPopulation parameterSample statistic
Size\(N\)\(n\)
Mean\(\mu\) ("mu")\(\bar{x}\) ("x bar")
Standard deviation\(\sigma\) ("sigma")\(s\)
Proportion\(p\)\(\hat{p}\) ("p hat")
Correlation\(\rho\) ("rho")\(r\)
Regression slope\(\beta_1\) ("beta one")\(b_1\) or \(\hat{\beta}_1\)
The central picture of statistics Population size N parameter: mu, p Sample size n statistic: x-bar, p-hat sampling (design, Chapter 2) inference (Chapters 8 to 14) We can only observe the sample, but we want to know the population.
Common mistake

Treating a statistic as if it were the parameter. If a poll of 400 students finds that 62 percent support a policy, the number 0.62 is \(\hat{p}\), a statistic. It is not \(p\), the proportion among all students. A different random sample of 400 would give a different \(\hat{p}\). The gap between \(\hat{p}\) and \(p\) is called sampling error, and quantifying it is the main business of inference.

Example 1.1: Identifying the parts of a study

A university has 12,000 students. The student council wants to know what fraction support extending library opening hours. It emails a random selection of 400 students; 248 reply "yes".

Step 1: population and sample

Population: all 12,000 students. Sample: the 400 selected students. So \(N = 12000\) and \(n = 400\).

Step 2: parameter and statistic

The parameter is \(p\), the proportion of all 12,000 students who support the change. It is unknown. The statistic is \[\hat{p} = \frac{248}{400} = 0.62.\]

Step 3: what can and cannot be said

We can say that 62 percent of the sample support the change. We cannot say that exactly 62 percent of all students do. In Chapter 9 we will build an interval such as "between 57 percent and 67 percent" that honestly reflects sampling error.

What the tool just showed you

Every individual sample mean was different, none of them was exactly \(\mu\), yet together they piled up symmetrically around \(\mu\), and the pile got tighter as the sample size grew. That is the whole idea of statistical inference in miniature. Chapter 8 turns this observation into a theorem (the Central Limit Theorem).

Going deeper: A more formal view: data as random variables

In the mathematical treatment, a sample of size \(n\) is a list of random variables \(X_1, X_2, \dots, X_n\) drawn from a distribution \(F\) that describes the population. The parameter is a function of \(F\), for example \(\mu = E(X)\). A statistic is a function of the sample, such as \(\bar{X} = \tfrac{1}{n}\sum_{i=1}^{n} X_i\). Before we collect data, \(\bar{X}\) is itself a random variable with its own distribution (its sampling distribution). After we collect data, we have one observed value \(\bar{x}\), a realization of that random variable. Uppercase for the random quantity, lowercase for the observed number.

Inference then asks: given the observed \(\bar{x}\), what can we say about \(\mu\)? Everything in Chapters 8 to 14 is a careful answer to that question.

1.3

Data, variables, and scales of measurement

The anatomy of a dataset

Definitions
  • An observational unit (or case) is one individual thing we record data on: a person, a household, a bolt, a web visit.
  • A variable is any characteristic that can differ from one unit to another.
  • A data set is usually arranged as a table with one row per unit and one column per variable.
  • An identifier such as a student ID labels the unit. It looks like a number but is not a variable to analyze.

Types of variable

The first fork in the road is between categories and numbers.

TypeSub-typeMeaningExamples
Categorical (qualitative)NominalCategories with no natural orderBlood type, country, major, yes or no
OrdinalCategories with a meaningful order, but unequal or unknown gapsShirt size, education level, satisfaction rating
Numerical (quantitative)DiscreteCounts; values can be listed (0, 1, 2, ...)Number of siblings, goals scored
ContinuousMeasurements; any value in an interval, limited only by the instrumentHeight, time, weight, temperature
Common mistake

Numbers do not automatically make a variable numerical. Phone numbers, jersey numbers, and postal codes are nominal labels: adding or averaging them is meaningless. The test is whether arithmetic on the values means something.

Stevens' four scales of measurement

The psychologist S. S. Stevens proposed in 1946 a finer classification by which mathematical operations make sense. It is a useful guide for choosing summaries and graphs, though (as the "Going deeper" box below explains) it is not a law of nature.

ScaleWhat it lets you doExampleSensible summary
NominalTell whether two values are the same or differentEye colorCounts, proportions, mode
OrdinalAlso rank: greater than, less thanRace finishing positionMedian, percentiles
IntervalAlso measure differences (equal gaps), but zero is arbitrary, so ratios are meaninglessTemperature in Celsius, calendar yearMean, standard deviation
RatioAlso form meaningful ratios, because zero means "none of the quantity"Height, income, waiting time, temperature in KelvinAll of the above, plus ratios and geometric mean
Example 1.2: Why 20 degrees Celsius is not "twice as hot" as 10 degrees

Celsius is an interval scale: the zero point (the freezing point of water) was chosen for convenience, not because it means "no heat". Convert to Kelvin, a ratio scale whose zero is absolute zero:

\[10^\circ\text{C} = 283.15\ \text{K},\qquad 20^\circ\text{C} = 293.15\ \text{K},\qquad \frac{293.15}{283.15} \approx 1.035.\]

So on the absolute scale, 20 degrees Celsius is only about 3.5 percent "hotter" than 10 degrees Celsius, not 100 percent hotter. Differences are meaningful (a 10 degree rise is a 10 degree rise anywhere on the scale), but ratios only make sense on the Kelvin scale.

Going deeper: Is Stevens' typology a rule or a guideline?

Stevens argued that the scale of a variable dictates which statistics are "permissible" (for instance, no means for ordinal data). Statisticians have long pushed back. Frederick Lord's classic thought experiment imagines a professor who computes the mean of football jersey numbers: the arithmetic is perfectly valid, and the statistic answers a genuine question (for example, whether the numbers assigned to one team are systematically higher). What matters is not the scale label but whether the question and the interpretation are meaningful.

In practice, ordinal ratings such as a 1 to 5 satisfaction scale are routinely averaged, but you should do so knowing that the gap between "4" and "5" may not mean the same as the gap between "1" and "2". Treat the scales as a prompt to ask that question, not as a ban.

Example 1.3: Classify every variable in a survey

A survey asks each respondent: (a) home city, (b) number of cups of tea drunk yesterday, (c) rating of the service from 1 (poor) to 5 (excellent), (d) time in minutes spent waiting, (e) whether they would recommend the shop.

VariableTypeScaleWhy
(a) Home cityCategorical, nominalNominalNames with no order
(b) Cups of teaNumerical, discreteRatioA count; zero means none
(c) Service ratingCategorical, ordinalOrdinalOrdered, but the gaps are not guaranteed equal
(d) Waiting timeNumerical, continuousRatioMeasured; zero means no wait
(e) Would recommendCategorical, nominal (binary)NominalTwo unordered categories
1.4

Statistical thinking and the investigative cycle

Variability is the heart of the subject

If every student in a university had exactly the same height, one measurement would tell us everything and statistics would not exist. Statistics exists because things vary: people differ, machines wobble, measurements carry error, and samples drawn from the same population disagree. Much of statistical thinking is deciding which variation is signal (a real difference worth acting on) and which is noise (random scatter we would see anyway).

The signal and noise idea \[\text{observed data} \;=\; \text{signal (pattern)} \;+\; \text{noise (random variation)}\]

Nearly every method in this course is a way of estimating the signal and measuring the noise, so we can judge whether the signal is bigger than what noise alone would produce.

Why intuition about randomness fails

People expect random sequences to look "evenly mixed", so they underestimate how often true randomness produces streaks. A run of six heads in a row seems suspicious, but in 100 fair coin flips a run of six or more is more likely than not. The tool below lets you test your own instinct.

Why this matters for real decisions

A basketball player makes five shots in a row. A stock fund beats the market for three years. A town has three cases of a rare illness on one street. Our brains see a pattern and reach for a story. Statistics gives us the discipline to ask first: how often would pure chance produce something this striking? Chapter 10 makes that question precise.

The investigative cycle (PPDAC)

Statisticians do not just "do a test". They carry out a complete investigation. A widely taught framework, PPDAC (from MacKay and Oldford, 1994, and popularized by Wild and Pfannkuch, 1999), names five stages. It matches the GAISE recommendation to teach statistics as an investigative process.

StageKey questionWhat you doWhere in this course
ProblemWhat do we want to know?Turn a vague curiosity into a precise, answerable question about a defined populationThis chapter
PlanHow will we get relevant data?Choose what to measure, how to sample, and how to run the studyChapter 2
DataIs the data collected and clean?Collect, record, and check data; deal with errors and missing valuesChapters 2, 3
AnalysisWhat does the data say?Explore with graphs and summaries, then apply formal methodsChapters 3 to 14
ConclusionWhat can we honestly claim?Answer the original question, state limits, and communicate clearlyEvery chapter, and Chapter 15
Example 1.4: PPDAC applied: "Does late-night phone use hurt sleep?"
Problem

"Does late-night phone use hurt sleep?" is too vague. Sharpen it: Among undergraduate students at our university, do those who use a phone in bed for more than 30 minutes before sleeping get fewer hours of sleep on average than those who do not? The population is undergraduates at this university; the variables are phone use (categorical) and hours of sleep (numerical).

Plan

We cannot measure every student, so we take a random sample. We must decide how to measure sleep (self-report is biased; a wearable is better but expensive) and whether to run an experiment (assign some students to stop late-night use) or observe existing habits. An observational study can show association but not cause (Chapter 2).

Data

Collect the data, check for impossible values (30 hours of sleep), and record how many selected students did not respond.

Analysis

Plot sleep hours for both groups, compute means and spreads (Chapter 3), then compare the groups with a formal test and interval (Chapter 11).

Conclusion

Suppose the phone group averages 30 minutes less sleep. Is that real or chance? Is the phone the cause, or are stressed students both sleepless and glued to their phones? A good conclusion answers the sharpened question, states the size and uncertainty of the difference, and clearly warns that this design cannot prove causation.

1.5

Being a critical consumer of statistics

Most people will use statistics far more as readers of other people's claims than as analysts. The GAISE 2016 College Report puts becoming a critical consumer of statistically based media reports first among its learning goals for an introductory course. Here is a checklist you can apply to any headline.

The seven-question checklist
  1. Who was studied, and how were they chosen? (A self-selected online poll is not a random sample.)
  2. How many? (Small samples swing wildly.)
  3. What exactly was measured, and how? (Self-reported diet, or measured cholesterol?)
  4. Compared to what? (A 50 percent increase from 2 cases to 3 cases is not alarming.)
  5. Association or cause? (Was there an experiment with random assignment?)
  6. How uncertain? (Is there a margin of error or an interval? If not, be suspicious.)
  7. Who paid, and who benefits from the conclusion?

Four classic traps

Trap 1: Confusing correlation with causation

Ice cream sales and drowning deaths rise and fall together across the year. Ice cream does not cause drowning: hot weather drives both. A third variable that influences both of the variables under study is called a confounder (Chapters 2 and 4).

Trap 2: Survivorship bias

During the Second World War, analysts studying returning bombers found bullet holes concentrated on the wings and fuselage and few on the engines. The obvious idea was to armor the parts with the most holes. The statistician Abraham Wald reportedly pointed out the flaw: they were only seeing planes that survived. Planes hit in the engine did not come back. The missing holes were the evidence. (The story is widely told, with details that vary between tellings, but the lesson stands.) Whenever your data include only "survivors" of some filtering process, ask what is missing.

Trap 3: Percentages without a base

"Risk doubles!" can mean a rise from 1 in 10,000 to 2 in 10,000 (an absolute increase of 0.01 percentage points), which most people would not worry about, or from 10 percent to 20 percent, which is serious. Always ask for the absolute numbers behind a relative claim.

Trap 4: Cherry picking and multiple looks

If you test 20 unrelated things at the 5 percent level, you should expect about one "significant" result by chance alone. Reporting only that one is misleading. This is called p-hacking, and Chapter 10 has a simulator that lets you commit it on purpose so you learn to recognize it.

Example 1.5: Reading a headline critically

Headline: "Coffee drinkers live longer, study of 3,000 volunteers finds."

Apply the checklist. Who: "volunteers" suggests self-selection, so they may be healthier or more health-conscious than average. How many: 3,000 is decent for an average, but the size of the effect matters. Compared to what: how many years longer, and compared with non-drinkers or with people who quit? Association or cause: coffee drinking was almost certainly observed, not assigned, so income, smoking, and lifestyle could be confounders. How uncertain: no interval is reported in the headline.

Verdict: the study may be perfectly good, but the headline's causal wording ("coffee drinkers live longer" implies "coffee makes you live longer") is not supported by an observational design.

1.6

Ethics in statistics

Data come from people, and conclusions affect people. GAISE 2016 added ethics as an explicit learning goal. There are two layers.

Ethics of collecting data about people

The Tuskegee Syphilis Study (US Public Health Service, 1932 to 1972) followed hundreds of Black men in Alabama who had syphilis. The participants were not told their diagnosis and were denied effective treatment even after penicillin became the standard cure. Public outrage led to the US National Research Act (1974) and the Belmont Report (1979), which set out three principles that now guide research involving people:

  1. Respect for persons: voluntary, informed consent, and extra protection for those who cannot consent freely.
  2. Beneficence: minimize harm and maximize benefit.
  3. Justice: fair selection of participants, so burdens and benefits are shared fairly.

Modern studies must be approved by an ethics board (called an IRB in the US, and an ethics committee in many countries) before any data are collected. Privacy also matters: even "anonymous" data can often be re-identified when combined with other datasets, so sensitive data should be stored securely and shared only in aggregated or properly de-identified form.

Ethics of analyzing and reporting data

Duties of an honest analyst
  • Report all analyses you ran, not only the ones that gave the answer you hoped for.
  • Never fabricate, alter, or selectively delete data.
  • State the limits: sample, design, and what cannot be concluded.
  • Report uncertainty (intervals, margins of error), not just single numbers.
  • Make graphs that show the data fairly (no truncated axes that exaggerate differences).
  • Be open about conflicts of interest and funding.
  • Make the analysis reproducible: share code and data when you can.
1.7

Tools and how this course works

Real statistics is done with software. This course is tool-agnostic: every formula is explained by hand so you understand it, and every page contains live calculators so you can check your work. When you later meet a spreadsheet or a programming language, you will already know what its output means. A rough map:

ToolGood forCost
Spreadsheet (Excel, Google Sheets)Quick summaries, simple charts, small dataFree or cheap
RStatistics-first language, best-in-class plotting and modellingFree
Python (pandas, SciPy, statsmodels)Data science pipelines, automationFree
Calculator (TI-84 or similar)Exams where computers are not allowedModerate
Point-and-click packages (JASP, jamovi)Learning and quick analyses without codeFree

How to use these notes. Read each section, then interact with the tool that follows it, then attempt the quick check before you open a worked example. Do the graded practice at the end of each chapter without looking back at the text, and use the endless generator to drill weak spots. Statistics is learned by doing.

1.8

Chapter summary

Key ideas
  • Statistics turns limited, variable data into conclusions about a larger group, with honest uncertainty.
  • Population and parameter (Greek: \(\mu, \sigma, p\)); sample and statistic (Latin: \(\bar{x}, s, \hat{p}\)). Statistics vary from sample to sample; parameters do not.
  • A dataset has rows (observational units) and columns (variables). Identifiers are not variables to analyze.
  • Variables are categorical (nominal, ordinal) or numerical (discrete, continuous). Stevens' scales: nominal, ordinal, interval, ratio.
  • Ratios are only meaningful when zero means "none" (ratio scale).
  • PPDAC: Problem, Plan, Data, Analysis, Conclusion.
  • Observed data = signal + noise. True randomness produces more streaks than intuition expects.
  • Be a critical consumer: ask who, how many, what, compared to what, cause or association, how uncertain, and who benefits.
  • Ethics: informed consent, no fabrication, report all analyses, state limits and uncertainty.

Key terms

TermMeaning
CensusMeasuring every member of a population
ConfounderA variable related to both the explanatory and response variables that distorts their apparent relationship
Observational unitThe individual entity on which data are recorded
ParameterA fixed numerical summary of a population (usually unknown)
PopulationThe complete group about which we want information
SampleThe part of the population actually observed
Sampling errorThe difference between a statistic and the parameter it estimates, due to chance in selecting the sample
StatisticA numerical summary computed from a sample
Survivorship biasDrawing conclusions only from items that passed a selection filter
VariableA characteristic that can take different values for different units
1.9

Practice

Do the graded set first, without notes. Then use the endless generator to drill until each type feels automatic.