1.017 Supplementary Examples

Poisson Random Variables --Synthetic Rainfall Series


In some situations we can imagine an experiment or natural process that generates a very large number of Bernoulli trials, giving a binomial random variable X with a very large n but a constant mean a=np.  It can be shown with series expansions that the probability mass function of the resulting random variable is (in the limit as n approaches infinity):

A random variable X with this PMF is called a Poisson random variable.  The mean and variance of a Poisson random variable (or of its probability distribution) are given by:

Note that X is discrete but can take on any nonegative integer value.  The distributional parameter a must be positive but need not be an integer.

Poisson random variables are frequently used to define random events in time or along a one-dimensional spatial transect.  In this case, X is the number of occurences of some event (e.g. a rain storm) during a time interval t and a = rt, where r is the expected event rate (number of events per unit time).  A string of events with Poisson distributed occurrences is called a Poisson process

The MATLAB function prain (download here) provided below uses a combination of Poisson and exponentially distributed (see Class 14) random variables to simulate a series of rainfall events.  In the program, intvl is a Poisson (discrete) random variable which gives the integer number of days between two successive storm starting times and raindays is an array composed of all storm starting times, measured in total days elapsed since the start of the simulation. raindays is constructed by summing the Poisson distributed intervals.  Each storm is assumed to last one day.  The storm magnitude (in mm/day) is assumed to behave an exponentially distributed (continuous) random variable.
 
 

function prain
n=100       % number of days simulated
rspacing=2  % average days between rain
rmean=10.   % average rainfall on rainy days
time=[0:n];
% call rain generator
precip=raingen(n,rspacing,rmean);
% augment precip series for plotting
precip=[precip,precip(n)];
% plot precip series
close all
figure
stairs(time,precip)
title('Simulated Rainfall Series')
axis([0 time(n+1) 0 1.1*max(precip)])
xlabel('Time')
ylabel('Precip., mm/day')
return
%
function rain=raingen(ndays, spacing, meanrain)
% Raingen generates a synthetic (random) sequence
% of daily rainfall events.
% Event spacing is Poisson distributed
% Event magnitude is exponentially distributed
% ndays is total number of days simulated
% spacing is mean spacing between rain days
% meanrain is mean daily rainfall
% rain is array of generated daily rainfall  values
%
% raindays is array of rain day numbers
te=1;
% choose first rainday (must be >0) from Poisson generator
intvl=poissrnd(spacing,1,1);
rday=1+intvl;
% generate other raindays by adding number of days until
% next rain (obtained from Poisson RNG)
% continue until final day has been passed
while rday<=ndays
   raindays(te)=rday;
   intvl=poissrnd(spacing,1,1)
   rday=rday+intvl;
   te=te+1;
end
% initialize output array (default rainfall is zero)
nrain=te-1;
rain=zeros(1,ndays);
% generate exponentially distributed rainfall
% depths at raindays
rain(raindays)=exprnd(meanrain,1,nrain);
return

Here is a typical series obtained for an average event rate (Poisson parameter r) of  2/day (0.5 days).   This is sufficiently high to give a relatively large number of multi-day storms.  As r becomes smaller the storms are generally more widely spaced and only one day long.  The mean storm magnitude (exponential parameter a) is 10 mm/day. 

The rainfall generator provided here shows how discrete and continuous random variables can be combined to provide a physically realistic (or at least plausible) description of a relatively complex physical process.


Back to 1.017 home | Back to lecture notes

Copyright 2000 Massachusetts Institute of Technology
Last modified Sept 27, 2000