# Hard probability problem (1973 British Math Olympiad #6)

I'm trying to pull some old Olympiad questions for some students, but I can't get a handle on this one. I'd really like to include it, though.

In answering general knowledge questions (framed so that each question is answered yes or no), the teacher's probability of being correct is A and a pupil's probability of being correct is B or G according as the student is a boy or a girl. The probability of a student agreeing with the teacher is 1/2. Find the ratio of boys to girls in the class.
Now, I'm new to Olympiad questions, but the best I can do is:

Let x = P(selecting boy) such that: x = #boys / (#boys + #girls) ... x#boys + x#girls = #boys ... x#girls = (x-1)#boys ... #boys / #girls = x/(x-1) = r is the desired ratio. Then

P(agree) = P(teacher correct & student correct | boy) + P(teacher correct & student correct | girl) + P(teacher incorrect & student incorrect | boy) + P(teacher incorrect & student incorrect | girl)

1/2 = A*x*B + A*(1-x)*G + (1-A)*x*(1-B) + (1-A)*(1-x)*(1-G)

But there's not much else I can do to simplify that, or to find x.

Any suggestions? Thanks.

## Answers and Replies

Stephen Tashi
Science Advisor
I know nothing about olympiad questions. Is it just algebra?

$n_b =$ number of boys
$n_g =$ number of girls

$\frac{1}{2} = ( BA + (1-B)(1-A) )\frac{nb}{n_b + n_g} + (GA + (1-G)(1-A)) \frac{n_g}{n_b + n_g}$

$\frac{n_b + n_g}{2} = (BA + (1-B)(1-A)) n_b + (GA + (1-G)(1-A)) n_g$

$\frac{n_b + n_g}{ 2 n_g} = (BA + (1-B)(1-A)) \frac{n_b}{n_g} + (GA + (1-G)(1-A))$

$\frac{n_b}{2 n_g} + \frac{1}{2} = (BA + (1-B)(1-A)) \frac{n_b}{n_g} + (GA + (1-G)(1-A))$

$\frac{n_b}{2 n_g} - (BA + (1-B)(1-A)) \frac{n_b}{n_g} = (GA + (1-G)(1-A)) - \frac{1}{2}$

$\frac{n_b}{n_g} ( \frac{1}{2} - (BA + (1-B)(1-A)) = (GA + (1-G)(1-A)) - \frac{1}{2}$

$\frac{n_b}{n_g} = \frac{(GA + (1-G)(1-A)) - \frac{1}{2} }{\frac{1}{2} - (BA + (1-B)(1-A)) }$

• h6ss
That is a strange problem... I don't know much about probability, but the first thing that comes to mind is...
Is that the exact wording of the problem or are you paraphrasing it?

The reason I ask is "The probability of a student agreeing with the teacher is 1/2." is initially ambiguous to me.

If that is taken literally it implies that it must be true independently of both the agreeing student being a boy or girl and the ratio of boys to girls.
There must be something wrong because if it was so, then one must instantly conclude that B = G = A/2.
That would make it sort a trick question...?

Because one could adjust...

1/2 = A*x*B + A*(1-x)*G + (1-A)*x*(1-B) + (1-A)*(1-x)*(1-G)

substituting B=A/2 and G=A/2

1/2 = A*x*(A/2) + A*(1-x)*(A/2) + (1-A)*x*(1-(A/2)) + (1-A)*(1-x)*(1-(A/2))

1/2 = A^2 - (3A/2) +1

A = 1/2 or 1

That seems too suspiciously simple at first...

Now, if the intent of the problem is to suggest that the "final scores correct" end up being 1/2 of that of the teacher for either:
- each group of students, the boy group and the girl group
or
- for the whole group of students, both groups together

then something must be missing from the problem.

There are no stipulated conditions that specify how many questions or how big the class of students or number of boys and girls, so we may try a brute force test to see what happens.

Let there be one teacher, one boy, one girl, and two questions.

The teacher can get both right, one right, or none right, scoring 1, .5, or 0 except the none right case of 0 must be excluded because 0/2 is not half of 0...

For teacher = 1, students must be 1/2...
If "students' correct results" means the individual groups of boys and girls (in this case groups of one) then each can be 1/2 of the teacher's result of 1 by getting one question correct.
But if "students' correct results" means all students, then this can be 1/2 of the teacher's result of 1 by Boy gets 2 and Girl gets 0 correct, or vise versa.

If teacher = 1/2 then students must be 1/4...
If "students' correct results" means individual groups then there would have to be four questions, but there are only two.
But if "students' correct results" means all students, then this can be 1/2 of the teacher's result of 1 by Boy gets 1 correct and Girl gets 0 correct, or vise versa.

I conclude that the "The probability of a student agreeing with the teacher is 1/2." must mean for all students, not individual groups, because the case of individual groups broke the problem by requiring more questions than tested, but the case of all the students as a whole is the trivial case of B = G = A/2.

So I don't know what "The probability of a student agreeing with the teacher is 1/2." means in this problem... how were you thinking of it?
Not sure how all my meandering helps, but I'd like to see the original problem statement...I'm still thinking that something in the problem description must be missing?

I found it... the original #6

"6. The probability that a teacher will answer a random question correctly is p. The probability that randomly chosen boy in the class will answer correctly is q and the probability that a randomly chosen girl in the class will answer correctly is r. The probability that a randomly chosen pupil's answer is the same as the teacher's answer is 1/2. Find the proportion of boys in the class."

So, neither groups nor the whole, but individuals...

PeroK
Science Advisor
Homework Helper
Gold Member
2020 Award
There are 3 cases.

a) A = 1/2. In which case any proportion of boys to girls will do; for any values of B and G.

b) B = G. In which case B = G = 1/2 and again any proportion will do.

c) Neither of the above. It's simpler to look at the probability the student disagrees with the teacher.

Let p be the proportion of boys and q girls.

[A(1-B) + (1-A)B]p + [A(1-G) + (1-A)G]q = 1/2

And using q = 1 - p gives

2p(B-G) = 1 - 2G

By symmetry or otherwise we have

2q(G-B) = 1 - 2B

Hence

p/q = (1-2G)/(2B-1)

PeroK
Science Advisor
Homework Helper
Gold Member
2020 Award
Alternative solution.

Let X be the probability that a random student is correct. If the probability a random student agrees (or disagrees) with the teacher is 1/2 then:

A(1-X) + (1-A)X = 1/2

Hence (2A-1)(2X-1) = 0

So, either A = 1/2 or X = 1/2

If X = 1/2 then:

Bp + G(1-p) = 1/2

2p(B-G) = 1 - 2G

Hence B = G = 1/2 or

p/q = (1-2G)/(2B-1) as before.

Note that if B > 1/2 then G < 1/2 and vice versa.

Stephen Tashi
Science Advisor
There's a great confusion of notation here. For example "B" is used in the OP to denote the probability that a boy answers the question correctly, later it is used for the number of boys in the class. In the restatement of the problem, the letter "p" is used for the probability that the teacher answers the question correctly and then in solving the problem "p" is use to denote the proportion of boys in the class.

This is a very straightforward problem. I chose to use a tree diagram and a few lines of algebra. Stephen gave the correct answer above.

Stephen Tashi
Science Advisor
Admittedly, my algebra should have cases added to consider when I might be dividing by zero. Those cases would consider $n_g = 0$ and $A = 1/2$.

Let,
E1:Student answers correctly.
E2:Teacher answers correctly.
E3:Student is a boy.
**Not assuming any of these events are independent**
P(E2)=A....(a)
P(E1/E3)=B
∴P(E1∩E3)/P(E3)=B
∴P(E1∩E3)=B×P(E3)...(b)
Also,
P(E1/E3bar)=G [E3bar is negation of E3]
∴{P(E1)-P(E1∩E3)}/1-P(E3)=G
substituting value of P(E1∩E3) from (b)
∴{P(E1)-B×P(E3)}/1-P(E3)=G......(c)
But we also know that,
P(E1∩E2)+P(E1bar∩E2bar)=0.5
∴P(E1∩E2)+P(E1)+P(E2)-P(E1∩E2)=0.5
P(E1)=(0.5-A)....(d)[from (a)]
Substituting value of P(E1) in (c)
P(E3)={0.5-A-G}/{B-G}
Hence P(E3bar)=1-P(E3)={B+A-0.5}/{B-G}
Hence boys:girls=P(E3)/P(E3bar)={0.5-A-G}/{A+B-0.5}

Last edited:
PeroK
Science Advisor
Homework Helper
Gold Member
2020 Award
This is a very straightforward problem. I chose to use a tree diagram and a few lines of algebra. Stephen gave the correct answer above.
So, what's the proportion of boys to girls when A = 1/2?

Stephen's answer above.

PeroK
Science Advisor
Homework Helper
Gold Member
2020 Award
Stephen's answer above.

So, it's not the case that any proportion will work for A = 1/2? And, in fact, for any values of the probabilities B and G?

I'm sorry, I replied before coffee. When A=1/2 the proportion is irrelevant. Substitute A=1/2 into Stephen's first equation and then solve. You should find 1/2 = 1/2 or some such thing. All students become equivalent. It is now the same problem as I flip a coin, you make a random guess as to whether it is H or T. You will guess correctly 1/2 of the time no matter your distribution of guesses. So, to answer your question (I'm on my second cup of coffee), any proportion of boys and girls will give a probability of 1/2 of agreeing when the probability of the teacher answering correctly is 1/2.

Stephen Tashi
Science Advisor
Doing the algebra properly, one would be careful about division by zero.

The case $n_g = 0$ should be considered before dividing by $n_g$.

And after:

$\frac{n_b}{n_g} ( \frac{1}{2} - (BA + (1-B)(1-A)) = (GA + (1-G)(1-A)) - \frac{1}{2}$

One should say:
:
In the case when $\frac{1}{2} - (BA + (1-B)(1-A) = 0 \$ (This is the case for $A = \frac{1}{2}$ ) then any value of $\frac{n_g}{n_b}$ is a solution.
(Since the equation becomes $\frac{n_g}{n_b}(0) = 0$.)

For other cases:

$\frac{n_b}{n_g} = \frac{(GA + (1-G)(1-A)) - \frac{1}{2} }{\frac{1}{2} - (BA + (1-B)(1-A)) }$

PeroK
Science Advisor
Homework Helper
Gold Member
2020 Award
Doing the algebra properly, one would be careful about division by zero.

The case $n_g = 0$ should be considered before dividing by $n_g$.

And after:

$\frac{n_b}{n_g} ( \frac{1}{2} - (BA + (1-B)(1-A)) = (GA + (1-G)(1-A)) - \frac{1}{2}$

One should say:
:
In the case when $\frac{1}{2} - (BA + (1-B)(1-A) = 0 \$ (This is the case for $A = \frac{1}{2}$ ) then any value of $\frac{n_g}{n_b}$ is a solution.
(Since the equation becomes $\frac{n_g}{n_b}(0) = 0$.)

For other cases:

$\frac{n_b}{n_g} = \frac{(GA + (1-G)(1-A)) - \frac{1}{2} }{\frac{1}{2} - (BA + (1-B)(1-A)) }$

It misses the point, though, that ##\frac{n_b}{n_g}## is independent of A.

##\frac{n_b}{n_g} = \frac{1-2G}{2B-1}##

is surely the answer they were looking for.

Stephen Tashi
Science Advisor
##\frac{n_b}{n_g} = \frac{1-2G}{2B-1}##

is surely the answer they were looking for.

The notation is confusing me.. What happens when $B = 1/2$? I notice in a previous post, you said in the case when $B = G$ then we must have $B = G = 1/2$. But if $B$ is the probability that a boy answers the question correctly and $G$ is the probability that a girl answers a question correctly, then it is possible, for example, that $B = G = 3/4$.

PeroK
Science Advisor
Homework Helper
Gold Member
2020 Award
The notation is confusing me.. What happens when $B = 1/2$? I notice in a previous post, you said in the case when $B = G$ then we must have $B = G = 1/2$. But if $B$ is the probability that a boy answers the question correctly and $G$ is the probability that a girl answers a question correctly, then it is possible, for example, that $B = G = 3/4$.

In the case where B = G = 3/4, there is no solution, regardless of the proportions. Unless A = 1/2.

The key point is that either A = 1/2 (first special case) or the probability of a random student being correct is 1/2. Once you have that, then either B = G = 1/2 (second special case) or the proportions are as above:

##\frac{n_b}{n_g} = \frac{1-2G}{2B-1}##

There is always a solution as long as one of B or G is < 1/2 and the other is > 1/2. You just need the right proportions. But, there is no solution if they are both < 1/2 or both > 1/2.

(There is also the special case where there are only boys or only girls, but that's even more degenerate.)

The key point (which is perhaps what makes this question interesting) is that if two people answer a question and the probability they agree is 1/2, then this can only happen if at least one of them has a probability of 1/2 of being correct. It can't work with two probabilities both not equal 1/2. That's why I posted the "alternative solution" above, because I hadn't noticed this at first.

Last edited:
Stephen Tashi
Science Advisor
Translating that into algebra, completing the problem requires restricting the solutions to those that satisfy
$0 \le \frac{n_b}{n_g} \le 1$.

PeroK
Science Advisor
Homework Helper
Gold Member
2020 Award
Translating that into algebra, completing the problem requires restricting the solutions to those that satisfy
$0 \le \frac{n_b}{n_g} \le 1$.

Not necessarily. But, if G > 1/2, then B < 1/2 and vice versa.

That turned into a interesting problem. As I said above, Stephen did it correctly but it turns out there are a lot of conditions. Consider the class to be a composite student. Suppose the teacher has probability P of being correct and the class has probability Q of being correct. Then the probability they agree is PQ+(1-P)(1-Q). Setting this equal to 1/2 yields (2P-1)(2Q-1) = 0. So either P = 1/2 or Q = 1/2. This makes sense in terms of the coin flip I described above. If the teacher flips a coin it doesn't matter the distribution of the student's guesses, they will agree 1/2 of the time. If the students flip the coin the teacher's distribution doesn't matter. There is no other way that they can agree 1/2 of the time. I had to think about that for a while. So when P = 1/2 the composition of the class doesn't matter. But when Q=1/2 you find the expression (1-2G)/(2B-1) for the ratio that PeroK mentioned above. If G>1/2 then B<1/2 and vice versa in order that the ratio be non-negative. That makes perfect sense if the class must have probability 1/2 of guessing correctly. You also find the case where there are no girls and B=1/2 as well as the case where there are no boys and G=1/2. Thanks for the problem, it was fun.