Lesson%203:%20Choosing%20from%20distributions - PowerPoint PPT Presentation

About This Presentation
Title:

Lesson%203:%20Choosing%20from%20distributions

Description:

Choosing from a probability distribution that WE want to use rather than natural ... 'reflecting' the digits of prime base counting integers about their radix point. ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 29
Provided by: ronald55
Learn more at: http://web.utk.edu
Category:

less

Transcript and Presenter's Notes

Title: Lesson%203:%20Choosing%20from%20distributions


1
Lesson 3 Choosing from distributions
  • Choosing from distributions
  • Discrete (Review)
  • Continuous Direct (Review)
  • Continuous Rejection
  • Probability mixing
  • Metropolis method
  • Stratified sampling

2
Overview of pdf and cdf (Review)
  • Basic definition of probability distribution
    function (p.d.f.)
  • And its integral, the cumulative distribution
    function (c.d.f.)

3
Overview of pdf and cdf (2)
  • Corollaries of these definitions

4
Mapping x-gtx using p(x)
  • Our basic technique is to use a unique y-gtx
  • yx from (0,1) and x from (a,b)
  • We are going to use the mapping backwards

5
Mapping (2)
  • Note that
  • x(a)0
  • x(b)1
  • Function is non-decreasing over domain (a,b)
  • Our problem reduces to
  • Finding x(x)
  • Inverting to get x(x), a formula for turning
    pseudo-random numbers into numbers distributed
    according to desired p(x)

6
Mapping (3)
  • We must have

7
Resulting general procedure
  • Form CDF
  • Set equal to pseudo-random number
  • Invert to get formula that translates from x to x

8
Uniform distribution
  • For our first distribution, pick x uniformly in
    range (a,b)
  • Step 1 Form CDF.

9
Uniform distribution (2)
  • Step 2 Set pseudo-random number to CDF
  • Step 3 Invert to get x(x)
  • Example Choose m uniformly in (-1,1)

10
Discrete distribution
  • For a discrete distribution, we have N choices of
    state i, each with probability , so
  • Step 1 Form CDF

11
Discrete distribution (2)
  • Step 2 Set pseudo-random number to CDF
  • Step 3 Invert to get x(x)

12
Discrete distribution (3)
  • Example Choose among 3 states with relative
    probabilities of 4, 5, and 6.

13
Continuous distribution Direct
  • This fits the pure form developed before.
  • Form CDF
  • Set equal to pseudo-random number
  • Invert to get formula that translates from x to x

14
Continuous Direct (2)
  • Example Pick x from

15
Testing your selection
  • There are two simple ways to check a routine that
    is used to choose from a give distribution
    binning or moments
  • Binning involves dividing the domain (or part of
    it) into (usually equal-sized) regions and then
    counting what fraction of chosen values fall in
    the region.
  • The expected answer for a bin that goes from a to
    b is
  • This will be approximately equal to (and close
    enough for our purposes) the midpoint value times
    the width
  • The text notes (and Public area) have a Java
    routine that will perform a bin testing
  • Hint Do NOT code this with a IF test for each
    bin. Instead use the integer value of (chosen
    value)/(total width)(number of bins)1 to
    identify the bin that x goes into.

16
Continuous Rejection
  • Basis of rejection approach
  • Usual procedure (using a flat x distribution)
  • Find a value
  • Choose
  • Keep iff
  • Otherwise, return to 1.

17
Continuous Rejection (3)
  • Example Use rejection to pick x from

18
Basic idea of probability mixing
  • Situations arise in which you have multiple
    distributions involved in a single decision

19
Probability mixing procedure
  • Real problems do not present themselves so
    cleanly and you have to figure it out

20
Probability mixing procedure (2)
  • Procedure
  • Form and normalize the
  • Choose the distribution i using these

21
Probability mixing procedure (3)
  • Procedure
  • Form the p.d.f. for distribution i
  • Choose using

22
Probability mixing procedure (3)
  • ExampleUse probability mixing to select x from

23
Metropolis
  • This is a very non-intuitive procedure that falls
    under the category of Markov Chain MC
  • It will ULTIMATELY deliver a consistent series of
    xs distributed according to a desired functional
    form (which does NOT have to be normalized nor do
    you need to know a maximum value)
  • It has many advantages for certain physical
    problems in which the relative probability of a
    chosen point can be determined even if a closed
    form of the PDF is not available
  • The main disadvantage is that it is very hard to
    tell when the procedure has settled in to the
    point that the stream of xs can be trusted to
    deliver a consistent distribution
  • This method was (supposedly) worked out as part
    of an after-dinner conversation in Los Alamos
    after WWII

24
Metropolis (2)
  • In its simplest form, the procedure is
  • Choose x according to a distribution that has
    certain properties. We will not go into the
    details except to say that a uniform distribution
    has all the properties.
  • Evaluate the PDF at the chosen x
  • Decide whether to use the new point according to
    these rules
  • IF the PDF evaluates higher than the PREVIOUSLY
    chosen points PDF, then use the new x
  • IF the PDF evaluates less than the previous
    points PDF, then pull another random number
    between 0 and 1
  • If the new random number is LESS than the ratio
    of (new points PDF)/(old points PDF), then use
    the new x
  • If the previous test fails, then REUSE the old x

25
Other Two alternate
  • Choose x from
  • using
  • Choose x from
  • (Gaussian/normal) using
  • (Why 12?)

26
Homework from text
27
Homework from text
28
Homework from text
Write a Comment
User Comments (0)
About PowerShow.com