IEOR 161 HW 7 PRINTOUTS - t=1:200 N(t)=ctr; i=rand(1); if...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
IEOR 161 HW 7 PRINTOUTS, Eddie Lo
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
PART A Each of these histograms represents the number of times the population value hits the number at each step. It shows how the number in the population tomorrow depends on the population today, going up with births and down by deaths. Even though it’s more likely for a death, there is still a normal distribution at each step. PART B This shows only half of the histograms I’ve just constructed in part A, suggesting the geometric random variable will give half of the Markov Chain.
Background image of page 4
MATLAB CODE clear all for k=1:10000 ctr=0; for
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t=1:200 N(t)=ctr; i=rand(1); if i<=.35 ctr=ctr+1; else if i>.35 & i<=.45 ctr=ctr; else ctr=ctr-1; end N(t)=ctr; end end A(k) = N(5); B(k) = N(10); C(k) = N(20); D(k) = N(50); E(k) = N(75); F(k) = N(100); G(k) = N(200); end hist(A,100) title( 'N(5)' ) figure hist(B,100) title( 'N(10)' ) figure hist(C,100) title( 'N(20)' ) figure hist(D,100) title( 'N(50)' ) figure hist(E,100) title( 'N(75)' ) figure hist(F,100) title( 'N(100)' ) figure hist(G,100) title( 'N(200)' ) for i=1:10000 R(i) = geornd(1-(.35/.55)); end hist(R,50) title('Geometric RV)...
View Full Document

Page1 / 5

IEOR 161 HW 7 PRINTOUTS - t=1:200 N(t)=ctr; i=rand(1); if...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online