[R] a coding problem from Ross Simulation book

2009-02-22 Thread Ssophia
Hi, there could you help me coding this problme? I am just starting to leard the R. So I really need help Question is from Ross, Simulation, 4th Edition. ch3 14. with x1=23, x2=66 Xn=3*Xn-1+5*Xn-2 mod(100) n>=3 we will call the sequence Un=Xn/100 n>=1 fi

[R] Hi, Coding problem

2009-02-25 Thread Ssophia
Hi, there Below is my code to one Homework question. I couldn't come up with the reasonable answer. could you please help me to figure out what is the problem with my code? thank you Question is Coding P{X=j} =(1/2)^(j+1) + (1/2) *2^(j-1)/3^j my code is sim <-