
Benjamin C. answered 09/03/21
Passionate About Math!
Say we give each of the seven apples labels a1, a2, a3, a4, a5, a6, a7. Suppose apples a1, a2, a3 are used to make the pie and a4, a5 are used to make the jam and a6, a7 are our left over apples. We can denote the toxic apples as being any two apples ai, aj. Our sample space is defined as the collection of every possible choice of those two toxic apples:
S = {{ai, aj} : ai, aj ∈ {a1, a2, a3, a4, a5, a6, a7}}.
|S| = C(7,2) = 21 is the total number of outcomes for choosing toxic apples.
We want to know Pr(Jam is toxic | Pie is toxic). Define the events in our conditional probability:
Pc : At least one apple in the pie is toxic.
Jc : At least one apple in the jam is toxic.
And define the complements of those events:
P: All the apples in the pie are non-toxic.
J: All the apples in the jam are non-toxic.
To arrive Pr(Jc | Pc ), we start by finding Pr(P), Pr(J), and Pr(P∩J).
P entails that ai, aj can't be a1, a2, or a3. In set notation, we can define P by all the ways ai, aj can be excluded the pie:
P = {{ai, aj} : ai, aj ∈ {a4, a5, a6, a7}}.
Pr(P) = |P| / |S| = C(4,2) / |S| = 6/21 = 2/7
For J we have that ai, aj can't be a4, or a5. Set J can be defined:
J = {{ai, aj} : ai, aj ∈ {a1, a2, a3, a6, a7}}.
Pr(J) = |J| / |S| = C(5,2) / |S| = 10/21
P∩J occurs if all the apples in the pie and the jam are non-toxic. This means that ai, aj are excluded from being a1, a2, a3, a4, or a5 and the logical entailment is that ai, aj must be the left over apples a6, a7.
P∩J = {{a6, a7}}
Pr(P∩J) = |P∩J| / |S| = 1/21
Now using Bayes and negation rule:
Pr(P|J) = Pr(P∩J)/Pr(J) = (1/21)/(10/21) = 1/10
Pr(Pc|J) = 1 - Pr(P|J) = 1 - 1/10 = 9/10
Pr(J|Pc) = (Pr(Pc|J) * Pr(J)) / Pr(Pc) = ((9/10) * (10/21)) / (5/7) = 3/5
Pr(Jc|Pc) = 1 - Pr(J|Pc) = 1 - (3/5) = 2/5
So Pr(Jam is toxic | Pie is toxic) = 2/5