R/DieVar.R
DieVar.Rd
For a uniform roll on 1..k the mean is (k+1)/2 and the variance is (k^2 - 1)/12; the book's worked six-sided value is 2.92.
DieVar(sides = 6)
number of faces, >= 1.
list(variance, mean, sides).
Morin, D. J. (2016). Probability: For the Enthusiastic Beginner. Createspace. Eq (3.20).
DieVar()$variance #> [1] 2.916667