Random numbers from an arbitrary distribution SSP 5 - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Random numbers from an arbitrary distribution SSP 5

Description:

Lecture 8. Random numbers from an arbitrary distribution (SSP 5) Distribution: x=x1 p(x)=p1 ... x=x2 p(x)=p2 (=1-p1) Call : if p1 set x=x1. else x=x2 ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 16
Provided by: pkm
Category:

less

Transcript and Presenter's Notes

Title: Random numbers from an arbitrary distribution SSP 5


1
Lecture 8
  • Random numbers from an arbitrary distribution
    (SSP 5)

2
Distribution xx1 p(x)p1 xx2 p(x)p2 (1-p1)
Call ? if ? lt p1 set xx1 else xx2
Distribution xx1 p(x)p1 xx2 p(x)p2 xx3 p
(x)p3
Call ? if ? lt p1 set xx1 else if ?ltp1p2
xx2 else xx3
3
Sampling from a discrete distribution
4
Sampling from a continuous distribution, p(x)dx,
a?x?b
Method of inversion Solve P(x)?, where
5
Example the exponential distribution
or x -? ln?
6
Example The power law distribution
xx0?-1/(?-1)
7
Method of Composition
8
(No Transcript)
9
(No Transcript)
10
Von Neumanns method
To select from p(x)dx, a?x?b
Write p(x)dxC Q(x) ?(x)dx, Where maxQ(x)1
11
Von Neumanns Acceptance-Rejection algorithm
?(x) the sampling, or targeting function, must
be a distribution which can be easily
sampled, should mimic p(x) as far as possible so
acceptance is high Q(x) the acceptance function
12
Good and not so good sampling functions
13
Method of Superposition
Write p(x)dx in the form,
14
Example Angular distribution in Thompson
scattering
is a probability distribution,
15
Show that the algorithm is If ?1 lt ¾ set x2 ?2-1
else set x?(2 ?2 1)1/3, the sign chosen at
random.
Write a Comment
User Comments (0)
About PowerShow.com