Resampling

Resampling creates repeated samples from observed data.

The point is to ask how much an estimate changes when the sample changes.

observed dataresample12325with replacement
Bootstrap samples reuse the observed dataset to study how estimates vary.

Bootstrap Intuition

In bootstrap resampling, we repeatedly sample from the dataset with replacement.

With replacement means an example can appear more than once in the same resampled dataset.

This gives many slightly different views of the same observed evidence.

For example, if the observed dataset is [a, b, c], one bootstrap sample might be [a, a, c]. Another might be [b, c, c]. Both have the same size as the original dataset, but they reuse examples.

In ML

Resampling can help estimate uncertainty for metrics when collecting a brand-new dataset is expensive.

It does not fix biased data. It only explores variation inside the data you already have.

That limitation matters. If the original evaluation set misses an important group of users, bootstrap resampling cannot invent that missing group.

Read resampling as a way to ask, "How sensitive is this number to the observed sample?" It is not a way to ask, "What would have happened if we had collected a better sample?"

MATH-C10-T12-001Exercise: With replacement

Enter 1 if bootstrap samples are drawn with replacement.

Compute it first, then check your number.

Hint

With replacement means an item can be selected again.

Solution

Enter 1. Bootstrap resampling draws samples with replacement. That means an observed example can be selected more than once in the same resampled dataset.

MATH-C10-T12-002Exercise: Repeated item

Can the same example appear twice in one bootstrap sample?

Answer it first, then check.

Hint

This is what with replacement allows.

Solution

Yes. Sampling with replacement allows the same example to be selected more than once.

MATH-C10-T12-003Exercise: Bootstrap sample size

If the original dataset has 50 examples, what size is a usual bootstrap sample?

Compute it first, then check your number.

Hint

The lesson says bootstrap samples have the same size as the original dataset.

Solution

A usual bootstrap sample has the same size as the original dataset, so it has 50 examples.

MATH-C10-T12-004Exercise: Biased data

Does resampling fix a dataset that is not representative of the population?

Answer it first, then check.

Hint

Resampling only reuses the data already collected.

Solution

No. Resampling studies variation inside the observed data. It cannot repair a missing or biased data collection process.

MATH-C10-T12-005Exercise: Observed-data limit

Enter 1 if bootstrap resampling studies variation inside the observed data, not variation from missing populations.

Compute it first, then check your number.

Hint

Ask whether resampling can select examples that were never collected.

Solution

Enter 1. Bootstrap resampling reuses the observed dataset. It cannot repair coverage gaps in the original data.

Before Moving On

Resampling estimates variability. It does not turn a poor dataset into a representative one.