Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For 2 N =1000 sample 10,000 realisations of each of the random variables respectively. Display a normalized histogram for all three simulations, along with the

For 2N=1000 sample 10,000 realisations of each of the random variables respectively. Display a normalized histogram for all three simulations, along with the probability density function of the arcsine distribution, to check the above facts numerically!

image text in transcribedimage text in transcribedimage text in transcribed
File Edit View Insert Cell Kernel Widgets Help Not Trusted | Python 3 O I+KE+WHRunICt>Code v- The purpose of this python homework is to explore the socalled 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 [0, l] is arcsine-distributed if the cumulative distribution function is given by IP[X S x] = gaming/J?) for all 0 S x S 1 and the probability density function is given by l fX(x) = W on (0, 1). Given a simple symmetric random walk ($0,120 with So = 0, we define the following random variables: - The total number of periods from 0 to 2N the random walk spends above zero: CZN1=|{n E {1,... ,2N} :S,l > 0}|. - The time of the last visit to 0 before time 2N : LIN := max{0 S n S 2N : 5,, = 0}. - The time when the random walk reaches its unique maximum value between time 0 and 2N: M2\" := argmax{S,, : 0 S n S 2N} (this notation means that SMZN = max{S,, : 0 S n S 2N}. As usual, we start with loading some packages: File Edit View Insert Cell Kernel Widgets Help i Not Trusted | Python 3 O i||+isoo 2N . MN 2 . _ oo We say that the random variables CZN/ZN, Lani/2N, MzN/ZN converge in distribution to the Arcsine Distribution. The interesting property about the Arcsine distribution is that its density (see its formula above) is U-shaped on (0, 1). In other words, if X is arcsine-distributed on (0, 1), the probabilty that X takes very small values near 0 or very large values near 1 is rather high, but the probability for taking values around, say, 0.5, is low. H In [11]: x = np. linspace(arcsine.ppf(0. 05), arcsine. ppf(0. 95), 100) i plt. title (\"Density of the arcsine distribution\") p1t.plot (x, arcsine.pdf(x), linewidth=2, color='b') Out[11]: [] Density of the arcsine distribution 41] 3.5 10 15 File Edit View insert Cell Kernel Widgets Help Not Trusted | Python 3 O ilii+iia

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

Introduction To Probability Models

Authors: Sheldon M Ross

10th Edition

0123756863, 9780123756862

More Books

Students also viewed these Mathematics questions