Canadian flagMath101 · Independent Ontario learning libraryCreated and edited by Kamran
Probability and StatisticsGrades 5–8Grades 9–123 min read

Data and Variables

A rigorous introduction to observational units, variables, datasets, coding, and the limits of measurement.

Cheat sheet

Precise definition

A dataset records values of one or more variables on observational units. A variable is a characteristic that can differ among units. An explanatory variable is used to explain or predict; a response is the outcome of interest. These roles come from the research question, not from a column's numeric format.

Notation and mathematical language

An observation is typically one row and a variable one column in tidy rectangular data, though repeated or hierarchical measurements require identifiers and structure. Population parameters summarize a population; sample statistics summarize observed data and estimate parameters under a sampling model.

Conceptual picture

Measurement turns concepts into recorded values. Coding categories with numbers does not make them quantitative; identifiers such as postal codes support matching rather than arithmetic. Metadata document units, missing-value codes, definitions, and collection timing.

Conditions and key results

Rows must represent a consistent unit of analysis. Missingness is not always random, and recoding can merge substantively different categories. Variable roles do not establish causality: an explanatory label in observational data can mark association only.

A reliable strategy

  1. State the research question, target population, observational unit, and time frame.
  2. Define each variable, type, unit, permissible values, and missing-data code in a data dictionary.
  3. Inspect uniqueness, ranges, impossible combinations, and repeated-measure identifiers.
  4. Choose summaries suited to type and design, then limit inference and causal language accordingly.

Fully worked example

Interpretation and application

Clear variable definitions prevent errors in health records, surveys, experiments, and business analytics. A technically correct computation on misidentified units can answer a different question with unwarranted precision.

Common mistakes

Verification and reasonableness

  • Compare row count with unique unit identifiers.
  • Audit values against units and allowed ranges.
  • Reproduce a few source records and review the data dictionary with subject-matter knowledge.

Practice

  1. Is a student number quantitative?
  2. What distinguishes a parameter from a statistic?
  3. Does explanatory mean causal?
Answers and brief solutions
  1. Usually no; it is a nominal identifier.
  2. A parameter describes a population; a statistic is computed from a sample.
  3. No.

Further deduction

A derived variable should record its formula and source fields. For example, body mass index is a transformation of mass and squared height, not a directly observed trait, and rounding inputs can affect it. Provenance makes results auditable and distinguishes raw measurements, corrections, imputations, and model outputs.

Long and wide layouts encode repeated measurements differently. In long form, each row can represent one unit–time observation with separate identifier and time columns; analyses must account for repeated rows from one unit. Pivoting formats changes storage, not the observational dependence. Treating those rows as independent inflates apparent sample size and understates uncertainty.

Check your understanding

Try it yourself

Hints are part of learning. Open one whenever it makes the next step feel possible.

1 practice question
Question 1Classify an identifier · Standard

A numeric jersey number is nominal. Enter 1 for quantitative and 0 for nominal.

End of lesson

Nice work making it this far.

Understanding grows through return visits. Save this lesson, try the practice, or continue when you are ready.

Lesson complete

That one is yours now.

Data and Variables is saved to My Learning. Take the win—you earned it.

1Your Math101 collectionlesson completed
Search 464 published lessons, 123 answer guides, courses, and learning tools.
Your experience

Settings

Ontario math tutoringWork with KamranBook ↗