Datasets and Samples

A dataset is the collection of examples available to you.

A sample is a subset or draw from a larger population.

The distinction matters because a model learns from the dataset, but we often care about performance on the broader population.

population we care aboutobserved sample
A dataset is observed evidence from a broader population or future use case.

Population and Sample

If the population is all future prompts a chatbot may see, your dataset is only a small observed slice of that future.

Statistics asks:

  • How was this slice collected?
  • What might it miss?
  • How much can we infer from it?

These questions are practical. If a dataset mostly contains short English prompts, it may not tell us enough about long documents, other languages, or new usage patterns.

Representative Does Not Mean Large

A large dataset can still be biased if it misses important cases.

A smaller dataset can be useful if it is collected carefully for the question we are asking.

So the first statistical question is not "How many examples do we have?" It is "What process produced these examples?" Size helps only when the data covers the population we want to reason about.

Small Example

Suppose a dataset has 10 examples and a mini-batch contains 4 examples.

The mini-batch is a sample from the dataset.

MATH-C10-T02-001Exercise: Sample size

If a sample contains 4 examples, what is its sample size?

Compute it first, then check your number.

Hint

The sample size is the number of examples in the sample.

Solution

The sample contains 4 examples, so its sample size is 4. Sample size counts the observed examples in the sample, not the whole population.

MATH-C10-T02-002Exercise: Dataset versus population

If a chatbot dataset is only a small observed slice of future prompts, is the dataset the same thing as the whole population of future prompts?

Answer it first, then check.

Hint

The dataset is observed. The future population is broader.

Solution

No. The dataset is evidence from the population we care about, but it is not the whole population.

MATH-C10-T02-003Exercise: Large but biased

Can a large dataset still miss important cases?

Answer it first, then check.

Hint

Size and representativeness are different ideas.

Solution

Yes. A dataset can be large and still biased if the collection process misses important cases.

MATH-C10-T02-004Exercise: What to ask

When reading a dataset description, should you ask how the data was collected?

Answer it first, then check.

Hint

Collection affects what the sample represents.

Solution

Yes. How the data was collected affects what conclusions the dataset can support.

MATH-C10-T02-005Exercise: Collection process

Enter 1 if a dataset can be large but still weak evidence for a use case it barely covers.

Compute it first, then check your number.

Hint

Think about a huge English-only dataset used to judge performance in another language.

Solution

Enter 1. A large dataset can still be poor evidence for a population or use case that the collection process missed.

Before Moving On

Never treat a dataset as automatically representative. Ask what it samples from.