Recently I got a problem from British Math Olympiad, 1973 It is a probability question.
In answering general knowledge questions (framed so that each question is answered yes or no), the teacher's probability of being correct is $\alpha$ and a pupil's probability of being correct is $\beta$ or $\gamma$ according to as the pupil is a boy or a girl. The probability of a randomly chosen pupil agreeing with the teacher's answer is $\dfrac{1}{2}$. Find the ratio of a number of boys to girls in the class.
I did it as $$b=\text{Number of boys}$$ $$g=\text{Number of girls}$$ so $$\frac{1}{2}=\Big(\alpha \beta+(1-\alpha)(1-\beta)\Big)\Bigg(\dfrac{b}{b+g}\Bigg)+\Big(\alpha \gamma+(1-\alpha)(1-\gamma)\Big)\Bigg(\dfrac{g}{b+g}\Bigg)$$ $$\frac{b+g}{2}=\Big(\alpha \beta+(1-\alpha)(1-\beta)\Big)b+\Big(\alpha \gamma+(1-\alpha)(1-\gamma)\Big)g$$ divide by g $$\frac{b+g}{2g}=\Big(\alpha \beta+(1-\alpha)(1-\beta)\Big)\Bigg(\dfrac{b}{g}\Bigg)+\Big(\alpha \gamma+(1-\alpha)(1-\gamma)\Big)\Bigg(\dfrac{g}{g}\Bigg)$$ $$\frac{b}{2g}+\frac{1}{2}=\Big(\alpha \beta+(1-\alpha)(1-\beta)\Big)\Bigg(\dfrac{b}{g}\Bigg)+\Big(\alpha \gamma+(1-\alpha)(1-\gamma)\Big)$$ $$\frac{b}{2g}-\Big(\alpha \beta+(1-\alpha)(1-\beta)\Big)\Bigg(\dfrac{b}{g}\Bigg)=\Big(\alpha \gamma+(1-\alpha)(1-\gamma)\Big)-\dfrac{1}{2}$$ $$\frac{b}{g}=\dfrac{\Big(\alpha \gamma+(1-\alpha)(1-\gamma)\Big)-\dfrac{1}{2}}{\dfrac{1}{2}-\Big(\alpha \beta+(1-\alpha)(1-\beta)\Big)}$$
Is it right? Need Suggations.
Hint:
The probability that a randomly selected child gets the same answer as the teacher can be broken up by total probability as
$\Pr(B)\bigl(\alpha \beta + (1-\alpha)(1-\beta)\bigr) + \bigl(1-\Pr(B)\bigr)\bigl(\alpha\gamma + (1-\alpha)(1-\gamma)\bigr)$
Where $B$ is the event that our randomly selected child is a boy. Make sure you understand why.