Search code examples
excelsimulationpoisson

Simulate Arival Times in a Poisson Process


In Excel, I want to generate arrival times for a simulation (illustration) of a M/M/1 queue.

Jobs arrive according to a Poisson process. I found POISSON and POISSON.DIST functions in Excel, but not an inverse Poisson distribution function. I figured that since Normal distribution with mean λ and variance λ is supposed to be a good approximation of Poisson distribution (given large enough time intervals), I tried to use inverse Normal distribution function to simulate the intervals between arrivals:

=NORM.INV(RAND(), mean, SQRT(mean))

And to compute the arrival times (Excel format of time is in fractions of a day):

=IFERROR(previous_time + interval_in_seconds/60/60/24, 0)

I am no expert in statistics, but my simulated intervals look a bit too regular for it to be a Poisson process (see illustration below for λ = 1/10s) - what am I doing wrong plz??

normal.inv


Solution

  • I realized my mistake after a good night's sleep that there is an important distinction between these 2 concepts:

    Poisson Process

    A renewal process with exponentially distributed renewal intervals.

    Poisson Distribution

    A discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time.

    So while number of jobs that arrive according to Poisson process during a time interval x follow Poisson distribution with parameter λx, the inter-arrival times of this process are distributed exponentially.

    Inverse exponential function can be written in Excel as follows:

     =-LN(RAND()) * mean
    

    Illustration for λ = 1/10s:

    exp.inv