Find the probability that a 4 will appear on the second dice.
Two dice are rolled. If the sum of the two dice is 7 or less than 7. Find the probability that a 4 will appear on the second dice.
I am trying to do this exercise. But my result is different from the one provided by the book. In the book it appears that the answer is $1/4$. This is what I have done. It's okay?
Let $P(A)$ be The probability that the sum is equal to 7 or less than $7$ and let $P(B)$ be the probability that a 4 appears on the second die, then
$P(A)=\frac{21}{36}=\frac{7}{12}$
$P(B)=\frac{6}{36}=\frac{1}{6}$
So $P(A\cap B)=\frac{3}{36}=\frac{1}{12}$
Thus $\displaystyle P(B|A)=\frac{P(A\cap B)}{P(A)}=\frac{\frac{1}{12}}{\frac{7}{12}}=\frac{1}{7}$
If I try $P(A|B)$ and I get $1/2$
Your working is correct.
With one of the dice being $1$, you can have max sum of $7$ with total of $6 \times 2 - 1 = 11$ possibilities. (Numbers can interchange places on dice and subtract one as we did count $(1, 1)$ twice.)
Now with $2$, there are $10$ possibilities (but subtract 2 possibilities for $(1,2)$ which is covered and one for $(2, 2)$). Now you have $7$ possibilities.
With $3$, $3$ possibilities.
No point in checking with $4$, as all the possible cases summing to $7$ or less have been covered already.
So total of $21$ possibilities to get sum of $7$ or less on two dice.
$4$ on the second dice with sum being less than equal to $7$ - $(1, 4), (2, 4), (3, 4) \,$ - 3 possibilities.
So $\frac{1}{7}$ is correct.
Using your table there are $21$ rolls $7$ or less of which $3$, ($(1,4),(2,4),(3,4)$) have $4$ as the second die. Net is $\frac{1}{7}$.