Head office, Rana Pratap Bagh, Delhi011 2721 1512+91 97116 99511

Science project idea

Two bags of beads: conditional probability and Bayes by experiment

When you know which colour was drawn, you can work backwards to the chance of which bag it came from. The experiment shows how new information updates a probability.

What it shows

When you know which colour was drawn, you can work backwards to the chance of which bag it came from. The experiment shows how new information updates a probability.

The science

Choose a bag with equal probability 1/2 each. P(red) = (1/2)(3/4) + (1/2)(1/4) = 1/2. Bayes’ rule gives the chance that a red bead came from bag A: P(A | red) = P(red | A) P(A) / P(red) = (3/4)(1/2) / (1/2) = 3/4. The prior chance of A was 1/2, and seeing red raises it to 3/4. Repeating the experiment many times and looking only at the trials where red was drawn shows a share near 75 per cent from bag A.

Materials

Cost: free. Many items come from home or from waste; spare parts such as LEDs, motors and wire are in the store.

  • Two opaque cloth bags or cups
  • 3 red and 1 blue bead for bag A, 1 red and 3 blue beads for bag B (or coloured paper pieces)
  • A coin to choose the bag
  • A tally table
  • A tree diagram on chart paper
  • A calculator
  • A pencil

Safety

For this project: Keep small beads away from young children and do not put them in the mouth.

Never use mains electricity: power models with cells, batteries or a low-voltage adapter. Sharp and hot tools, flames and lab chemicals need an adult or your teacher beside you. Keep magnets, button cells and small parts away from young children, and wash your hands after making.

All the safety rules

Step by step

8 steps. Do them in order, and test each part before you go on to the next. Write what you notice in a notebook as you go.

  1. Fill bag A with 3 red and 1 blue bead and bag B with 1 red and 3 blue beads, without telling the players which is which.

  2. Toss a coin to choose a bag: heads for A and tails for B. Do this before every trial and record the choice secretly.

  3. Without looking, draw one bead from the chosen bag, record the colour and then replace it.

  4. Write in the table the bag that was used and the colour. Do 120 trials with friends sharing the work.

  5. Count the total number of red draws, and among them how many came from A. Calculate the fraction.

  6. Draw the tree diagram with branches for the bag and the colour and put probabilities on each branch.

  7. Calculate P(A | red) by Bayes’ rule and compare with the experimental fraction.

  8. Change the bags to 4 red, 1 blue and 2 red, 3 blue, predict the new P(A | red) and test it with another 100 trials.

What you should see

About half of all draws are red and about three quarters of the red draws come from bag A, matching the calculation of 0.75.

Viva questions

A teacher or a judge will ask how it works. Try to answer each question before you open it, then compare.

1What is conditional probability?

The chance of an event given that another event has already happened.

2State Bayes’ rule for this problem.

P(A | red) = P(red | A) P(A) / P(red).

3Why does the probability of A change after seeing red?

Red is more likely from A, so the evidence favours A.

4Where is Bayes’ rule used?

In medical tests, spam filters and weather forecasts.

Free ebook: Viva Questions for Science Projects

Take it further

Apply the same rule to a medical test that is 95 per cent accurate for a disease affecting 1 per cent of people, and compute the chance of disease given a positive test.

Change one thing, measure what happens, and add a table or chart of your readings: that is what turns a model into your own investigation.

Free ebooks for this project

WhatsApp us