Skip to content
Tutorials Center
My learning

Topics

Lesson 37 of 37 · Projects and Practice

Project: Build a Radioactive Decay Simulator

Build a Monte Carlo simulation of radioactive decay in Python, compare it with the exponential law, and explore half-life, random fluctuations and decay chains.

In this project you will simulate radioactive decay with random numbers, compare the result with the exponential law from Half-Life and the Decay Law, and discover why small samples are noisy while large ones follow a smooth curve. This is a simulation: it models the physics by coin-flip style probabilities, not a real laboratory measurement.

The idea

Each nucleus has the same probability p of decaying in a short time step Δt:

Text
p = 1 − e^(−λ Δt)   ≈ λ Δt   (when λΔt is small)

where λ = ln 2 / T½. At each step, every surviving nucleus "rolls a die" and decays if the random number is below p. Counting the survivors over time should follow N = N₀ e^(−λt).

Step 1: simulate each nucleus

Python Step 1: a first simulation (100 nuclei)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Step 2: compare sample sizes

The simulated count fluctuates around the expected curve. Relative fluctuations get smaller as N grows, roughly as 1/√N. That is why a Geiger counter reading of a weak source jumps around, while a big source looks steady.

Python Step 2: small and large samples

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Step 3: estimate the half-life from noisy data

A real experiment gives noisy counts. Taking ln(N) and fitting a straight line gives −λ as the gradient.

Python Step 3: recover the half-life

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Step 4: a decay chain

Many radioactive nuclides decay into another radioactive nuclide. Let parent A (half-life 10 s) decay into daughter B (half-life 4 s), which decays into a stable product. The daughter first grows, then falls.

Python Step 4: parent and daughter

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Extension ideas

  • Change the half-life of the daughter to be much longer than the parent's, and look at how the daughter's activity behaves.
  • Add a third radioactive stage, following the style of the uranium series described in Types of Radioactive Decay.
  • Compute the activity A = λN of the parent in becquerels at each time.
  • Repeat Step 2 many times and measure the standard deviation of the survivors at t = T½. Compare it with √(N₀ p(1−p)) where p = 1/2.

The program is a simulation of the statistical idea. It does not model the nuclear forces behind real decays; the half-lives used here are invented for illustration.

Check your understanding

Quick check · 3 questions

of 3 answered You scored / 3 · perfect!

  1. 1. Why does the simulation of 50 nuclei look noisier than that of 50 000 nuclei?

    Statistical scatter in a count is about √N, so the relative scatter, √N/N = 1/√N, shrinks as the sample grows.
  2. 2. How is the per-step decay probability p related to λ and Δt?

    The chance that a nucleus survives a step is e^(−λΔt), so the chance it decays is 1 minus that.
  3. 3. On a plot of ln N against t, what does the gradient equal?

    N = N₀e^(−λt) gives ln N = ln N₀ − λt: a straight line with gradient −λ.

Summary

  • Radioactive decay can be simulated by giving each nucleus a probability p = 1 − e^(−λΔt) per step.
  • The average behavior follows N = N₀e^(−λt); small samples show larger relative scatter.
  • A straight-line fit of ln N against t recovers the decay constant and half-life.
  • Decay chains can be modeled by passing counts from one stage to the next.

You have reached the end of this part of the track. Return to the track overview to revisit any lesson.