Let a family have two children. It is known that one of the children is a boy. What is the probability that both the children are boys.
So for this we build the sample space $S=\{(b,b)(b,g)(g,g)\}$
Let our event E be the case where both children are boys
$E=\{ (b,b) \}$
Let the conditional be F
$F=\{(b,g),(b,b)\}$
Hence $P(E|F)=\frac{P(E\cap F)}{P(F)}=\frac{1/3}{2/3}=\frac{1}{2}$
But the answer in my book is given as $\frac{1}{3}$ and I can't seem to understand why.
Order matters, so your sample space should be $S=\{(b,b),(g,g),(b,g),(g,b)\}$. For example if we have $(g,b)$, then a girl was the first child and a boy was the second child.
Now, given that one of the children is a boy, our remaining possibilities are $$(b,b),(b,g),(g,b).$$ Among these three options, only $(b,b)$ corresponds to the other child being a boy as well. Since there's only one favorable outcome out of the three possible outcomes, the probability you want is $1/3$, which agrees with what your book says.