POISSONPDF Function (PV-WAVE Advantage)
Evaluates the probability function of a Poisson random variable.
Usage
result = POISSONPDF (k, theta)
Input Parameters
k—Argument for which the Poisson distribution function is to be evaluated.
theta—Mean of the Poisson distribution. theta must be positive.
Returned Value
result—The probability that a Poisson random variable takes a value equal to k.
Input Keywords
Double—If present and nonzero, double precision is used.
Discussion
POISSONPDF evaluates the probability function of a Poisson random variable with parameter theta. theta, which is the mean of the Poisson random variable, must be positive. The probability function (with θ = theta) is:
POISSONPDF evaluates this function directly, taking logarithms and using the log gamma function.
Example
Suppose X is a Poisson random variable with θ = 10. In this example, we evaluate the probability function at k = 7.
result = POISSONPDF(7, 10.0)
PRINT, "The probability that X is equal to 7 is:"
PRINT, result, Format='(F9.7)'
; PV-WAVE prints the following:
; The probability that X is equal to 7 is:
; 0.0900792
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.