A variable is something that can differ between people or things, such as age or blood group. An observation is one row of data: one person, one household, one hospital visit.
Why it matters
Before analysing, you must know what each column and each row represents. Most data mistakes start here.
Key ideas
- Variable = a column
- Observation = a row (the unit of analysis)
- Each cell holds one value
- Column names should be clear and unique
- One row should mean one unit only
Real-life research example
In a survey of 300 patients, "age", "sex" and "systolic BP" are variables. Patient 17's full record is one observation.
When to use
- Check this when you receive or build a dataset
When NOT to use
- Don't put two people in one row
- Don't mix units in a column (kg and lb)
Quick takeaway
Variables are columns, observations are rows.
Try it yourself
Paste the values of one variable below (e.g. blood groups A, B, O, A, AB, O, O). See how many observations there are and how they are distributed.
Model answer
Each pasted value is one observation of the variable. The table shows how often each value occurs, which is the simplest summary of a categorical variable.