I was about to ask the below question but I have just worked it out whilst typing my working.

So, for anyone who may be interested, here it is below:

Of course, I would be interested in seeing how I can optimise this question using P(A|B) method.


Two year 12 students are to be randomly selected from a pool of N year 12 students, n of whom are from School A. If it known that at least one student is from School A, what is the chance that both students are from School A?

The way I'm approaching it is finding the size of my sample space which is number of ways of selecting 2 students, with at least one student from school A.

This should be the same as Total number of ways N(N-1)/2 - number of ways with no student from School A ((N-n)(N-1-n))/2

i.e. Number of ways with at least one student from School A = (N(N-1) -(N-n)(N-1-n))/2

If I'm then looking for both students from School A, the number of ways = n(n-1)/2

Hence, the probability should be n(n-1)/(N(N-1) -(N-n)(N-1-n))

= n(n-1)/(N^2 - N - N^2 + N + nN + nN -n -n^2) = n(n-1)/(2nN - n - n^2) = (n-1)/(2N - n - 1)

  • $\begingroup$ Welcome to MathSE. Please read this tutorial on how to typeset mathematics on this site. $\endgroup$ – N. F. Taussig Sep 20 '18 at 16:40

Let $X$ count the students from school A in the selection.

$$\begin{align}\mathsf P(X=2\mid X\geq 1) &= \dfrac{\mathsf P(X=2)}{1-\mathsf P(X=0)}\\[1ex]&=\dfrac{\binom {n}2/\binom{N}2}{1-\binom{N-n}{2}/\binom{N}2}\\[1ex]&=\dfrac{n\,(n-1)}{N\,(N-1)-(N-n)\,(N-n-1)}\\[1ex]&=\dfrac{n\,(n-1)}{N^2-N-(N^2-nN-N-nN+n^2+n)} \\ &= \dfrac{n-1}{2N-n-1}\end{align}$$

Yeap. Checks out okay. $\checkmark$

PS: For $2\leq n\leq N$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.