Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given a simple symmetric random walk ()0(Sn)n0 with 0=0S0=0, we define the following random variables: The total number of periods from 00 to 22N the

Given a simple symmetric random walk ()0(Sn)n0 with 0=0S0=0, we define the following random variables:

  • The total number of periods from 00 to 22N the random walk spends above zero:

2:=|{{1,,2}:>0}|.C2N:=|{n{1,,2N}:Sn>0}|.

  • The time of the last visit to 00 before time 22N:

2:=max{02:=0}.L2N:=max{0n2N:Sn=0}.

  • The time when the random walk reaches its unique maximum value between time 00 and 22N:

2:=argmax{:02}(this notation means that 2=max{:02}.

image text in transcribed

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 C2n, L2N, M2n, respectively, as defined above: ]: ### Insert your code here for total time spend above zero def timeAboveZero (path): ## Write your own code here return result ]: ### Insert your code here for last time the random walk visited zero def TimeofLastvisitofZero (path): ## Write your own code here return result ]: ### Insert your code here for the time when the random walk hits its maximum def timeHitMax(randomWalk): ## Write your own code here return result

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

=+ How well do you think you could do your job?

Answered: 1 week ago