According to the record of the registrar's office at a state university, 35% of the students are freshman, 25% are sophomore, 16% are junior and the rest are senior. Among the freshmen, sophomores, juniors and seniors, the portion of students who live in the dormitory are, respectively, 80%, 60%, 30% and 20%. If a randomly chosen student does not live in the Dormitory, what is the probability that he is a sophmore ?
An outline leading to the solution:
According to the definition of conditional probability, $P(So|D^c) = P(So \cap D^c)/P(D^c).$
For the numerator: $P(So \cap D^c) = P(So)P(D^c|So) = .25(1-.6) = 0.1.$
For the denominator: $$P(D^c) = P(F \cap D^c)+P(So \cap D^c)+P(J \cap D^c)+P(Sr \cap D^c).$$ This is an example of the Law of Total Probability.
We have already found one of these four probabilities. Find the other three in a similar way, and add.
Then do the division for the final answer.
This is an example of Bayes' Theorem. (Hence my edit to the title of your question.)