Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Each atom of a sample decays with the probability 0.02 in each second. Simulate 100 samples of 10 000 atoms, and count, for each sample, the whole seconds until half the atoms have decayed. Find the mean, and compare it with the formula . Why is the simulated number a little larger?
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Plan. One loop for each sample: at each second, subtract the binomial number of decays, and count the seconds until the number is half or less.
Check. The formula gives 34.31 s. The simulation gives a mean of 34.8. The simulation counts whole seconds, and the half-life is reached 0.31 s after the 34th second has ended, so the simulated number is about 35 for most samples. That is why the mean is a little above 34.31.
Answer: about 34.8 s by simulation, and 34.31 s by the formula. The difference comes from the whole-second steps.
Log in to join the discussion.
Loading…