On this page
Two-way table questions test one skill: knowing which total goes on the bottom of the fraction. Below is one table, worked from every angle a board or entrance paper might use.
What is a two-way table in probability?
A two-way table, also called a contingency table, counts one group sorted by two features at once: one feature along the rows and the other down the columns. OpenStax's Introductory Statistics section on contingency tables describes them as a way of setting out data that makes conditional probabilities easy to calculate.
We use one made-up Class 11 batch of 200 students throughout, sorted by gender and elective. The numbers are invented for practice, not survey data.
Girls (90 in total): Biology 36, Economics 27, Computer Science 27
Boys (110 in total): Biology 24, Economics 33, Computer Science 53
Column totals: Biology 60, Economics 60, Computer Science 80
Copy it into your notebook as a grid with a total row and a total column before reading on.
How do you read joint and marginal probabilities?
Every two-way table holds three kinds of probability, and each one uses a different part of the grid.
Joint probability is one inside cell divided by the grand total. P(girl and Biology) = 36/200 = 0.18.
Marginal probability is a row or column total divided by the grand total. P(Biology) = 60/200 = 0.30 and P(girl) = 90/200 = 0.45.
Conditional probability is an inside cell divided by a row or column total. It is never divided by the grand total.
How do you find conditional probability from a two-way table?
NCERT's Class 12 mathematics textbook, Chapter 13, Probability, defines the conditional probability of E given F as P(E|F) = P(E∩F)/P(F), provided P(F) is not zero. The same chapter shows this equals n(E∩F)/n(F). In a table, "given F" means: cover everything outside F's row or column and work only inside it.
P(Biology | girl). "Given girl" means you use only the girls' row. 36 of the 90 girls chose Biology, so the answer is 36/90 = 0.40.
P(girl | Biology). Now the condition is Biology, so you use the Biology column. 36 of the 60 Biology students are girls, so the answer is 36/60 = 0.60.
P(boy | not Biology). The condition covers two columns: 60 + 80 = 140 students. Boys among them: 33 + 53 = 86. So the answer is 86/140 = 43/70, about 0.61.
Check with the formula. P(girl and Biology)/P(girl) = 0.18/0.45 = 0.40, the same as question 1.
Why is P(A|B) not the same as P(B|A)?
Questions 1 and 2 used the same cell, 36, and got 0.40 and 0.60. Only the bottom changed, from the girls' row (90) to the Biology column (60). Swapping the order is an easy slip, so read every conditional probability aloud as "out of the ___, what fraction are ___?" before you divide.
Turning P(A|B) into P(B|A) when you do not have the full table is exactly what Bayes' theorem is for. Our post on Bayes' theorem and conditional probability picks up from here.
How can a two-way table show whether events are independent?
The same NCERT chapter defines E and F as independent if P(E∩F) = P(E) × P(F). It also states independence as P(E|F) = P(E), which needs P(E) and P(F) to be non-zero. In table terms, knowing the condition does not change the proportion.
Test gender against Economics. P(girl) × P(Economics) = 0.45 × 0.30 = 0.135, and P(girl and Economics) = 27/200 = 0.135. They match, so in this batch Economics is independent of gender: 27/90 of the girls and 33/110 of the boys chose it, and both are 0.30.
Biology fails the test. P(girl) × P(Biology) is again 0.135, but P(girl and Biology) = 36/200 = 0.18. Girls in this batch chose Biology at a higher rate (36/90 = 0.40) than boys (24/110, about 0.22). For more practice deciding from numbers alone, see how to tell independent from dependent events.
A five-step checklist for any two-way table question
Complete the table: fill missing cells by subtracting from row and column totals.
Underline the condition: the words after given, among or if.
Circle the matching row or column. Its total is your denominator.
Add the cells inside it that match the event. That sum is your numerator.
Sanity-check: the answer lies between 0 and 1, and P(not E | F) = 1 − P(E | F), so 0.40 for Biology among girls means 0.60 for the other subjects.
If you keep reaching for the grand total, work a few more tables in the Fermi Problem Library, where a step-by-step solver explains the reasoning rather than printing an answer. If the gap is the idea of a reduced sample space rather than the arithmetic, the Fermi Concept Library gives each mathematics concept its own lesson.
Next, see why "given" shrinks the sample space in our explainer on conditional probability as a reduced sample space.



