



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Information about assignment 6 for the course ece 541: probability and stochastic processes, which was due on october 30, 2008. The assignment involves analyzing a game where the player starts with an initial fortune and bets one dollar each time, with the probability of winning each hand being p. The goal is to characterize the probability q(x0) that the player eventually wins, given an initial fortune x0. The mathematical description of the problem, as well as the solution using conditional expectations.
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!




ECE 541 Probability and Stochastic Processes; Fall 2008 Assignment 6; Due date: Tuesday, Oct. 30, 2008
∞ i=1Ωi^ as^ Y^
1 , Y 2 ,.. .). Finally, we define^ P^ on Ω cylinders with measurable bases (as done in the notes) by forming the product of the probabilities of the coordinates while enforcing independence. For each (Ωi, Fi), define Pi{H} = p and q = 1 − p. Now define your fortune at time n ≥ 1 by
Xn = Xn− 1 + I{Yn=1} − I{Yn=0}
with the initial condition X 0 = x 0 ≥ 0. Let L ∈ IN be given, and define T 4 = inf{k : Xk = 0 or Xk = L}. Finally, let Q(x 0 ) =^4 P{XT = L}.
a) Use conditional expectations to prove that
Q(x) = pQ(x + 1) + (1 − p)Q(x − 1), x = 1,... , L − 1 , (1)
with Q(0) = 0 and Q(L) = 1.
Let q = 1 − p and define Y (^) n′ = Yn+1. Note that P{XT = L|X 1 } = Q′(X 1 ), where Q′(x) = P{X T′ ′ = L} (with X′(0) = x), and T ′^ and X n′ are defined similarly to T and Xn, respectively, but with the Yns replaced with Y (^) n′s. Note that Q and Q′^ are identically distributed. Thus, Q(x) = P{XT = L} = E[Q′(X 1 )] = Q(x + 1)p + Q(x − 1)q.
b) Solve the difference equation in (1) analytically.
The Characteristic equation of the above difference equation is pr^2 − r + q = 0. The roots are r 1 = 1 and r 2 = q/p. Then, Q(x) = cr 1 x + drx 2. Case (1): p 6 = 1/ 2 Using the boundary conditions Q(0) = 0 and Q(L) = 1, we get c = − (^) (q/p^1 )L− 1 , d = (^) (q/p^1 )L− 1 , and Q(x) = (q/p)
x− 1 (q/p)L− 1
Case (2): p = 1/ 2
Here, r 1 = r 2 = 1, and Q(x) = xL.
c) let P (x 0 ) =^4 P{XT = 0}. Determine P (x) directly and show that P (x) + Q(x) = 1.
Let P (x) = P{XT = 0}. Similarly to the case of Q(x), we derive P (x) = P (x+1)p+P (x−1)q, with boundary conditions P (0) = 1 and P (L) = 0. After solving for P (x), we discover that P (x) = 1 − Q(x).
d) Use the above results to describe in which sense Xn is convergent and characterize its limit X.
In class we will show that T < ∞ a.s. Let X = LIA, where A is any event with P(A) = Q(x). Since 0 and L are absorbing boundaries for the sequence Xn, {T < ∞}∩({XT = L}∪{XT = 0 }) = {Xn = L, for some finite n} ∪ {Xn = 0, for some finite n}. Since T < ∞ a.s., P({Xn = L, for some finite n} ∪ {Xn = 0, for some finite n}) = 1. Hence, Xn converges almost surely to X.
Bn = ρBn− 1 + W (n), n > 0 , 0 < |ρ| < 1 ,
where the initial state B 0 is a random variable uniformly distributed in [0, 32]. Assume that W (1), W (2),... , are iid, and let the constants μW and σ W^2 denote the mean and variance of the sequence W (n), respec- tively. Finally, let μB (n) =^4 E[Bn] and σ B^2 (n) = var(^4 Bn).
a) Calculate μB (0) and σ^2 B (0)
Suppose that B 0 is uniformly distributed in the interval [0, 32] (you may assume other dis- tributions as well). Hence, μB (0) =^4 μB 0 = 322 − 0 = 16 and σ^2 B (0) =^4 σ^2 B 0 = (32−0)
2 12 = 85.^3.
b) Find an expression for μB (n) that explicitly shows the dependence on μB (0) and μW. Show that μB (n) is a constant if we select μW = (1 − ρ)μB (0). What is the constant mean μB?
μB (n) = E[B(n)] = E[ρBn− 1 + W (n)] =... = E[ρnB(0) +
∑n i=1 ρ (n−i)W (i)] = ρnE[B(0)] + ∑n i=1 ρ(n−i)E[W^ (i)] =^ ρnμB 0 +^ 1 −ρn 1 −ρ μW^.^ If^ μW^ = (1^ −^ ρ)μB^0 then^ μB^ (n) =^ ρ nμB 0 + (1 − ρn)μB 0 = μB 0.
c) Find an expression for σ B^2 (n), for the case when μW = (1 − ρ)μB (0). Show that σ^2 B (n) is a constant if we select σ W^2 = (1 − ρ^2 )σ B^2 (0). What is the constant variance σ^2 B.
σ^2 B (n) = var(B(n)) = E[B^2 (n)] − E[B(n)]^2 = E[(ρBn− 1 + W (n))^2 ] − μ^2 B (n) = E[(ρnB(0) +
∑n i=1 ρ (n−i)W (i)) (^2) ] − μ 2 B (n) = E[(ρnB(0))^2 + ( ∑n i=1 ρ(n−i)W^ (i))^2 + 2ρnB(0)^
∑n i=1 ρ(n−i)W^ (i)]^ −^ μ^2 B (n) = ρ^2 nE[B^2 (0)]+
∑n i=1 ρ (2n− 2 i)E[W 2 (i)]+[(∑n i=1 ρ (n−i)) (^2) −∑n i=1 ρ (2n− 2 i)]E[W (i)] (^2) +2ρnE[B(0)] ∑n i=1 ρ (n−i)E[W ( μ^2 B = ρ^2 n(σ^2 B 0 + μ^2 B 0 ) + 1 −ρ
2 n 1 −ρ^2 (σ
2 W + (μW^ ) (^2) ) + [( 1 −ρn 1 −ρ )
(^2) − 1 −ρ^2 n 1 −ρ^2 ](μW^ )
(^2) + 2ρnμB 0
1 −ρn 1 −ρ μW^ −^ μ
2 B = ρ^2 n(σ^2 B 0 + μ^2 B 0 ) + 1 −ρ 2 n 1 −ρ^2 σ
2 W + (^
1 −ρn 1 −ρ )
(^2) (μW ) (^2) + 2ρnμB 0
1 −ρn 1 −ρ μW^ −^ μ
2 B. Since μW = (1 − ρ)μB 0 σ^2 B (n) = ρ^2 n(σ B^20 + μ^2 B 0 ) + 1 −ρ 2 n 1 −ρ^2 σ
2 W + (1^ −^ ρ n) (^2) μ 2 B 0 + 2ρ n(1 − ρn)μ 2 B 0 −^ μ 2 B 0 = ρ^2 nσ^2 B 0 + 1 −ρ 2 n 1 −ρ^2 σ
2 W Now if we select σ W^2 = (1 − ρ^2 )σ B^20 , we obtain σ^2 B (n) = σ^2 B 0.
d) Use Matlab to generate 100 realizations, each of length 1000, of the process Bn using the conditions μW = (1 − ρ)μB (0) and σ^2 W = (1 − ρ^2 )σ^2 B (0). Find the sample mean for the 1000-point realizations by averaging the 100 realizations pointwise (i.e., for each n) and plot five of the 1000-point realizations as functions of n. Assume that ρ = 0.8.
11/4/08 11:41 PM C:\Documents and Settings\hayat\My Documents\My St...\Program3.m 1 of 2
% Random Process Simulation % ECE 541, HW6, Fall 2008 % Created by Prof. Hayat, Nov. 2006, revised Nov. 2008
close all m n % Parameter setting % Range of uniform distribution a = b = % rho r B=zeros(m,n) % mean and variance of B var_B_0=(32) mean_B_ % mean and variance of W mean_W=(1-r)mean_B_ var_W=(1-r^2)var_B_ sdev_W=sqrt(var_W) % Generate B0, uniform distribution B(:,1)=a+(b-a)rand(m,1) for i=2:n % Generate W % Assume W~Gaussian for convenience % Because Gaussian has the mean and var in the pdf equation. W=mean_W+(sdev_Wrandn(100,1)) % Generate B B(:,i)=r*B(:,i-1)+W end
figure(1) N=[1:n] K=[1 10 20 75 100] plot(N,B(1,:),'b.',N,B(20,:),'m.',N,B(75,:),'g.') hold on mean_B_n=mean(B) plot(N,mean_B_n,'k') xlabel('TIME {\it n}') ylabel('Sample mean of B(n) and five sample realizations') legend(['m = ' num2str(K(1))],['m = ' num2str(K(3))],['m = ' num2str(K(4))],'average over 100 realizations') mean(mean_B_n) hold off
figure(2) var_B_n=var(B) plot(N,var_B_n,'k-') xlabel('TIME {\it n}') ylabel('Sample variance of B(n)') mean(var_B_n)
Program
Current plot held
Current plot released
Time average of sample mean = 16.
Time average of sample variance = 86.
0 100 200 300 400 500 600 700 800 900 1000
0
10
20
30
40
50
60
TIME n
Sample mean of B(n) and five sample realizations
m = 1 m = 20 m = 75 average over 100 realizations
(^500 100 200 300 400 500 600 700 800 900 )
60
70
80
90
100
110
120
130
140
TIME n
Sample variance of B(n)