Bob took a quiz Bob took a quiz consisting of 500 questions with two options: Yes and No. Bob did not prepare for the quiz. Flustered, he hastily reached for a fair coin in his wallet and started to toss this coin for answers. Whenever the coin landed heads, he shaded Yes; whenever the coin landed tails, he shaded No.
It turned out that 40% of the questions have Yes as the correct answer, and the rest have No as the correct answer. Among those questions that Bob shaded Yes, roughly how many percent did he get correct?
A) 30% B) 40% C) 50% D)60% E) 70%  
My thought is that of the questions he put as Yes, the chance of getting the right answers is equal to 40%. But this is just a guess and I'm not sure of the explanation or if this is the right answer.
 A: I think Bayes' Theorem makes this most clear. The probability of Bob answering Yes on any question is $P(Y)=0.5$, the probability of Bob being correct on any question is $P(C)=0.5$, and the probability that Bob answers Yes given that he answered correctly is the proportion of questions with Yes as the answer, $P(Y|C)=0.4$. This leads to:
$$P(C|Y)=\frac{P(Y) \cdot P(Y|C)}{P(C)}=\frac{0.5 \cdot 0.4}{0.5}=0.4$$  
Thus, the estimated percentage of correctly answered questions that Bob shaded Yes is $P(C|Y)=0.4=40\%$
A: The amount he will get correct is independent of what the distribution of right and wrong answers is.
You can imagine this by assuming that all the correct answers are "No" ($0\text{%}$ Yes, $100\text{%}$ No). By the reasoning you've made, all the answers obtained from the coin will be wrong, which is obviously incorrect.
Therefore, the probability should be $50\text{%}$ since it is a fair coin.

Edit: As @lulu has pointed out, the above is only applicable if both the "Yes" and "No" answers are considered. 
However, since you've mentioned: "Among those questions that Bob shaded yes", the answer should be $40\text{%}$ as other answers are pointing out.
A: It's 40%.
Here's an equivalent statement: 
Take a random subset $S$ among all the questions (can also be called sampling) - each question is taken with probability $\frac{1}{2}$. Since questions are chosen uniformly at random it still holds that 40% of the questions have Yes as the correct answer. 
But $S$ corresponds to the $\mathtt{Yes}$-subset (from your question).
