A student answers a multiple choice examination question that offers four possible answers. Suppose the probability that the student knew the answer to any given question is $.8$, and the probability that the student guessed at the answer is $.2$. Assume that if the student guesses, the probability of selecting the correct answer is $.25$.
So I know how to do a). I'm just stuck on b).
a) What is the probability that the student really knew the correct answer? (that is, what is the probability that the student knew the answer, GIVEN that the student got the answer correct)
A= correct answer, C= answered correctly 
$$P(A \mid C)= \frac{P(C \mid A)P(A)}{P(C \mid A)P(A)+ P(C \mid A^c)P(A^c)}$$
(1) $\dfrac{(.8)}{(1)(.8) +(.25)(.20)}$
b)  Suppose there is a third option. The student knew the answer with probability of $.7$, the student guessed with probability $.2$, and the student(incorrectly) thought they knew the answer given that the student thought they knew it is $0$. The conditional probability of a student getting the correct answer given that they guessed is still $.25$. Using this information, calculate the probability that the student really knew the correct answer. 
 A: 
Suppose the probability that a student knew the answer to any given question is $0.8$, and the probability that the student guessed is $0.2$.  Assume that if the student guesses that the probability that the student selects the correct answer is $0.25$.  What is the probability that the student knew the correct answer given that the student got the answer correct? 

You obtained the correct value.  However, labeling the event that the student knew the correct answer as correct answer is misleading given that the other event is that the student answered the question correctly.
Let $K$ denote the event that the student knew the answer.  Let $C$ be the event that the student answered correctly.  We wish to find $P(K \mid C)$.  
\begin{align*}
P(K \mid C) & = \frac{P(C \cap K)}{P(C)}\\
& = \frac{P(C \mid K)P(K)}{P(C \mid K)P(K) + P(C \mid K^C)P(K^C)}\\
& = \frac{1 \cdot 0.8}{1 \cdot 0.8 + 0.25 \cdot 0.2}\\ 
& = \frac{0.8}{0.8 + 0.05}\\ 
& = \frac{16}{17}
\end{align*}

Suppose the probability that a student knew the answer to any given question is $0.7$, the probability that the student guessed is $0.2$.  Otherwise, the student incorrectly thinks he or she knows the correct answer, in which case the student gets the question wrong.  Assume that if the student guesses that the probability that the student selects the correct answer is $0.25$.  What is the probability that the student knew the correct answer given that the student got the answer correct?

Let $K$ and $C$ be as above.  $T$ be the event that the student incorrectly thought he or she knew the answer. Let $G$ be the student guessed the answer. We wish to find $P(K \mid C)$.  
Observe that $P(T) = 1 - P(K) - P(G) = 1 - 0.7 - 0.2 = 0.1$.    
\begin{align*}
P(K \mid C) & = \frac{P(C \cap K)}{P(C)}\\
& = \frac{P(C \mid K)P(K)}{P(C \mid K)P(K) + P(C \mid T)P(T) + P(C \mid G)P(G)}\\ 
& = \frac{1 \cdot 0.7}{1 \cdot 0.7 + 0 \cdot 0.1 + 0.25 \cdot 0.2}\\ 
& = \frac{0.7}{0.7 + 0 + 0.05}\\
& = \frac{0.7}{0.75}\\
& = \frac{14}{15}
\end{align*} 
