bernoulliPDF - fabiankindermann/ce-fortran GitHub Wiki
function bernoulliPDF(k, p)
Calculates the probability mass function
-
integer :: k
The point where to evaluate the probability mass function of the Bernoulli distribution. -
real*8 :: p
The probability that a value ofis drawn. Note that this input parameter needs to be in the interval
.
-
real*8 :: bernoulliPDF
The value of the probability mass function atk
.
- 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