# 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.

• Have you heard of Bayes' Rule (also called Bayes' Theorem)? That will help you. – shadowtalker Oct 3 '18 at 3:37
• Bayes' Rule (from my textbook) states that P(B|A) = P(B ∩ A)/P(A). This is the formula I attempted to use, getting nowhere. – Joe Ademo Oct 3 '18 at 3:41
• That's not Bayes' Rule, that is the definition of conditional probability. If that's really what your textbook says then your textbook is doing you a disservice! Wikipedia has the right definition. – shadowtalker Oct 3 '18 at 3:43
• @shadowtalker most undergraduate probability courses interchange the two unfortunately. OP, you need to express the probabilities you need in terms of those you're given. Use the definition of conditional probability to do that – Xiaomi Oct 3 '18 at 3:45
• Ah, this definition makes more sense. Pr(S|A)=Pr(A|S)Pr(S) / Pr(A|S)Pr(S) +Pr(A|S')Pr(S). I struggle to apply this to questions in practice but will work on that. Thank you. – Joe Ademo Oct 3 '18 at 3:49

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!