Find the class size such that the probability of choosing one boy and one girl is $1/2$ My name is Shaun Kant and I am 13 years old.
I came across a maths question which has been stuck in my head for quite a while. It goes like this:
"There are 40% more girls than boys in a class. The probability of choosing a boy and a girl as the classes 'leaders' is 1/2. How many students are in the class?
Is there anyone who is experienced enough to help me out?
(The answer is 36 students, as I have checked the answer in the book. But I do not understand how and why it is 36!)
My working:
Let us say that b is boys. Then there are 1.4b (girls).
The whole class then is 2.4b.
To choose one girl and boy;
1/2.4b * 1/2.4b gives me not such a nice answer..
This is where I am stuck.

Fun little problem! You've made a decent start, so let's see where that takes us.
You've pointed out that there are (let's say) $b$ boys, which means there are $g = 1.4b$ boys. To keep things to integers, I'll rewrite this as $b = 5k$ boys, and $g = 7k$ girls. No real difference, just nicer numbers.
Now, we're told that the probability of choosing one boy and one girl is $1/2$. What does that mean? We'll assume that each pair of students is equally likely to be chosen as the class leaders. In that case, this assertion is equivalent to the following: There are half as many ways to choose one boy and one girl as there are ways to choose two students overall.
So how many ways are there to choose one boy and one girl? There are $5k$ boys to choose from and $7k$ girls to choose from, so the total number of ways to choose a boy and a girl is $5k \times 7k = 35k^2$.
Now, how many ways are there to choose two students? There are $12k$ students in all, any of which could be the first choice. That leaves $12k-1$ possible second choices, so it would seem that there are $12k \times (12k-1) = 144k^2-12k$ ways to choose two students.
However, there's a subtle flaw in that reasoning: If we choose Alice first and Bob second, should we treat that as different from choosing Bob first and Alice second? Probably not—they're the same class leaders either way, no matter who was chosen first. Each pair can be chosen in two ways, depending on who was chosen first, but we only want to count that pair once. So we need to divide that $144k^2-12k$ by $2$, yielding just $72k^2-6k$.
At this point, we can impose our condition:
$$
35k^2 = \frac12(72k^2-6k) = 36k^2-3k
$$
Subtracting out $35k^2$ and adding $3k$ to both sides, we obtain
$$
3k = k^2
$$
which has two solutions: $k = 0$ and $k = 3$. In the first case, there are no students at all, so that can't be right. In the second case, there are $5k = 15$ boys and $7k = 21$ girls, for a total of $12k = 36$ students. That should be the right solution, but let's check it out.
If there are $15$ boys and $21$ girls, then there are $15 \times 21 = 315$ different ways to choose a boy and a girl. The total number of ways to choose two students at all is $\frac12(36 \times 35) = \frac12(1260) = 630$, and sure enough $315$ is half of $630$, so our solution checks out.

The binomial coefficients that insipidintegrator alludes to allow us to count, more directly, the number of ways to choose two objects out of $12k$. In this case, the objects are students, but for the mathematics, that is immaterial. The binomial coefficient is $\binom{12k}{2}$, read "$12k$ choose $2$." The general formula for the binomial coefficient is
$$
\binom{n}{k} = \frac{n!}{k!(n-k)!}
$$
where $n!$ (read "$n$ factorial") is equal to $n \times (n-1) \times (n-2) \times \cdots \times 3 \times 2 \times 1$. In this case, we have
\begin{align}
\binom{12k}{2} & = \frac{(12k)!}{2!(12k-2)!} \\
               & = \frac{(12k) \times (12k-1) \times (12k-2)\cdots
                         3 \times 2 \times 1}
                        {2 \times 1 \times
                         (12k-2) \times (12k-3) \times (12k-4) \cdots
                         3 \times 2 \times 1}\\
               & = \frac{(12k) \times (12k-1)}{2 \times 1} \\
               & = \frac12(12k)(12k-1)
\end{align}
which is what we obtained with a more intuitive argument above.
