Physics307L:Schedule/Week 10 agenda/Random numbers

From OpenWetWare
Jump to navigationJump to search


Transformation method

See Bevington 2nd ed., pages 81-83

  1. Generate uniformly distributed random number from 0 to 1
  2. Lookup or compute this value in the cumulative distribution function, find corresponding "x"
    • This x value will be distributed according to p(x)

Excel example from today

Rejection method

See Bevington 2nd ed., pages 83-84