Chance of getting a good grade Lets says theres a question bank of 28 questions.  On the exam, there will be 12 of these questions, and I will have to answer 5.  
If the only way to get a question right is to study it, how many questions should I study to have a reasonable chance of knowing 5 answers?
More generally, how could I find out my expected score as a function of how many questions I study?  
Obviously if I study 21, then I will get 100%, and if I study less than 5, I'm guaranteed to not get at least 5.
 A: Total number of combinations: $\binom{28}{12}$ number of combinations that contain at least 5 of the n you know: is the sum of the combinations in which there are 5,6,7,8,9,10,11,12 you do know. In other words $\sum_{i=5}^{12}\binom{n}{i}*\binom{28-n}{12-i}$ so the probability is $$\frac{\sum_{i=5}^{12}\binom{n}{i}*\binom{28-n}{12-i}}{\binom{28}{12}}$$
A: Imagine that you are a little late in studying, and the $12$ questions on the test have already been chosen by the instructor. Call the $12$ chosen questions good, and the $16$ others bad.
You choose $n$ questions at random to study. There are $\binom{28}{n}$ equally likely choices.
The number of choices that have $k$ good and $n-k$ bad is $\binom{12}{k}\binom{16}{n-k}$. Thus the probability that you choose at least $5$ good is 
$$\frac{\sum_{k=5}^{12}\binom{12}{k}\binom{16}{n-k}}{\binom{28}{n}}.$$
One can save a little bit of effort by calculating the probability of the complement: for that we need the shorter sum from $k=0$ to $4$. Now perform the calculation for various $n$, until you get a probability that you consider adequate.  
A: Andre and Jorge have already covered most of the question, but I thought I'd just like to add that your expected score can be expressed as a 12-th order polynomial in $n$, where $n$ is the number of questions you studied.
When you plot the polynomial, you can get a nice graph of your expected score as a function of number of questions studied: 

