Conditional Probability Statistics (Students Studying) Over the past years, 90% of Stats students study for the first midterm. Of those who study, 30% get an A grade on the first midterm, whereas 5% of those who do not study get an A grade. If you learn that a randomly selected student has an A grade on the first midterm, what is the probability that he/she studied? 
OK so with this data, then:
$$
\Pr(S) = 0.9 \\
\Pr(A|S) = 0.3 \\
\Pr(A|S') = 0.05 \\
$$
Where $\Pr(S)$ is the probability of studying and $\Pr(A)$ is the probability of getting an A.
I think I am looking for $\Pr(S|A)$. The formula I know for this is:
$$
\Pr(S|A) = \frac{\Pr(A∩S)}{\Pr(A)}
$$
The issue is that I don't know either of those probabilities. I am not sure where to go from here.
 A: Bayes's Theorem can be unintuitive, I would suggest trying the problem using a tree diagram. Here I have made the tree for the problem at hand:

So the probability of the student getting an A and having studied is 0.27, and the probability that they got an A without studying is 0.005. 
Intuitively this is enough for me to see that the probability that a student studied given that they got an A is
$P(S|A) = \frac{0.27}{0.27+0.005}$.
I got that by thinking about the fact that the only branches that enable the condition that the student got an A are the first and third branch. Then, since I want to know the relative probability, I think what is the probability of the top branch given that the only two branches are the first and third branches.
Okay, so now in  terms of Bayes' Theorem:
$P(S|A)= \frac{P(S)\,P(A|S)}{P(A)}$ 
The numerator is spelled out in the questions
$P(S) = 0.9$
$P(A|S) = 0.3$
Now the tricky part is getting $P(A)$. There are two ways a student can get an A, and so we sum the corresponding probabilities of each to get
$P(A) = P(S)\,P(A|S)+P(S^*)\,P(A|S^*)$.
Reinserting into Bayes' Theorem, we arrive at
$P(S|A)= \frac{P(S)\,P(A|S)}{P(S)\,P(A|S)+P(S^*)\,P(A|S^*)}$.
In this way we arrive at the same result as compared to looking at the tree.
Hope that helps!
