The moment identity E(k^2) - (np)^2, cross-checked against npq.
Arguments
- n
trials, >= 0.
- p
success probability, in [0, 1].
References
Morin, D. J. (2016). Probability: For the Enthusiastic
Beginner. Createspace. Eq (4.67).
Examples
BinomVar(10, 0.3)$variance
#> [1] 2.1