> 科技

代写Stochastic Processes、代做Python设计编程

2024-04-25 来源:互联网


Stochastic Processes
Spring 2024 April 8, 2024
Homework #4: Exponential Distribution and Poisson Process
Due: April 25, noon
#1 (Chapter 5, Exercise 3) Let X be an exponential random variable. Without any
computations, tell which one of the following is correct. Explain your answer.
(a) E[X2|X > 1] = E[(X + 1)2]
(b) E[X2|X > 1] = E[X2]+1
(c) E[X2|X > 1] = (1 + E[X])2
#2 (Chapter 5, Exercise 4) Consider a post oce with two clerks. Three people, A,
B, and C, enter simultaneously. A and B go directly to the clerks, and C waits until either
A or B leaves before he begins service. What is the probability that A is still in the post
oce after the other two have left when
(a) the service time for each clerk is exactly (nonrandom) ten minutes?
(c) the service times are exponential with mean 1/µ?
#3 (Chapter 5, Exercise 50) The number of hours between successive train arrivals
at the station is uniformly distributed on (0, 1). Passengers arrive according to a Poisson
process with rate 7 per hour. Suppose a train has just left the station. Let X denote the
number of people who get on the next train. Find
(a) E[X],
(b) V ar(X).
#4 (Chapter 5, Exercise 59) Cars pass an intersection according to a Poisson process
with rate . There are 4 types of cars, and each passing car is, independently, type i with
probability pi,
P4
i=1 pi = 1.
(a) Find the probability that at least one of each of car types 1, 2, 3 but none of type 4 have
passed by time t.
(b) Given that exactly 6 cars of type 1 or 2 passed by time t , find the probability that 4 of
them were type 1.
1
#5 Numerical Experiment (Simulation of Poisson Process) In the lecture, we
have introduced two ways to simulate a Poisson processes. In this exercise, you need to
implement the two approaches via Python and validate that your code is correct.
In the attachment, you will find codes to generate exponential, Poisson and uniform
distributions. You can use those codes to implement your simulation. Besides, it also
contains codes to plot exponential and Poisson distribution functions. You can use those
codes to validate your simulation results.
1. Write two functions Poisson1 and Poisson2 to simulate the sequence of arrival times
of events on [0, 1] for a Poisson process with rate , where  is the input to your
functions. In Poisson1, the simulation is based on generating i.i.d. inter-arrival times.
In Poisson2, you first generate the total number of arrivals and then the conditional
distribution of arrival times.
2. Set  = 10. Run Poisson1 for 10000 rounds, record the total number of arrivals in each
round. Plot the empirical distribution of the simulated number of arrivals, and validate
your codes by comparing the empirical distribution with the theoretic distribution.
3. Set  = 10. Run Poisson2 for 10000 rounds, record the first arrival time. (What if
there is no arrival on [0, 1]?) Plot the empirical distribution of the first arrival time,
and validate your codes by comparing the empirical distribution with the theoretic
distribution.
***********************************END*********************************

请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp

作者:code
下一篇: