Solved Examples of Generating Function Fall 2008 | M 362K, Study notes of Probability and Statistics

Material Type: Notes; Class: PROBABILITY I; Subject: Mathematics; University: University of Texas - Austin; Term: Fall 2008;

Typology: Study notes

Pre 2010

Uploaded on 08/30/2009

koofers-user-3ar
koofers-user-3ar 🇺🇸

5

(1)

9 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture 5: GENERATING FUNCTIONS 1of 6
Course: M362K Stochastic Processes I
Term: Fall 2008
Instructor: Gordan Zitkovic
Lecture 5
GENERATING FUNCTIONS
The path-counting method used in the previous lecture only works for computations related to the first
nsteps of the random walk, where nis given in advance. We will see later that most of the interesting
questions do not fall into this category. For example, the distribution of the time it takes for the random
walk to hit the level l6= 0 is like that. There is no way to give an a-priori bound on the number of steps
it will take to get to l(in fact, the expectation of this random variable is +). To deal with a wider class
of properties of random walks (and other processes), we need to develop some new mathematical tools.
5.1. Definition and first properties
The distribution of an N0-valued random variable Xis completely determined by the sequence {pn}nN0
of numbers in [0,1] given by
pn=P[X=n], n N0.
As a sequence of real numbers, {pn}nN0can be used to construct a power series:
PX(s) =
X
k=0
pksk.
(5.1)
It follows from the fact that Pn|pn| 1that the radius of convergence1of {pn}nN0is at least equal to
1. Therefore, PXis well defined for s[1,1], and, perhaps, elsewhere, too.
Definition 5.1. The function PXgiven by PX(s) = P
k=0 pkskis called the generating function of the
random variable X, or, more precisely, of its pmf {pn}nN0.
Before we proceed, let us find an expression for the generating functions of some of the popular
N0-valued random variables.
Example 5.2.
(1) Bernoulli - b(p)Here p0=q,p1=p, and pn= 0, for n2. Therefore,
PX(s) = ps +q.
(2) Binomial - b(n, p)Since pk=n
kpkqnk,k= 0, . . . , n, we have
PX(s) =
n
X
k=0 n
kpkqnksk= (ps +q)n,
by the binomial theorem.
(3) Geometric - g(p)For kN0,pk=qkp, so that
PX(s) =
X
k=0
qkskp=p
X
k=0
(qs)k=p
1qs .
1Remember, that the radius of convergenceof a power series P
k=0 akxkis the largest number R[0,]such that P
k=0 akxk
converges absolutely whenever |x|< R.
Last Updated: September 25, 2008
pf3
pf4
pf5

Partial preview of the text

Download Solved Examples of Generating Function Fall 2008 | M 362K and more Study notes Probability and Statistics in PDF only on Docsity!

Course: M362K Stochastic Processes I Term: Fall 2008 Instructor: Gordan Zitkovic

Lecture 5

Generating functions

The path-counting method used in the previous lecture only works for computations related to the first n steps of the random walk, where n is given in advance. We will see later that most of the interesting questions do not fall into this category. For example, the distribution of the time it takes for the random walk to hit the level l 6 = 0 is like that. There is no way to give an a-priori bound on the number of steps it will take to get to l (in fact, the expectation of this random variable is +∞). To deal with a wider class of properties of random walks (and other processes), we need to develop some new mathematical tools.

5.1. Definition and first properties

The distribution of an N 0 -valued random variable X is completely determined by the sequence {pn}n∈N 0 of numbers in [0, 1] given by pn = P[X = n], n ∈ N 0.

As a sequence of real numbers, {pn}n∈N 0 can be used to construct a power series:

PX (s) =

∑^ ∞

k=

(5.1)^ pksk.

It follows from the fact that

n |pn| ≤^1 that the radius of convergence

(^1) of {p n}n∈N 0 is at least equal to

  1. Therefore, PX is well defined for s ∈ [− 1 , 1], and, perhaps, elsewhere, too.

Definition 5.1. The function PX given by PX (s) =

k=0 pks

k (^) is called the generating function of the

random variable X, or, more precisely, of its pmf {pn}n∈N 0.

Before we proceed, let us find an expression for the generating functions of some of the popular N 0 -valued random variables.

Example 5.2.

(1) Bernoulli - b(p) Here p 0 = q, p 1 = p, and pn = 0, for n ≥ 2. Therefore, PX (s) = ps + q. (2) Binomial - b(n, p) Since pk =

(n k

pkqn−k, k = 0,... , n, we have

PX (s) =

∑^ n

k=

n k

pkqn−ksk^ = (ps + q)n,

by the binomial theorem. (3) Geometric - g(p) For k ∈ N 0 , pk = qkp, so that

PX (s) =

∑^ ∞

k=

qkskp = p

∑^ ∞

k=

(qs)k^ =

p 1 − qs

(^1) Remember, that the radius of convergence of a power series P∞ k=0 ak^ xk^ is the largest number^ R^ ∈^ [0,^ ∞]^ such that^

P∞ k=0 ak^ xk converges absolutely whenever |x| < R.

(4) Poisson - p(λ) Given that pk = e−λ λ

k k! ,^ k^ ∈^ N^0 , we have

PX (s) =

∑^ ∞

k=

e−λ^ λk k!

sk^ = e−λ

∑^ ∞

k=

(sλ)k k!

= e−λesλ^ = eλ(s−1).

Some of the most useful analytic properties of PX are listed in the following proposition

Proposition 5.3. Let X be an N 0 -valued random variable, let {pn}n∈N 0 be its pmf, and let PX be its generating function. Then

(1) PX (s) = E[sX^ ] , s ∈ [− 1 , 1] , (2) PX (s) is convex and non-decreasing with 0 ≤ PX (s) ≤ 1 for s ∈ [0, 1] (3) PX (s) is infinitely differentiable on (− 1 , 1) with dn dsn^

PX (s) =

∑^ ∞

k=n

(5.2)^ k(k^ −^ 1)^...^ (k^ −^ n^ + 1)sk−npk, n^ ∈^ N.

In particular, pn = (^) n^1!^ d

n dsn^ PX^ (s)

s=0 and so^ s^7 →^ PX^ (s)^ uniquely determines the sequence^ {pn}n∈N 0_._

Proof. Statement (1) follows directly from the formula E[g(X)] =

k=0 g(k)pk, applied to^ g(x) =^ s

x. As far

as (3) is concerned, we only note that the expression (5.2) is exactly what you would get if you differentiated the expression (5.1) term by term. The rigorous proof of the fact this is allowed is beyond the scope of these notes. With (3) at our disposal, (2) follows by the fact that the first two derivatives of the function PX are non-negative and that PX (1) = 1. 

Remark 5..

(1) If you know about moment-generating functions, you will notice that PX (s) = MX (log(s)), for s ∈ (0, 1), where MX (λ) = E[exp(λX)] is the moment-generating function of X. (2) Generating functions can be used with sequences {an}n∈N 0 which are not necessarily pmf’s of random variables. The method is useful for any sequence {an}n∈N 0 such that the power series ∑∞ k=0 aks k (^) has a positive (non-zero) radius of convergence. (3) The name generating function comes from the last part of the property (3). The knowledge of PX implies the knowledge of the whole sequence {pn}n∈N 0. Put differently, PX generates the whole distribution of X.

Remark 5.5_._ Note that the true radius of convergence varies from distribution to distribution. It is infinite in (1), (2) and (4), and equal to 1 /q > 1 in (3), in Example 5.2. For the distribution with pmf given by pk = (^) (k+1)C 2 , where C = (

k=

1 (k+1)^2 )

− (^1) , the radius of convergence is exactly equal to 1. Can you see

why?

5.2. Convolution and moments

The true power of generating functions comes from the fact that they behave very well under the usual operations in probability.

Definition 5.6. Let {pn}n∈N 0 and {qn}n∈N 0 be two probability-mass functions. The convolution p ∗ q of {pn}n∈N 0 and {qn}n∈N 0 is the sequence {rn}n∈N 0 , where

rn =

∑^ n

k=

pkqn−k, n ∈ N 0.

This abstractly-defined operation will become much clearer once we prove the following proposition:

Proposition 5.7. Let X, Y be two independent N 0 -valued random variables with pmfs {pn}n∈N 0 and {qn}n∈N 0_. Then the sum_ Z = X + Y is also N 0 -valued and its pmf is the convolution of {pn}n∈N 0 and {qn}n∈N 0 in the sense of Definition 5.6.

The quantities E[X], E[X(X − 1)], E[X(X − 1)(X − 2)],...

are called factorial moments of the random variable X. You can get the classical moments from the factorial moments by solving a system of linear equations. It is very simple for the first few:

E[X] = E[X], E[X^2 ] = E[X(X − 1)] + E[X], E[X^3 ] = E[X(X − 1)(X − 2)]] + 3E[X(X − 1)] + E[X],...

A useful identity which follows directly from the above results is the following:

Var[X] = P ′′(1) + P ′(1) − (P ′(1))^2 ,

and it is valid if the first two derivatives of P at 1 exist.

Example 5.12. Let X be a Poisson random variable with parameter λ. Its generating function is given by

PX (s) = eλ(s−1).

Therefore, d

n dsn^ PX^ (1) =^ λ

n, and so, the sequence (E[X], E[X(X − 1)], E[X(X − 1)(X − 2)],... ) of factorial

moments of X is just (λ, λ^2 , λ^3 ,... ). It follows that

E[X] = λ, E[X^2 ] = λ^2 + λ, Var[X] = λ E[X^3 ] = λ^3 + 3λ^2 + λ,...

5.3. Random sums

Our next application of generating function in the theory of stochastic processes deals with the so-called random sums. Let {ξn}n∈N be a sequence of random variables, and let N be a random time (a random time is simply an N 0 ∪ {+∞}-value random variable). We can define the random variable

Y =

∑^ N

k=

ξk by Y (ω) =

0 , N (ω) = 0, ∑N (ω) k=1 ξk(ω),^ N^ (ω)^ ≥^1

for ω ∈ Ω.

More generally, for an arbitrary stochastic process {Xn}n∈N 0 and a random time N (with P[N = +∞] = 0), we define the random variable XN by XN (ω) = XN (ω)(ω), for ω ∈ Ω. When N is a constant (N = n), then XN is simply equal to Xn. In general, think of XN as a value of the stochasti process X taken at the time which is itself random. If Xn =

∑n k=1 ξk, then^ XN^ =^

∑N

k=1 ξk.

Example 5.13. Let {ξn}n∈N be the increments of a symmetric simple random walk (coin-tosses), and let N have the following distribution

N ∼

which is independent of {ξn}n∈N (it is very important to specify the dependence structure between N

and {ξn}n∈N in this setting!). Let us compute the distribution of Y =

∑N

k=0 ξk^ in this case. This is where

we, typically, use the formula of total probability:

P[Y = m] = P[Y = m|N = 0]P[N = 0] + P[Y = m|N = 1]P[N = 1] + P[Y = m|N = 2]P[N = 2]

= P[

∑^ N

k=

ξk = m|N = 0]P[N = 0] + P[

∑^ N

k=

ξk = m|N = 1]P[N = 1]

+ P[

∑^ N

k=

ξk = m|N = 2]P[N = 2]

(P[0 = m] + P[ξ 1 = m] + P[ξ 1 + ξ 2 = m]).

When m = 1 (for example), we get

P[Y = 1] =

Perform the computation for some other values of m for yourself.

What happens when N and {ξn}n∈N are dependent? This will usually be the case in practice, as the value of the time N when we stop adding increments will typically depend on the behaviour of the sum itself.

Example 5.14. Let {ξn}n∈N be as above - we can think of a situation where a gambler is repeatedly playing the same game in which a coin is tossed and the gambler wins a dollar if the outcome is heads and looses a dollar otherwise. A “smart” gambler enters the game and decides on the following tactic: Let’s see how the first game goes. If I lose, I’ll play another 2 games and hopefully cover my losses, and If I win, I’ll quit then and there. The described strategy amounts to the choice of the random time N as follows:

N (ω) =

1 , ξ 1 = 1, 3 , ξ 1 = − 1.

Then

Y (ω) =

1 , ξ 1 = − 1 , −1 + ξ 2 + ξ 3 , ξ 1 = 1.

Therefore,

P[Y = 1] = P[Y = 1|ξ 1 = 1]P[ξ 1 = 1] + P[Y = 1|ξ 1 = −1]P[ξ 1 = −1] = 1 · P[ξ 1 = 1] + P[ξ 2 + ξ 3 = 2]P[ξ 1 = −1] = 12 (1 + 14 ) = 58.

Similarly, we get P[Y = −1] = 14 and P[Y = −3] = 18. The expectation E[Y ] is equal to 1 · 58 + (−1) · 14 + (−3) · 18 = 0. This is not an accident. One of the first powerful results of the beautiful martingale theory states that no matter how smart a strategy you emply, you cannot beat a fair gamble.

We will return to the general (non-independent) case in the next lecture. Let us use generating functions to give a full description of the distribution of Y =

∑N

k=0 ξk^ in this case.

Proposition 5.15. Let {ξn}n∈N be a sequence of independent N 0 -valued random variables, all of which share the same distribution with pmf {pn}n∈N 0 and generating function Pξ (s). Let N be a random time

independent of {ξn}n∈N_. Then the generating function_ PY of the random sum Y =

∑N

k=0 ξk^ is given by PY (s) = PN (Pξ (s)).

Proof. We use the idea from Example 5.13 and condition on possible values of N. We also use the following fact (Tonelli’s theorem) without proof:

If ∀ i, j aij ≥ 0 , then

∑^ ∞

k=

∑^ ∞

i=

aij =

∑^ ∞

i=

∑^ ∞

k=

(5.3)^ aij.