Probability after a success Experience has shown that the probability of passing a particular exam
if a student studies for $6$ hours or more the previous day is $0.8$, and that the probability of passing this exam is only $0.5$ if the student studies for less than $6$ hours the previous day. Seventy-five percent of students actually do study for $6$ or more hours the day before the exam. 
Suppose a student is chosen at random, and the number of hours they studied the previous day is not known.

Question:
  If the student passes the exam, what is the probability that they studied for $6$ or more hours the previous day?

I'm a bit confused on how to tackle this part of the question for one of my homework assignments. Any hints or help would be greatly appreciated. 
I tried it out myself and got $0.828$ but I have no idea if this is correct. I basically took the probability of a student studying for $6$ or more hours $0.75$ and passing $0.8 =0.6$ and $6$ or less hours being = $0.125$. So $\frac{0.6}{0.725}\simeq0.828$?

Let $P$ be the event the student passes, and let $S$ be the event she studied for $6$ or more hours. We want $\Pr(S|P)$. By the usual formula for conditional probability, we have
$$\Pr(S|P)=\frac{\Pr(S\cap P)}{\Pr(P)}.$$
We need to compute the two probabilities on the right. 
The event $P$ can happen in two ways: (i) She studies and passes or (ii) She does not study and passes.
The probability of (i) is $(0.75)(0.8)$. The probability of (ii) is $(0.25)(0.5)$. Add to find $\Pr(P)$.
We have already computed $\Pr(S\cap P)$: it is the probability of (i).
Now you have all the required ingredients.
