This preview shows pages 1–3. Sign up to view the full content.
Random numbers and stochastic simulations in Excel
•
Functions in
bold
type require that PopTools be installed.
When a PopTools
function duplicates one of Excel’s builtin functions, the PopTools function is
often easier to read and remember and is also based on algorithms that are more
numerically robust.
•
To generate a new set of random numbers, hit the ‘F9’ key.
This replaces all the
random numbers in the worksheet and updates any other calculations that depend
on them.
Functions for generating random numbers
These are the distributions that you will most commonly be using in this class.
There are
a variety of other distributions available, both in Excel and PopTools, which use similar
syntax.
In the “Paste Function” dialog box, look under either “Statistical” or “PopTools
random variables” to see what’s available.
Continuous distributions
RAND()
Returns a pseudorandom number uniformly distributed between 0 and 1.
Either implicitly or explicitly, this is the basis for all the other builtin
random number functions.
dRandReal(
l
,
u
)
Returns a pseudorandom number that is uniformly distributed
between
l
and
u
.
This is the basis (although you never see it) for all the
other PopTools random number functions.
NORMINV(RAND(),
m
,
s
)
Returns a pseudorandom number that is normally
distributed with mean
m
and standard deviation
s
.
dNormalDev(
m
,
s
)
Returns a pseudorandom number that is normally distributed with
mean
m
and standard deviation
s
.
LNORMINV(RAND(),
m
,
s
) Returns a pseudorandom number that is lognormally
distributed with mean
m
and standard deviation
s
.
dLogNormalDev(
m
,
s
)
Returns a pseudorandom number that is lognormally
distributed with mean
m
and standard deviation
s
.
BETINV(RAND(),
m
,
s
,
l
,
u
) Returns a pseudorandom number that is beta distributed
with mean
m
and standard deviation
s
, and bounded between
l
and
u
(the
beta distribution has a central tendency, like the normal, but only a finite
range of allowable values; it is often used with
l
= 0 and
u
= 1).
dBetaDev(
m
,
s
)
Returns a pseudorandom number that is beta distributed with
mean
m
and standard deviation
s
, and bounded between zero and one.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentDiscrete distributions
BINOMINV(RAND(),
N
,
p
) Returns a pseudorandom number that is binomially
distributed with sample size
N
and success probability
p
.
dBinomialDev(
N
,
p
)
Returns a pseudorandom number that is binomially distributed
with sample size
N
and success probability
p
.
POISINV(RAND(),
This is the end of the preview. Sign up
to
access the rest of the document.
 Winter '08
 KENDALL

Click to edit the document details