Data for Exercise 3.109

Dice

Format

A data frame/tibble with 11 observations on two variables

x

possible outcomes for the sum of two dice

px

probability for outcome x

References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

Examples


roll1 <- sample(1:6, 20000, replace = TRUE)
roll2 <- sample(1:6, 20000, replace = TRUE)
outcome <- roll1 + roll2
T1 <- table(outcome)/length(outcome)
remove(roll1, roll2, outcome)
T1
#> outcome
#>       2       3       4       5       6       7       8       9      10      11 
#> 0.02675 0.05355 0.08320 0.11425 0.13845 0.16510 0.14040 0.11100 0.08425 0.05465 
#>      12 
#> 0.02840 
round(t(Dice), 5)
#>       [,1]    [,2]    [,3]    [,4]    [,5]    [,6]    [,7]    [,8]     [,9]
#> x  2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.00000
#> px 0.02778 0.05556 0.08333 0.11111 0.13889 0.16667 0.13889 0.11111  0.08333
#>       [,10]    [,11]
#> x  11.00000 12.00000
#> px  0.05556  0.02778
rm(roll1, roll2, T1)
#> Warning: object 'roll1' not found
#> Warning: object 'roll2' not found