Exercises: Stochastic processes - Lunds universitethome.thep.lu.se/~henrik/FYTN03/exercises3.pdf ·...

download Exercises: Stochastic processes - Lunds universitethome.thep.lu.se/~henrik/FYTN03/exercises3.pdf · Exercises: Stochastic processes 1. Calculate the first three cumulants hXni c

If you can't read please download the document

Transcript of Exercises: Stochastic processes - Lunds universitethome.thep.lu.se/~henrik/FYTN03/exercises3.pdf ·...

  • FYTN03HT09

    Exercises: Stochastic processes

    1. Calculate the first three cumulants Xnc (n = 1, 2, 3) for a normally distributed randomnumber X with mean and variance 2. Use the fact that the characteristic function isthe Fourier-transform of the probability distribution and that the cumulants are definedin terms of the Taylor expansion of the logarithm of the characteristic function.

    2. Consider the probability distribution for the 2-distribution with n degrees of freedom:

    p(x) =

    {

    xn/21ex/2/[2n/2(n/2)] if x 00 otherwise

    where (x) =

    0 ettx1dt is the gamma function. What is the characteristic function?

    What are the first two cumulants? What are the first two moments of p(x)?

    3. Consider the (discrete) Poisson distribution:

    pn = e

    n

    n!n = 0, 1, 2, 3, .. ( > 0)

    Show that this distribution is normalized:

    n=0 pn = 1. What is the first moments ?What is the variance 2?

    4. First-passage time problems can be solved by introducing an absorbing boundary into theequations of motion. Alternatively, renewal theory relates the first passage time densityf(t) (from x = x0 to the absorbing point x = c) to the probability distribution, P (x, t|x0),in the absence of the boundary, according to:

    f(s) =P (c, s|x0)P (c, s|c)

    where a hat denotes the Laplace-transform: A(s) =

    0 estA(t). Show by explicit calcu-

    lation that the result above agrees with the result in the lecture notes for a one-dimensionalrandom walker satisfying the diffusion equation: P (x, t|x0)/t = D2P (x, t|x0)/x2.

    5. Show how a random number with frequency function

    p(x) =

    {

    (1 + a)xa if 0 < x < 10 otherwise

    (a > 1)

    can be obtained from a rectangularly distributed random number.

    6. Show how a random number with frequency function

    p(x) =

    {

    4/[(1 + x2)] if 0 < x < 10 otherwise

    can be obtained from rectangularly distributed random numbers by (a) the transformationmethod, and (b) the accept/reject method.

  • Solutions

    1. Calculate the first three cumulants Xnc (n = 1, 2, 3) for a normally distributed randomnumber X with mean and variance 2.

    Solution: The characteristic function is the Fourier-transform of the probability distribu-tion.

    (k) =1

    22

    dxeikxe(x)2/22

    we do the variable transformation y = (x )/ which gives us

    (k) =12

    dyeik(y+)ey2/2 = eikk

    22/2 12

    dye(iky)2/2

    where the integral is simply

    2. Now we see that the logarithm of the characteristicfunction is simply given by

    ln (k) = ik k22/2Identifying the powers of k gives Xc = , X2c = 2 and Xnc = 0 for n > 2.

    2. Consider the probability distribution for the 2-distribution with n degrees of freedom:

    p(x) =

    {

    xn/21ex/2/[2n/2(n/2)] if x 00 otherwise

    where (x) =

    0 ettx1dt is the gamma function. What is the characteristic function?

    What are the first two cumulants? What are the first two moments of p(x)?

    Solution: Taking the Fourier-transform of p(x) gives:

    (k) =

    eikxp(x)dx =1

    2n/2(n/2)

    0ex(ik1/2)xn/21dx.

    Making the variable substitution s = (1/2 ik)x we obtain:

    (k) =1

    2n/2(1/2 ik)n/2

    0 essn/21ds

    (n/2)= (1 2ik)n/2

    where we in the last step used the definition of the gamma function. In order to determinethe cumulants we expand:

    ln (k) = ln[(1 2ik)n/2] = n2

    ln(1 2ik) = n(ik) + n(ik)2 + O(k3)

    from which we identifyXc = n X2c = 2n

    Using the relation between cumulants and moments: Xc = X and X2c = X2X2we obtain the moments:

    X = n X2 = n(n + 2)

  • 3. Consider the (discrete) Poisson distribution:

    pn = e

    n

    n!n = 0, 1, 2, 3, .. ( > 0)

    Show that this distribution is normalized:

    n=0 pn = 1. What is the first moments ?What is the variance 2?

    Solution: From the fact that the Taylor-series of e is

    n=0 n/n! it follows immediately

    that

    n=0 pn = 1. The first moment is:

    =

    n=0

    npn =

    n=1

    npn = e

    n=1

    n

    (n 1)! = e

    n=1

    n1

    (n 1)!

    e

    =

    The variance is:

    2 =

    n=0

    (n )2pn =

    n=0

    ( n2

    n(n1)+n

    2n + 2)pn

    =

    n=0

    n(n 1)pn + (1 2)

    n=0

    npn

    +2

    n=0

    pn

    1

    = e2

    n=2

    n2

    (n 2)!

    e

    + 2 =

    i.e., for the Poisson distribution = 2 = .

    4. First-passage time problems can be solved by introducing an absorbing boundary into theequations of motion. Alternatively, renewal theory relates the first passage time densityf(t) (from x = x0 to the absorbing point x = c) to the probability distribution, P (x, t|x0),in the absence of the boundary, according to:

    f(s) =P (c, s|x0)P (c, s|c)

    where a hat denotes the Laplace-transform: A(s) =

    0 estA(t). Show by explicit calcu-

    lation that the result above agrees with the result in the lecture notes for a one-dimensionalrandom walker satisfying the diffusion equation: P (x, t|x0)/t = D2P (x, t|x0)/x2.Solution: The solution to the 1d diffusion equation with initial condition P (x, t = 0|x0) =(x x0) is:

    P (x, t|x0) =1

    (4Dt)1/2exp

    (

    (x x0)2

    4Dt

    )

    Taking the Laplace-transform gives:

    P (x, s|x0) =1

    2

    s/Dexp

    (

    |x x0|

    s/D

    )

  • We hence get:

    f(s) =P (c, s|x0)P (c, s|c)

    = exp

    (

    |c x0|

    s/D

    )

    so that by inverse Laplace-transform we have:

    f(t) =|c x0|4Dt3

    exp

    (

    (c x0)2

    4Dt

    )

    .

    in agreement with the lecture notes.

    5. Show how a random number with frequency function

    p(x) =

    {

    (1 + a)xa if 0 < x < 10 otherwise

    (a > 1)

    can be obtained from a rectangularly distributed random number.

    Solution: The cumulative distribution is

    C(x) =

    x

    0(1 + a)(x)adx = xa+1.

    If R denotes a uniform random number [0, 1] then we set

    C(X) = R Xa+1 = R X = R1

    a+1

    6. Show how a random number with frequency function

    p(x) =

    {

    4/[(1 + x2)] if 0 < x < 10 otherwise

    can be obtained from rectangularly distributed random numbers by (a) the transformationmethod, and (b) the accept/reject method.

    Solution: (a) The cumulative distribution is

    C(x) =4

    x

    0

    dx

    1 + (x)2=

    4

    tan1(x)

    so that by introducing a uniform random number R [0, 1] and setting C(X) = R we getX = tan(R/4).

    (b) The simplest overestimating function is f0(x) = 4/. Thus,

    p0(x) =f0(x) 10 f0(x)

    = 1, if 0 < x < 1

    and 0 otherwise. So, we first generate a random number Xtrial from the p0(x) (uniform)distribution. We then draw a new uniform random number R and accept Xtrial withprobability p(Xtrial)/f0(Xtrial) =

    11+X2

    trial

    , i.e., if

    R