Class 12 Maths, Worked in Full Past papersGet updates
Chapter 13 · Probability

Exercise 13.3 · Q3: Hostel or day scholar: the A-grade student lives in the hostel, P=913P = \frac{9}{13}

Exercise 13.3Bayes' theorem · Section 13.5
The question

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?

(The book prints "hostlier", a misprint for "hosteller": a student who resides in the hostel.)

Exam answer

Let E1E_1⁠: the student resides in the hostel, E2E_2⁠: the student is a day scholar, and AA⁠: the student attains A grade.

E1E_1 and E2E_2 form a partition of the sample space (each student is one or the other).

P(E1)=60%=35P(E_1) = 60\% = \frac35 and P(E2)=40%=25P(E_2) = 40\% = \frac25

P(A∣E1)=30%=310P(A|E_1) = 30\% = \frac{3}{10} and P(A∣E2)=20%=15P(A|E_2) = 20\% = \frac15

By the theorem of total probability,

P(A)=P(E1)P(A∣E1)+P(E2)P(A∣E2)=35⋅310+25⋅15=950+450=1350\begin{aligned} P(A) &= P(E_1)P(A|E_1) \\ &\quad + P(E_2)P(A|E_2) \\ &= \frac35\cdot\frac{3}{10} + \frac25\cdot\frac15 \\ &= \frac{9}{50} + \frac{4}{50} = \frac{13}{50} \end{aligned}

By Bayes' theorem,

P(E1∣A)=P(E1)P(A∣E1)P(A)=950÷1350=950×5013\begin{aligned} P(E_1|A) &= \frac{P(E_1)P(A|E_1)}{P(A)} \\ &= \frac{9}{50} \div \frac{13}{50} \\ &= \frac{9}{50} \times \frac{50}{13} \end{aligned}

∴\therefore The probability that the student is a hosteller is 913\dfrac{9}{13}⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The A grade is the result we see; living in the hostel or not is the hidden cause. Bayes' theorem compares the two routes to an A grade: hostellers are more numerous and more likely to get an A, so most A grades come through the hostel. The share of the hostel route in all A grades is the answer.

Given, to find, and the plan
Given
60% of students live in the hostel and 40% are day scholars; 30% of hostellers and 20% of day scholars get an A grade. A student chosen at random has an A grade.
To find
The probability that this student lives in the hostel: P(E1∣A)P(E_1|A)⁠.
Plan
(1) Name the events; check the partition. (2) Turn every percentage into a fraction. (3) Total probability for P(A)P(A)⁠. (4) Bayes' theorem for P(E1∣A)P(E_1|A)⁠.

Basics you need

1Percentages as probabilities

"60% of the students" chosen at random gives probability 60100\frac{60}{100}⁠; simplify the fraction. Basics: classical probability

2"30% of hostellers" is a conditional probability

It describes only the students who live in the hostel, so it is P(A∣E1)P(A|E_1)⁠, not P(A)P(A)⁠. Lesson: conditional probability

3Total probability and Bayes' theorem (Section 13.5)

For a partition E1,E2E_1, E_2⁠: P(A)P(A) is the sum of the paths P(Ei)P(A∣Ei)P(E_i)P(A|E_i)⁠, and P(E1∣A)P(E_1|A) is the E1E_1 path divided by P(A)P(A)⁠. Lesson: Bayes' theorem

4Tree diagrams

Branch first by the cause, then by the result; multiply along a path. Basics: tree diagrams

Solution

  1. Name the events

    Let

    • E1E_1⁠: the student chosen resides in the hostel;
    • E2E_2⁠: the student chosen is a day scholar;
    • AA⁠: the student chosen attains A grade.

    E1E_1 and E2E_2 form a partition of the sample space (all students of the college): every student is either a hosteller or a day scholar, not both, and both groups are nonempty.

    The two groups do not overlap because the book defines day scholars as students "not residing in hostel"; for the same reason every student is in one of them, and indeed 60%+40%=100%60\% + 40\% = 100\%⁠. Both shares are nonzero. That is exactly the partition Bayes' theorem needs.
    Partition: pairwise disjoint, exhaustive, nonzero probabilities (Section 13.5.1). Lesson: Bayes' theorem
  2. Percentages into fractions

    P(E1)=60%=60100=35,P(E2)=40%=40100=25,P(A∣E1)=30%=30100=310,P(A∣E2)=20%=20100=15.\begin{aligned} P(E_1) &= 60\% = \frac{60}{100} = \frac35, \\ P(E_2) &= 40\% = \frac{40}{100} = \frac25, \\ P(A|E_1) &= 30\% = \frac{30}{100} = \frac{3}{10}, \\ P(A|E_2) &= 20\% = \frac{20}{100} = \frac15. \end{aligned}
    The student is chosen at random, so the share of a group is the probability of belonging to it. "30% of all students who reside in hostel attain A grade" speaks only of hostellers, so it is the chance of an A grade given E1E_1⁠. Fractions keep the arithmetic exact.
    x%=x100x\% = \frac{x}{100}⁠. Basics: classical probability
  3. The chance of an A grade overall

    Since E1E_1 and E2E_2 form a partition, by the theorem of total probability

    P(A)=P(E1)P(A∣E1)+P(E2)P(A∣E2)=35⋅310+25⋅15=950+225=950+450=1350.\begin{aligned} P(A) &= P(E_1)P(A|E_1) \\ &\quad + P(E_2)P(A|E_2) \\ &= \frac35\cdot\frac{3}{10} + \frac25\cdot\frac15 \\ &= \frac{9}{50} + \frac{2}{25} \\ &= \frac{9}{50} + \frac{4}{50} = \frac{13}{50}. \end{aligned}
    start where he lives result multiply along the path student E₁: hostel A: A grade 3/5 × 3/10 = 9/50 A′: no A 3/5 × 7/10 = 21/50 E₂: day scholar A: A grade 2/5 × 1/5 = 4/50 A′: no A 2/5 × 4/5 = 16/50 3/5 3/10 7/10 2/5 1/5 4/5
    The tree for Question 3. The rose path (hostel, then A grade) has product 950\frac{9}{50}⁠; the green path (day scholar, then A grade) has 450\frac{4}{50}⁠. Together, P(A)=1350P(A) = \frac{13}{50}⁠.
    An A-grade student is either a hosteller with an A or a day scholar with an A. Each route is a path on the tree; multiply along it, then add. Writing 225\frac{2}{25} as 450\frac{4}{50} gives a common denominator.
    Multiply along a path, add the paths. Basics: tree diagrams
  4. From the A grade back to the hostel: Bayes' theorem

    By Bayes' theorem,

    P(E1∣A)=P(E1)P(A∣E1)P(A)=950÷1350=950×5013=913.\begin{aligned} P(E_1|A) &= \frac{P(E_1)P(A|E_1)}{P(A)} \\ &= \frac{9}{50} \div \frac{13}{50} \\ &= \frac{9}{50} \times \frac{50}{13} = \frac{9}{13}. \end{aligned}
    The top is the hostel path alone, 950\frac{9}{50}⁠; the bottom is all A-grade paths, 1350\frac{13}{50}⁠. Their ratio is the share of A-grade students who live in the hostel. The 50s cancel.
    Dividing by a fraction is multiplying by its flip. Basics: dividing by a fraction
  5. A quick sense check

    For a day scholar, P(E2∣A)=450÷1350=413P(E_2|A) = \frac{4}{50} \div \frac{13}{50} = \frac{4}{13}⁠, and 913+413=1\frac{9}{13} + \frac{4}{13} = 1⁠. An A grade raises the chance of "hosteller" from 35\frac35 (about 0.6) to 913\frac{9}{13} (about 0.69), because hostellers get A grades more often.

    Given the A grade, the student is certainly one of the two kinds, so the two updated probabilities must add to 1.
    P(E1∣A)+P(E2∣A)=1P(E_1|A) + P(E_2|A) = 1 for a partition. Lesson: Bayes' theorem
Result

The probability that the A-grade student is a hosteller is 913\frac{9}{13}⁠. (Textbook answer: 913\frac{9}{13}⁠.)

Check it with numbers

Picture 100 students. 60 live in the hostel and 30%30\% of them, 18, get an A; 40 are day scholars and 20%20\% of them, 8, get an A. So 18+8=2618 + 8 = 26 students have an A grade, and 18 of them are hostellers: 1826≈0.6923\frac{18}{26} \approx 0.6923⁠, the same as 913≈0.6923\frac{9}{13} \approx 0.6923⁠.

Common mistakes
  1. Answering 310\frac{3}{10}⁠. That is P(A∣E1)P(A|E_1)⁠, the chance of an A for a hosteller. The question asks for P(E1∣A)P(E_1|A)⁠, the chance of being a hosteller for an A-grade student.
  2. Using 30% as P(A∩E1)P(A \cap E_1)⁠. 30% is a share of the hostellers only; the joint probability is 35×310=950\frac35 \times \frac{3}{10} = \frac{9}{50}⁠.
  3. Mixing percentages and fractions in one line. Convert everything first, then compute with fractions.
  4. Stopping at P(A)=1350P(A) = \frac{13}{50}⁠. That is only the bottom of Bayes' formula.
What to take away
  1. "x%x\% of group GG have property AA" means P(A∣G)=x100P(A|G) = \frac{x}{100}⁠: a conditional probability.
  2. Imagining 100 (or 1000) people turns a Bayes question into counting, and it is a quick check of the answer.
  3. The two-bag version of the same steps is Question 2; the next one, Question 4, has a cause that makes the result certain.

Every fact used, and where it comes from

FactUsed inSource
Partition of a sample spaceStep 1Section 13.5.1 (Lesson: Bayes' theorem)
Shares as probabilities, x%=x100x\% = \frac{x}{100}Step 2Classical probability, Class XI (Basics: classical probability)
Conditional probability P(A∣E)P(A|E)Step 2Section 13.2 (Lesson: conditional probability)
Theorem of total probabilityStep 3Section 13.5.2 (Lesson: Bayes' theorem)
Bayes' theoremSteps 4, 5Section 13.5; Example 19 uses it with percentages (Examples 15 to 21)
Dividing by a fractionStep 4Arithmetic (Basics: dividing by a fraction)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →