python homework 4 arcsine laws the purpose of this python homework is to explore the 5153698

Python Homework 4: Arcsine Laws The purpose of this python homework is to explore the so-called Arcsine laws numerically. The arcsine laws are a number of fascinating results for random walks. They relate path properties of the simple symmetric random walk to the arcsine distribution A random variable X on [O, 1 is arcsine-distributed if the cumulative distribution function is given by or all0sx3 1 and the probability density function is given by on (0, 1) Given a simple symmetric random walk (Sn20 with So 0, we define the following random variables: PX xl =-arcsin(VR) fx(x) = The total number of periods from 0 to 2N the random walk spends above zero: The time of the last visit to 0 before time 2N . The time when the random walk reaches its unique maximum value between time 0 and 2N M2N argmxS 0n S 2N (this notation means that SMmaxS:0nS2N As usual, we start with loading some packages:Problem 2 (6 points) Write three Python functions which take a path of a random walk as an input and then compute the values of the random variables CNL2N M2N respectively, as defined above: In [ ]: | ### Insert your code here for total time spend above zero def timeAboveZero (path): ## Write your own code here return result In [ ] : ### Insert your code here for last time the random walk visited zero def TimeOfLastVisitofZero (path): ## Write your own code here return result In [ ]: | ### Insert your code here for the time when the random walk hits its maximum def timeHitMax(randombalk) ## Write your own code here return result

Python Homework 4: Arcsine Laws The purpose of this python homework is to explore the so-called Arcsine laws numerically. The arcsine laws are a number of fascinating results for random walks. They relate path properties of the simple symmetric random walk to the arcsine distribution A random variable X on [O, 1 is arcsine-distributed if the cumulative distribution function is given by or all0sx3 1 and the probability density function is given by on (0, 1) Given a simple symmetric random walk (Sn20 with So 0, we define the following random variables: PX xl =-arcsin(VR) fx(x) = The total number of periods from 0 to 2N the random walk spends above zero: The time of the last visit to 0 before time 2N . The time when the random walk reaches its unique maximum value between time 0 and 2N M2N argmxS 0n S 2N (this notation means that SMmaxS:0nS2N As usual, we start with loading some packages:

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now