Physics307L:Schedule/Week 12 agenda/PDFs

From OpenWetWare
Jump to: navigation, search

Lots of algorithms available for generating random numbers from 0 to 1 with uniform probability

General case

Assume you have a random number r from 0 to 1. To transform to x, with PDF given by P(x):

Numerically solving for x gives random number with appropriate distribution.

Specific case, time for random event to occur (i.e. radioactive decay)

Solving above,

<math>\ t_i = -\tau \ln r_i