Send Close Add comments: (status displays here)
Got it!  This site "robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.  Note: This appears on each machine/browser from which this site is accessed.
Data science: rolling dice
by RS  admin@robinsnyder.com : 1024 x 640


1. Rolling dice
What are some ways in which dice rolls differ from coin flips?

How many choices are there in the roll of a six-sided die?

2. One six-sided die
One dieWhat is the probability that one rolls a six?

3. Roll a six
Roll of sixThere is one chance in six, or 1/6, of rolling a six with a six-sided die.

4. Two six-sided dice
Two diceWhat is the probability that one rolls a twelve, or six-six?

5. Roll a sum of 12
Roll of twelveThere is one chance in six times six, or 1/36.

6. Roll a sum of 7
Roll of sevenThere is one chance in six, or 1/6, of rolling a sum of 7. What is the probability that one rolls a six-six-six with three six-sided die? (left as an exercise)

7. Example start
Here is a the sample space of a single-sided die in Lua.

Here is the Python code [#1]

Here is the output of the Python code.

Here is a the sample space of a single-sided die in R.

Here is the R code [#1]

Here is the output of the R code.

This is the same as if the following were written.

Here is the R code [#2]

Here is the output of the R code.


8. End of page

by RS  admin@robinsnyder.com : 1024 x 640