If N is the number of radioactive nuclides present at an instant t, then the decay rate equation is given by,
where l is decay constant. The analytic solution for this differential equation is given by N(t) = N0 exp(-lt) where N0 is the number of radioactive nuclides present at t = 0. The random nature of radioactivity allows us to model the decay by Monte – Carlo technique. At any time instant, all the radioactive nuclides remaining the sample have equal decay probability. This decay probability can be obtained by rearranging the above rate equation.
Now, generate N random numbers and compare with l*dt. If the random number is less than l*dt, we assume that decay takes, else not. So number of radioactive nuclides undergoing decay in the interval dt can be predicted. This process is to be repeated to get number of decay in next interval.