Professional Documents
Culture Documents
Matematikcentrum
Matematisk statistik
1 Preparations
Read through the instructions and answer the following questions. It is required
that you bring your written answers with you to the computer lab. In the begin-
ning of the computer session the lab supervisors will check your answers before
you carry out the rest of the assignment.
2. What is the distribution of the number of events N (t) in the interval (0, t]
for a Poisson process? What is the mean and standard deviation of N (t)?
5. If one has observed two independent Poisson processes with different in-
tensities λ1 and λ2 , during different time intervals, how can one compute a
confidence interval for the difference λ1 − λ2 ?
1
2 The Poisson process
Log in at one of the PCs in the computer room MH:230 or MH:231 with your
STIL-account. Choose the latest version of Matlab from the Start menu. If you
have problems either logging in or starting Matlab, ask for help.
After starting Matlab write mh init(´fmsf15´) in the command window in
Matlab. This will add the directory containing the m-files which you will use
in this assignment.
This shows that the transformed variable Y has distribution function F , and we
can obtain exponentially distributed variables from a uniform U as
Y = − ln (1 − U )/λ,
2
Such a vector may be created as N=1:100, if we want 100 events. The process can
be plotted by stairs(T,N).
Choose an intensity λ and make a few simulations using different random se-
quences u. Plot them in the same figure using hold.
Make a somewhat longer realisation and compute a confidence interval. How does
the width of the confidence interval change with the number of events?
Answer:
3
Estimate the intensity λ and compute a confidence interval. Give the answer in
the unit catastrophes/year.
Answer:
The intensity does not appear constant throughout the whole period. Split the
data into two time periods with two different intensities λ1 and λ2 . Estimate the
intensities and compute a confidence interval for the difference λ1 − λ2 .
Answer:
Plot the process with years on the x-axis by, for example,
>> stairs(coal(:,3)+coal(:,4)/365,N)
When do the changes occur? What can the underlying reasons be? Also look at
the accumulative casualties process by
>> stairs(coal(:,3)+coal(:,4)/365,cumsum(coal(:,6)))
Answer:
4
Simulate a Poisson process on the triangle with corners in (0, 0), (0, 1) and (1, 0).
Is there more that one way of doing that?
Answer:
3.1 Simulation
Find a way to simulate a non-homogeneous process over the interval [0, t] with
t = 10, having intensity λ(u) = 4(1 − cos(u2 /4)). Plot the Poisson points Ti and
the intensity function in the same graph, using e.g.
>> u=0:0.01:10;
>> plot(u,4*(1-cos(u.^2/4)),T,0*T,’x’)
N (S)
X
l(θ) = Λ(S) + ln(N (S)!) − ln(λ(Tk ))
k=1
RS
where Λ(S) = 0
λ(t)dt = θ1 S.
The following pre-written functions will be used in this part:
• inhom_poisson_simulate: Simulates a random sample from the model.
5
Use help inhom_poisson_simulate, etc for more information and also read the
Matlab code.
Start with parameter values S = 10 and θ = [20, 15, 0]. Use inhom_poisson_simulate
and simulate a sample with these parameters. As before, plot the intensity fun-
ction and simulated event points and convince yourself that the results are as
expected.
Answer:
The accuracy of the estimates depends on the true parameter values. Simulate
new samples with different parameter values and run the estimation function for
each sample. How low can you make the intensity before the estimates deteriorate
significantly? Also increase the intensity; are the three parameters equally easy
to estimate accurately? Why?
Answer: