Q.Of the students in a college, it is known that 60% reside in hostel and 40% are day scholars (not residing in hostel). Previous year results report that 30% of all students who reside in hostel attain A grade and 20% of day scholars attain A grade in their annual examination. At the end of the year, one student is chosen at random from the college and he has an A grade, what is the probability that the student is a hostlier?
We use Bayes’ theorem to reverse the conditional probability: given that a student got an A grade, the chance they are a hosteller is .
Why Bayes’ theorem?
We are told two things about the college:
- 60% of students are hostellers, 40% are day scholars.
- Among hostellers, 30% get A grade; among day scholars, 20% get A grade.
But the question flips the direction: given that a randomly chosen student has an A grade, what is the probability they are a hosteller? That is a classic inverse probability problem — we know and want .
Bayes’ theorem is the tool for exactly this: it lets us “reverse” the condition using the overall probabilities.
The denominator is the total probability of getting an A grade, which we find by the law of total probability — summing over the two groups.
Step-by-step solution
1. Define events clearly
Let = student is a hosteller, = student is a day scholar, and = student gets A grade.
From the problem:
- ,
- ,
2. Find the total probability of A grade
A student can get an A either as a hosteller or as a day scholar. These are mutually exclusive and cover all students, so:
Substitute:
So 26% of all students get an A grade.
Think of it as a weighted average: the overall A-grade rate is the weighted mean of the two group rates, with weights equal to the group sizes.
3. Apply Bayes’ theorem
We want :
Simplify the fraction:
4. Interpret the result
Even though hostellers are a majority (60%), their A-grade rate (30%) is only moderately higher than day scholars’ (20%). So when we see an A-grade student, the chance they are a hosteller is , or about 69.2%.
A common mistake is to ignore the base rates and simply compare 30% vs 20%, concluding the answer is 60% or 3/5. But Bayes’ theorem shows the correct probability is higher than 60% because the hosteller group is larger — the “prior” matters.
The probability that the student is a hosteller is .
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.