Probability of a full house
A full house occurs when three of the dice are of one denomination, and the remaining two dice are of another denomination. In other words, it consists of a "set of three" and "a pair." An example is {2,2,2,5,5}.
Let's calculate the probability of a "full house" in a single roll of the five dice.
This is a part of the course
“Probability Puzzles in R”
Exercise instructions
- Calculate the overall number of denominations possible for the set of three and the pair together.
- Calculate the number of ways to form the groups; that is, which dice are in the set of three and which are in the pair.
- Combine the previous two quantities to determine the number of possible full houses.
- Calculate the probability of obtaining a full house, and then print it.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
s_space <- 6^5
# Calculate the number of denominations possible
n_denom <- ___
# Calculate the number of ways to form the groups
n_groupings <- ___
# Calculate the total number of full houses
n_full_house <- ___
# Calculate and print the answer
p_full_house <- ___
print(p_full_house)