Reading & Understanding Data · Lesson 32

Descriptive Statistics

Descriptive Statistics is part of data understanding.

ConceptWorked examplePracticeKnowledge check
Textbook walkthrough

What Descriptive Statistics actually means

Descriptive Statistics is part of data understanding. Before analysis, you need to know what one row represents, what each field means, how values are encoded and which operations are valid for each variable type.

Descriptive Statistics matters because interpretation begins with understanding what each row and field actually represents. File syntax, software dtype and business meaning are different layers; confusing them leads to invalid summaries and comparisons.

Deeper walkthrough

Read Descriptive Statistics as a mechanism, not a recipe

Treat this as a sequence of observable decisions rather than one opaque command. Stage 1: Identify the observational unit represented by each row. Stage 2: Inspect column names, dtypes, ranges, categories and missing values. Stage 3: Distinguish identifiers from quantities; numeric storage does not automatically make a variable quantitative. Final checkpoint: Check whether dates/times have time zones and whether text fields contain hidden variants.

Mechanism

Follow the transformation

Identify the observational unit represented by each row.

Inspect column names, dtypes, ranges, categories and missing values.

Distinguish identifiers from quantities; numeric storage does not automatically make a variable quantitative.

Evidence

Know what would convince you

  • Compare row/column counts, dtypes and missing values before and after the operation.
  • Trace a few representative rows or one group manually from source values to result.
Useful distinctionNominal: Categories with no intrinsic order, e.g. region.
Visual demonstration of Descriptive Statistics
Visual demonstration: use the diagram to trace the main objects and state changes involved in Descriptive Statistics.
Click a stage to inspect what happens, what changes, and what should be checked before moving on.
Stage 1

Identify the observational unit represented by…

Identify the observational unit represented by each row. This is an input-preparation stage for Descriptive Statistics. Verify the relevant type, shape, units, keys, missingness or assumptions before later steps depend on them.

Input focus: confirm the data/object, units, type, shape and assumptions before the next operation depends on them.
How it works

Trace the mechanism step by step

  1. Identify the observational unit represented by each row.
  2. Inspect column names, dtypes, ranges, categories and missing values.
  3. Distinguish identifiers from quantities; numeric storage does not automatically make a variable quantitative.
  4. Document units, category definitions and permissible values.
  5. Check whether dates/times have time zones and whether text fields contain hidden variants.
Worked demonstration

Make the concept concrete

Demonstration

Python example

# Step 1 — Import the module so its functions/classes are available to the rest of this example.
import statistics as st
# Step 2 — Compute the right-hand expression and store its result in `x` for the next step.
x = [2, 3, 4, 5, 30]
# Step 3 — Display the current value explicitly so the result/state can be inspected during execution.
print("mean", st.mean(x))
# Step 4 — Display the current value explicitly so the result/state can be inspected during execution.
print("median", st.median(x))
# Step 5 — Display the current value explicitly so the result/state can be inspected during execution.
print("stdev", round(st.stdev(x),2))
Expected / illustrative result
mean 8.8
median 4
stdev about 11.9
The extreme value shifts the mean much more than the median.
Interpret the result.

For Descriptive Statistics, trace representative source rows/columns into the result and reconcile row counts, dtypes, keys or missing values that the operation could change.

Distinctions & related ideas

Know what this is — and what it is not

NominalCategories with no intrinsic order, e.g. region.
OrdinalOrdered categories where gaps are not assumed equal, e.g. satisfaction levels.
IntervalEqual differences are meaningful but zero is arbitrary, e.g. Celsius temperature.
RatioEqual differences plus a meaningful zero, e.g. mass or duration.
Discrete / continuousCounts take separated values; measured quantities can vary over a continuum.
Use deliberately

When it is appropriate

Use Descriptive Statistics when the data are naturally tabular and row grain, column meaning, keys and dtypes can be stated explicitly.

Boundary conditions

When to stop or reconsider

Reconsider the operation if row identity/grain is unclear, join keys are not validated, chained transformations hide state, or the task is better expressed with a simpler table operation.

Common mistakes

Failure modes to recognise

  • Changing row grain or row count without noticing it.
  • Joining/grouping on keys whose uniqueness or missingness was never checked.
  • Interpreting a derived column or aggregation without reconciling it to source rows and units.
Verification

How to check the result

  • Compare row/column counts, dtypes and missing values before and after the operation.
  • Trace a few representative rows or one group manually from source values to result.
  • For joins/reshapes/grouping, verify key uniqueness/cardinality and reconcile totals where totals should be preserved.
Hands-on practice

Demonstrate understanding

Try this:

Build a tiny, inspectable example of Descriptive Statistics. First identify the observational unit represented by each row. Then inspect column names, dtypes, ranges, categories and missing values. Write the expected result before running it, and explain one condition that would make the result misleading or invalid.

Work with 4–8 rows that contain the exact key/category/missing-value pattern you want to understand. Trace one row or group all the way through.
Knowledge check

Check reasoning, not memorisation

Before trusting a result from Descriptive Statistics, which check provides the strongest evidence that you understand and applied it correctly?

Quick reference

Keep the important distinctions visible

Step 1Identify the observational unit represented by each row.
Step 2Inspect column names, dtypes, ranges, categories and missing values.
Step 3Distinguish identifiers from quantities; numeric storage does not automatically make a variable quantitative.
Step 4Document units, category definitions and permissible values.
Lesson summary

What to remember

  • Descriptive Statistics is part of data understanding. Before analysis, you need to know what one row represents, what each field means, how values are encoded and which operations are valid for each variable type.
  • Identify the observational unit represented by each row.
  • Changing row grain or row count without noticing it.
  • Compare row/column counts, dtypes and missing values before and after the operation.