Skip to content

binomialPDF

Fabian Kindermann edited this page Apr 2, 2021 · 10 revisions
function binomialPDF(k, n, p)

Description:

Calculates the probability mass function

of the binomial distribution with draws and a probability to draw a value of .

Input arguments:

  • integer :: k
    The point where to evaluate the probability mass function of the binomial distribution.
  • integer :: n
    The number of independent draws. Note that this input parameter can not be negative.
  • real*8 :: p
    The probability that a value of is drawn in each experiment. Note that this input parameter needs to be in the interval .

Return Value:

  • real*8 :: binomialPDF
    The value of the probability mass function at k.

References

  • For further reading refer to:
    • Toral, R. & Colet, P. (2014). Stochastic Numerical Methods: An Introduction for Students and Scientists. Weinheim: Wiley.
  • This routine is used in the following programs:
    • prog02_15.f90
    • prog04_04.f90
Clone this wiki locally