Skip to contents

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.

Usage

DieVar(sides = 6)

Arguments

sides

number of faces, >= 1.

Value

list(variance, mean, sides).

References

Morin, D. J. (2016). Probability: For the Enthusiastic Beginner. Createspace. Eq (3.20).

Examples

DieVar()$variance
#> [1] 2.916667