TITLE: Determine the Size of a Test Bank
QUESTION [8 upvotes]: Suppose you have two people take an exam which is composed of 30 questions which are randomly chosen from a test bank of n questions.
Person A and Person B both take different randomly generated instances of the exam, and then compare the question sets they were given. Person B notices that 7 of their 30 questions were repeated from Person A's question set.
Is there anyway to deduce the likely total number of questions in the test bank given you know 7/30 of them were repeated in a second instance of the exam? Obviously you would not get an exact value, but could you determine a range of probabilities for each different size of the test bank? How you would you go about solving this?
Thank you!

REPLY [4 votes]: The minimum number in the pool must be $53$.  Suppose there are $n$ in total.
So it's like if you had an urn with $n$ balls, $30$ are white and $n-30$ are red.  Then you pull $30$ balls at random.  You want to know how many of the balls you pulled are white.  Or more specifically you want to know the probability that $7$ of the $30$ you pull are white. 
Let $A$ be the number of white balls.  Then $P(A=k)$ is hypergeometric and equal to
$\frac{{{30}\choose{k}}{ {n-30}\choose{30-k}}}{{n}\choose{30}}$
So in your case:
$\frac{{{30}\choose{7}}{{n-30}\choose{23}}}{{n}\choose{30}}$
This is the probability of an overlap of exactly $7$.
You now need to find the $n$ that maximizes that probability.
If you start plugging in numbers (using a calculator) starting at $n=53$ you'll probably see that it goes up and then soon starts to go back down.  Choose the max before it starts going back down.  Shouldn't be too much larger than 53.  I'm guessing somewhere around 100.