# Physics307L F08:Schedule/Week 12 agenda/PDFs

From OpenWetWare

## Contents

### 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):

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle r=\int_{X=-\infty}^{x} P(x)\, dx}**

#### Numerically solving for x gives random number with appropriate distribution.

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

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle P(t) = \frac {1}{\tau} e^{-\frac{t}{\tau}}}**

#### Solving above,

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