beginner 12 minutes

Introduction to Statistics

Learn the fundamentals of statistics, including what statistics is, why it matters, and the key concepts you need to know to get started.

•
On This Page

Start with a question, not a formula

A café records how long customers wait for an order. The owner wants to know whether a new workflow helps. “Calculate the average” is a possible task, but the statistical question is more specific: does the new workflow reduce mean waiting time during comparable shifts?

That question determines what to collect, what counts as one observation, which comparison is fair, and what a useful result would look like. Statistics connects those choices to the evidence in the data.

By the end of this lesson, you should be able to distinguish a sample from a population, define the unit of observation, and separate description, inference, and causal claims.

Population, sample, parameter, statistic

TermMeaningCafé example
PopulationThe full group the question concernsAll eligible orders during the study period
SampleThe observations actually collected80 recorded orders
ParameterA numerical property of the populationThe population mean wait, μ
StatisticA numerical summary of the sampleThe sample mean wait, x̄
VariableA characteristic recorded for each unitWait in minutes, workflow, shift
Unit of observationWhat one row representsOne order

The population needs boundaries. “All customers” could mean today, this year, one branch, or every branch. A sample from quiet Tuesday mornings may describe those mornings well while saying little about the Saturday rush.

Description and inference answer different questions

Descriptive statistics summarize the data you have. For waits of 2, 3, 3, 4, and 8 minutes, the mean is 4 minutes, the median is 3 minutes, and the range is 6 minutes. All three are correct summaries of these five orders.

Inferential statistics use a sample and a model to learn about a population. A confidence interval expresses sampling uncertainty around an estimate; a hypothesis test assesses compatibility with a specified null model. Neither fixes an unrepresentative sample.

Do not report “the average customer waits 4 minutes” when you have only these five convenient observations. “These five recorded orders had a mean wait of 4 minutes” states exactly what the data support.

Match the method to the variable

Before calculating, identify the data type:

  • Categorical: workflow A/B, drink type, payment method. Start with counts and proportions.
  • Numerical: wait in minutes, order value, items per order. Start with a distribution plot and summaries of center and spread.
  • Ordered categories: satisfaction from very unhappy to very happy. Order matters, but equal numerical gaps between labels are not guaranteed.

A customer ID is stored as a number but is a label, not a quantity. The average customer ID has no useful interpretation. Read types of data for the distinctions that affect analysis.

A complete small analysis

Suppose we record five waits under each workflow:

WorkflowObserved waits (minutes)MeanMedian
A2, 3, 3, 4, 84.03
B2, 2, 3, 3, 53.03

The difference in sample means, B minus A, is −1 minute. The medians are equal. The long wait of 8 minutes contributes to the difference in means, so inspect the full distribution rather than selecting whichever summary makes the workflow look best.

Next ask how the observations were collected. If A ran during a busy shift and B during a quiet shift, workflow is confounded with demand. If orders were assigned at random during comparable shifts, the comparison is more credible. Orders on the same shift may also share conditions, so treating every order as an independent experiment can overstate the amount of information.

The five observations per group are illustrative, not evidence about a real café. They demonstrate why a numerical difference and a trustworthy conclusion are separate achievements.

Random sampling and random assignment

Random sampling helps make a sample representative of a defined population. Random assignment helps make treatment groups comparable by distributing potential confounders between them.

A study can have either, both, or neither. Randomly assigning volunteers to two workflows can support a causal comparison among those volunteers, while generalization to all cafés still needs justification. A representative survey can estimate preferences, while an association between preferences and spending does not by itself show causation.

Use this workflow on your own data

  1. Write the question, population, and outcome before looking for a favorable result.
  2. Define one row and record units, dates, and relevant group labels.
  3. Check missing values, duplicates, impossible measurements, and collection conditions.
  4. Plot the data; summarize the center, spread, and group sizes.
  5. Choose an estimation or testing method whose assumptions fit the design.
  6. Report the estimate, uncertainty, limitations, and practical meaning together.

Keep the raw data and the rules used to clean them. A result you cannot reconstruct is difficult to check or improve.

Practice: what can you conclude?

A tutor surveys 20 students who attend an optional revision class. Eighteen say the class helped. Can the tutor conclude that 90% of all students would benefit?

Show the explanation

The observed proportion is 18/20 = 90% among the respondents. Attendance and survey response are self-selected, so the sample may not represent all students. “Helped” is also self-reported; this survey does not establish an improvement in scores caused by the class. A stronger study would define the outcome and population and use an appropriate sampling or comparison design.

Continue learning

Learn to identify data types, then choose a measure of center. Use the descriptive statistics calculator to reproduce the café summaries.

Check your understanding

Choose an answer, then check the explanation. These are practice questions, not a certification or graded assessment.

1. You record 80 orders from all orders in a month. What are the 80 orders?
2. Which design choice most directly supports a causal comparison of two workflows?

0 of 2 answered

Did this explanation help?

Your response helps us identify lessons that need more work.