Physics307L F09:Schedule/Week 12 agenda/PDFs: Difference between revisions
From OpenWetWare
Jump to navigationJump to search
(New page: ===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...) |
m (1 revision) |
(No difference)
|
Latest revision as of 18:58, 6 August 2010
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):
- [math]\displaystyle{ r=\int_{X=-\infty}^{x} P(x)\, dx }[/math]
Numerically solving for x gives random number with appropriate distribution.
Specific case, time for random event to occur (i.e. radioactive decay)
- [math]\displaystyle{ P(t) = \frac {1}{\tau} e^{-\frac{t}{\tau}} }[/math]
Solving above,
- <math>\ t_i = -\tau \ln r_i