Conditional probability syntax [closed]

What syntax do I use to compute this in Mathematica?
Game of Yahtzee:
1. Suppose you get three 5’s on the first roll. What is the probability of rolling the other two dice and
completing the Yahtzee on the second roll?
2. Suppose you get three 5’s on the first roll. What is the probability of completing the Yahtzee on the
second roll or the third roll?

=================

=================

1 Answer
1

=================

1. Yahtzee Problem

For throwing a single die we have x, the number shown on the thrown die, follow a discrete uniform distribution:

dist = DiscreteUniformDistribution[ {1, 6} ]

Now the probability for getting two fives in the next throw is:

Probability[ x1 == 5 && x2 == 5, { x1 \[Distributed] dist, x2 \[Distributed] dist } ]

136\frac{1}{36}

2. Yahtzee Problem

Now completing the Yahtzee in the second or third throw can be seen split into three disjunct possibilities.

p(Yahtzee)=p(2,_)∨p(1,1)∨p(0,2)\begin{align}
p(Yahtzee) = p(2,\_) \vee p(1,1)\vee p(0,2)
\end{align}

where p(2,_)p(2,\_) denotes the case of getting 2 fives in in the first throw while the third does not matter and p(1,1),p(0,2)p(1,1), p(0,2) to be understood similarily. Since the events are mutually exclusive we can add them up:

p[2,_] = Probability[
x1 == 5 && x2 == 5,
{x1 \[Distributed] dist, x2 \[Distributed] dist }
];

p[1,1] = 2 \[Times] Probability[
x1 == 5 \[Xor] x2 == 5,
{x1 \[Distributed] dist, x2 \[Distributed] dist }
];

p[0,2] = p[2,_] \[Times] Probability[
x1 != 5 && x2 != 5,
{x1 \[Distributed] dist, x2 \[Distributed] dist }
];

p[yahtzee] = p[2,_] + p[1,1] + p[0,2]

7811296\frac{781}{1296}