p^2 n(n-1) + pn, cross-checked against sum k^2 P(k).
Arguments
- n
trials, >= 0.
- p
success probability, in [0, 1].
Value
list(second_moment).
References
Morin, D. J. (2016). Probability: For the Enthusiastic
Beginner. Createspace. Eq (4.66).
Examples
BinomMom2(10, 0.3)$second_moment
#> [1] 11.1