Sie sind auf Seite 1von 8

World appl. programming, Vol(4), No (4), April, 2014. pp.

124-131

TI Journals

ISSN:

World Applied Programming

2222-2510

www.tijournals.com

Copyright 2014. All rights reserved for TI Journals.

On simulating point processes based on efficient algorithms


Behrouz Fathi-Vajargah
Department of Statistics, Faculty of Mathematical Sciences, University of Guilan, Iran.

Hassan Khoshkar-Foshtomi*
Department of Statistics, Faculty of Mathematical Sciences, University of Guilan, Iran.
*Corresponding author: hassan.khoshkar@yahoo.com

Keywords

Abstract

Monte Carlo simulation


Nonhomogeneous Poisson process
Point processes
Poisson process.

In this paper we first study on main concepts of one and two dimensional point processes. Then, we
bring the simulation procedures of these processes based on efficient Monte Carlo methods. Finally,
we study the Poisson point process and in its particular case and one of its most important and complex
case i.e. nonhomogeneous and show its behavior based on our introduced efficient algorithm.

1.

Introduction

1.1 An introduction to 1D and 2D point processes


One dimensional point process (time) is a useful model for the sequence of random times when a particular event occurs.
For example, the random times when a hospital receives emergency calls may be modeled as a point process. Each emergency call happens at an
instant, or point, of time. There will be a random number of such calls in any period of time, and they will occur at random instants of time.

Figure 1. A point process in time


A spatial point process is a useful model for a random pattern of points in d -dimensional space, where d 2. For example, if we make a map
of the locations of all the people who called the emergency service during a particular day, this map constitutes a random pattern of points in two
dimensions. There will be a random number of such points, and their locations are also random [1, 2].

Figure 2. A point process in two dimensions

125

On simulating point processes based on efficient algorithms


World Applied Programming Vol(4), No (4), April, 2014.

1.2 Specification of a point process on the line


A point process on the line may be taken as modeling the occurrences of some phenomenon at the time epochs

t i with i in some suitable

index set. For such a process, there are four equivalent descriptions of the sample paths:
(i) Counting measures;
(ii) Non decreasing integer valued step functions;
(iii) Sequences of points;
(iv) sequences of intervals.
In describing a point process as a counting measure, it does not matter that the process is on the real line. However, for the three other methods
of describing the process, the order properties of the reals are used in an essential way. While the methods of description may be capable of
extension into higher dimensions, they become less natural and, in the case of (iv), decidedly artificial [3].
1.3 Formulation of point processes
There are some differences between the theories of one-dimensional and higher dimensional point processes, because one dimensional time has a
natural ordering which is absent in higher dimensions. A one dimensional point process can be handled mathematically in many different ways.
We may study the arrival times

T 1 T 2 ...

where

Ti

is the time at which the

i th

point (emergency call) arrives. Using these random

variables is the most direct way to handle the point pattern, but their use is complicated by the fact that they are strongly dependent, since

T i T i 1 .

Figure 3. Arrival times T i

Alternatively we may study the inter arrival times S i


renewal processes), the random variables

S 1 , S 2 ,...

T i 1 T i .

These have the advantage that, for some special models (Poisson and

are independent [1].

Figure 4. Inter-arrival times

Si

One of the famous point processes is Poisson process.

2.

Poisson process

Suppose that events are occurring at random time points and let
These events are said to constitute a Poisson process having rate

N (t ) denote the number of events that occur in the time interval [0, t ] .
>0, if

(a)

N (0) 0 ,

(b)

The numbers of events occurring in disjoint time intervals are independent,

(c)

The distribution of the number of events that occur in a given interval depends only on the length of the interval and not on its
location,

Behrouz Fathi-Vajargah, Hassan Khoshkar Foshtomi *

126

World Applied Programming Vol(4), No (4), April, 2014.

lim

(d)

h 0

lim

(e)

P N (h ) 1
h
P N (h ) 2
h

h 0

Thus condition (a) states that the process begins at time 0. Condition (b), the independent increment assumption, states that the number of events
by time t [i.e., N (t ) ] is independent of the number of events that occur between t and t s [i.e., N (t s ) N (t ) ]. Condition (c), the
stationary increment assumption, states that the probability distribution of N

(t s ) N (t )

is the same for all values of t . Conditions (d)

and (e) state that in a small interval of length h , the probability of one event occurring is approximately h , whereas the probability of two or
more is approximately 0.
The Poisson process is good for modeling many phenomena including the emission of particles from a radioactive source, market crashes, and

i th

the arrivals of customers to a queue. The

inter arrival time, X

is defined to be the interval between the

(i 1)th

and

i th

arrivals of the

Poisson process, and it is easy to see that the X i 's are IID ~ Exp ( ) [14].
2.1 The nonhomogeneous Poisson process
A nonhomogeneous Poisson process N

(t )

is obtained by relaxing the assumption that the intensity is constant. Instead we take it to be a

deterministic function of time, (t ) . The nonhomogeneous Poisson process can often be very important in practice. Consider, for example, a
person who is measuring particle emissions from a radioactive source while moving closer to the source. Or consider the occurrence of a market
crash or a company bankruptcy as economic variables change.

m (t )

The function

defined by

(s ) ds

m (t ) =

t 0

(1)

is called the mean-value function. The following result can be established.


Theorem 2.1.

N (t s ) - N (t )

m (t s ) - m (t ) . The quantity (t ) , called the intensity at


t [Note that when (t ) the nonhomogeneous reverts to the

is a Poisson random variable with mean

time t , indicates how likely it is that an event will occur around the time
usual Poisson process]. The following theorem gives a useful way of interpreting a nonhomogeneous Poisson process [14].

Theorem 2.2.

Let

N (t )

be a Poisson process with constant intensity . Suppose that an arrival that occurs at time

is counted with

p (t ) , independently of what has happened beforehand. Then the process of counted arrivals is a nonhomogeneous Poisson process
with intensity (t ) p (t ) [14].
probability

3.

The inverse transform method for continuous random variables

Suppose now that

is a continuous random variable and we want to generate a value of X . Recall that when

generate a variate by first generating


continuous, we might generate

and then setting

X xj

if

as follows.

3.1 The inverse transform algorithm for continuous random variables:


1. Generate U
2. Set

X x if FX (x ) x

, i.e., set X

FX 1 (U ) .

Example 3.1. (Generating an exponential random variable)

X ~ Exp ( )
FX (x ) 1 e x

Problem: Generate
Solution:

F ( x j 1 ) U F ( x j ) .

was discrete, we could

This suggests that when

is

127

On simulating point processes based on efficient algorithms


World Applied Programming Vol(4), No (4), April, 2014.

Compute FX

4.

(u ) : u 1 e x

so

1
log(1 u )

can use x

log(u )
.

Simulation on point process

X be a random variable with continuous distribution function F (.) and integrated Hazard function
H (x ) log(1 F (x )) . Then Y H (X ) has a unit exponential distribution (i.e. with unit mean). Conversely, if Y is a random
1
variable with unit exponential distribution, then X H (Y ) has distribution function F (.) .
If, therefore, we have a sequence of interval lengths X 1 , X 2 ,... with continuous distributions F1 (t ), F2 (t ),... , the corresponding
sequence of transformed random variables Y 1 H 1 ( X 1 ), Y 2 H 2 ( X 2 ),... is a sequence of unit exponential random variables [3].
Lemma 4.1. Let

Algorithm 4.1. (Simulation of point processes by the inverse transform method)


1. Simulate a sequence Y 1 , Y 2 ,... of unit exponential random variables (respectively, a sequence

U 1,U 2 ,...

of uniform

U (0,1)

random

variables).
2. Transform to the sequence of successive interval lengths
1

X 1 H 11 (Y 1 ), X 2 H 2 1 (Y 2 ),...

(respectively, the sequence

F1 (U 1 ), F2 (U 2 ),... ).
3. Form the point process

5.

(t 1 , t 2 ,...)

by setting t 1

X 1 , t 2 X 1 X 2 ,... [3, 12].

Generating a nonhomogeneous Poisson process (NHPP)

We can simulate a Poisson process with intensity


Suppose now

t T

N (t )

by simply generating the inter arrival times, X

. Then we can use the following algorithm, based on theorem 2.2, to simulate

I =0
Generate U 1
logU 1
Set t t

While t T
Generate U 2
(t )
If U 2
then

Set I I 1 , S ( I ) t
Generate U 1
logU 1
Set t t

=0,

where

is a nonhomogeneous Poisson process with intensity (t ) and that there exists a

N (t ) [14, 15].

Algorithm 5.1. (The thinning algorithm for simulating T time units of a NHPP)
Set

X i ~ Exp ( ) [15].
such that (t )

for all

Behrouz Fathi-Vajargah, Hassan Khoshkar Foshtomi *

128

World Applied Programming Vol(4), No (4), April, 2014.

(t ) is the intensity function and is such that (t ) . The final value of I represents the number of events timeT , and
S (1),..., S (I ) are the event times. The above procedure, referred to as the thinning algorithm (because it thins the homogeneous Poisson
points), is clearly most efficient, in the sense of having the fewest number of rejected events times, when (t ) is near throughout the
In the above

interval.

6.

Numerical results

In this section, we solve examples by two algorithms, and compare our numerical solutions together.

Example 6.1.

1)

0
F (x )
x
1 e

x 1
1 x

0
F 1 (x )
log(1 x )

Figure 5. n=20

Figure 6. n=70

Figure 7. n=200

x 0
0 x 1

129

On simulating point processes based on efficient algorithms


World Applied Programming Vol(4), No (4), April, 2014.

2)

x
F (x )
2
1

x 0

F ( x ) 4x 2
1

0x 4
x 4

Figure 8. n=20

x 0
0 x 1
x 1

Figure 9. n=70

Figure 10. n=200

We used modified algorithm 4.1 and considered two related examples. First, we employed the algorithm based on partitioning rand library

i 1 i i 1
(
) . In fact, this transformation will convert the rand
n
n
n
i 1 i
th
, ] as a subset of (0,1) . This will
function generated random number i.e.U i rand (1,1) , in i time, to the desired interval [
n n
control and increase the uniformity of random number generated on the whole interval (0,1) .
function of Matlab software on

(0,1) interval via the equation X i

Second, we used of less interval lengths on the algorithm to have accurate study on the steps of convergence of algorithm.

Behrouz Fathi-Vajargah, Hassan Khoshkar Foshtomi *

130

World Applied Programming Vol(4), No (4), April, 2014.

Example 6.2. (Nonhomogeneous Poisson process) Now, we write a program that uses the thinning algorithm 5.1 to generate the first 10 time
units of a nonhomogeneous Poisson process with intensity function

(t ) 3

(t ) such as:

4
t 1

(2)

Solve1:

Figure 11. (

=30+4log(11), T

=10)

Solve2:

Figure 12. (

=30+4log(11), T =10,

p (t ) =

1
3t 7
(
))
30 4log(11) t 1

131

On simulating point processes based on efficient algorithms


World Applied Programming Vol(4), No (4), April, 2014.

In Figure 11, we presented the number of events I in horizontal axis in contrast to


showed the non-decreasing behavior between I and

(t )

S (I )

using

S (I )

of events times in vertical axis. The sketched figure

(t ) subject to (t ) (0 t T ) where

3t 7
1
3t 7
30 4log(11) (
(
))

t 1
30 4 log(11) t 1

(3)

p (t )

constructed based on theorem 2.2, We note that since (0 t


choose

10) (t ) ,

is the least upper bound or supremum of

30 4 log(11) .

Also, in Figure 12, we presented the number of events I in horizontal axis in contrast to
figure showed the strictly increasing behavior between
growing, non-decreasingly and increasingly, respectively.

7.

(t ), then we

and

S (I ) using p (t ) .

S (I ) of events times in vertical axis. The sketched

Figure11 and Figure 12 prove that the events times are

Conclusion

We first introduced the procedure of simulating point process based on our modified algorithm 4.1 and we also studied the behavior of this
process. Then, we simulated nonhomogeneous Poisson point process and showed the behavior of this process. In fact, we studied the behavior of
events times of this process based on intensity function

(t ) and probability function p (t ) . We concluded that events times based on p (t )

are growing more effectively, but for the same time study based on intensity function

(t ) there is a little bit hidden.

References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]

Baddeley, A., Turner, R., Spatstat, An R package for analyzing spatial point patterns. J. Statist. Software, 12(6), 142, URL:www.jstatsoft.org,
ISSN:15487660, (2005).
Baddeley, A., Turner, R., Modeling spatial point patterns in R. In, Baddeley, A., Mateu, J., Stoyan, D. (eds) Case Studies in Spatial Point Pattern Modeling.
Springer, Berlin Heidelberg New York (to appear).
Daley, D. J., Vere Jones, D., An introduction to the theory of point processes, Vol. 1. Second edition, Springer, Berlin Heidelberg, New York, (2003).
Daley, D. J., Vere Jones, D., An introduction to the theory of point processes, Vol. 2. Second edition, Springer, Berlin Heidelberg, New York, (2008).
rd
Feller, W., An introduction to probability theory and its applications, 3 edition, Wiley, New York, (1968).
Hoel, Paul G., Port, Sidney C., and Stone, Charles J., Introduction to stochastic processes, Houghton Mifflin, New York, (1970).
Isham V., and M. Westcott, A self-correcting point process, 1131 Stoc. Proc. Appl., vol. 8, 335-348, (1979).
Jacob J., Multivariate point processes, Predictable projection, v41Radon-Nikodym derivatives, representation of martingales, 2. J Wahr. Verb. Geb., vol. 31,
235-253, (1975).
Lewis, P. A. W., and G. S. shedler, Simulation of nonhomogeneous Poisson processes by thinning, Nav. Res. Log. Quart, 26, 403-413, (1979).
Lefebvre, M., Applied probability and statistics, Springer, New York, (2006).
Morgan, B. J. T., Elements of simulation Chapman and Hall, London, (1983).
McFadden, J., On the lengths of intervals in a stationary point process, J. Roy. Statist. Soc, B 24, 364-382, (1962).
Picinbono B., Time intervals and counting in point processes, IEEE Trans. Inform. Theory, IT 50, 1336-1340, (2004).
nd
Ross, Sheldon M., Stochastic processes, 2
edition, Wiley, New York, (1996).
th
Ross, Sheldon M., Introduction to probability models, 8 edition, Academic Press, San Diego, (2003).
Ripley, B. D., Computer generation of random variables: A Tutorial, Inst. Statist. Rev., 51, 301-319, (1983).
Ripley, B. D., Stochastic simulation, Wiley, New York, (1986).
Rubenstein, R. Y., Simulation and the Monte Carlo method, Wiley, New York, (1981).
Schmeiser, B. W., Random variate generation, a Survey, Proc. 1980 Winter Simulation Conf., Orlando, FL, 79-104, (1980).
Snyder D. and Miller M., Random point processes in time and space, New York: Springer-Verlag, (1991).

Das könnte Ihnen auch gefallen