Skip to lesson

Math · AP Statistics

Chapter 8: Design and Communication

Simulation and Randomisation

Building a sampling distribution by hand.

Lesson
1
Time
About 21 minutes
0 of 12 done

Step 1: Let's Learn

Read it, or press Listen and follow the words.

A simulation imitates a random process many times, building an empirical picture of what chance alone produces.

Designing one

State what one trial represents, how the randomness maps onto the situation, and what counts as a success.

Randomisation distributions

Reshuffle the group labels many times under the assumption of no effect. The results show what chance alone can produce.

An empirical p-value

The p-value is the proportion of simulated results at least as extreme as the observed one.

More trials, steadier estimate

Ten trials say little; a thousand say a great deal. The estimate settles as the count grows.

Why bother

Simulation works when no formula applies, and it makes the logic of a p-value visible rather than abstract.

Building a sampling distribution by hand

Simulation repeats a random process many times and records the results, producing an empirical sampling distribution. It replaces theory with repetition when the theory is unavailable or unconvincing.

Describing a simulation

State how randomness is generated, what one trial consists of, what is recorded, and how many trials are run. All four are needed for someone else to reproduce it, and all four are graded.

Randomisation tests

Reshuffling the group labels many times shows what differences chance alone produces. If the observed difference sits far out in that distribution, chance is an implausible explanation.

Why simulate at all

It works when conditions for a formula-based test fail, and it makes the logic of inference visible rather than hidden inside a distribution table. Many statisticians now prefer it for both reasons.

Step 2: Try It Yourself

Tap and try it out.

A simulated distribution. The observed result is judged against how often chance alone reaches it.
Low12
Middle30
High8

Middle has the most. It has 22 more than High.

Step 3: Watch an Example

One step at a time.

Watch Diego Estimate a p-value

Diego runs 1000 simulated trials under the null, and 30 are at least as extreme as his observed result.

  1. Step 1

    Each simulated trial shows what chance alone can produce when the null is true.

Step 4: Your Turn

Practice makes it stick.

The Estimate

Problem 1 of 2

30 of 1000 simulated results were at least as extreme. What is the estimated p-value?

The Decision

Problem 2 of 2

That p-value at alpha 0.05. Is the result significant? 1 yes, 0 no.

Simulate It

1 of 8

50 of 1000 trials were as extreme. Estimated p-value?

2 of 8

8 of 200 trials were as extreme. Estimated p-value?

3 of 8

300 of 1000 trials were as extreme. Estimated p-value?

4 of 8

That p-value at alpha 0.05. Significant? 1 yes, 0 no.

5 of 8

Which gives a steadier estimate? 1 for 20 trials, 2 for 2000.

6 of 8

What is assumed true while simulating? 1 the null, 2 the alternative.

7 of 8

Put the simulation design in order.

  1. 1Decide how the randomness maps onto the situation.
  2. 2Define what counts as a success.
  3. 3Run many trials and compute the proportion as extreme.
  4. 4State what one trial represents.

8 of 8

10 of 500 trials were as extreme. Estimated p-value?

Step 5: Quick Check

Show what you know.

Question 1 of 2

20 of 1000 simulated results were at least as extreme. Estimated p-value?

Question 2 of 2

What is assumed while building a randomisation distribution?

What You Learned

  • A simulation imitates a random process many times.
  • A randomisation distribution shows what chance alone produces under the null.
  • The empirical p-value is the proportion of simulated results at least as extreme.