top of page

Magic box with 50-50

Lesson Overview

This course builds on the concept and mechanism of “random number”, provide students with the opportunity to experience real-life phenomena related to probability. Especially, how the experimental probability could be different from our expectation, what is meant by independent events, and how to use probability to build a fair game system.

Learning Objectives

  • Use “pick random number [XX - XX]” to simulate probability conditions.

  • Use random number and conditional codes to simulate the real-life event.

  • Draw conclusions and inference from the results of large number trials.

  • Extend to more conditions.

Task Description and Resources

Task 1: 50% + 100, 50% - 100

Purpose: Get students familiar with the drawing paradigm of “scan the whole stage”.

Objective: To observe how the money going to change following this rule for several trials and large number of trials.

Suggested Steps:

  • Use “pick random number [XX - XX]” to simulate the random event. Set variables to store a single event. Determine the conditions that can fulfil the situation. For example, we can set take random number [1 - 2], or [1 - 100], the condition could be [= 1] and [= 2], or [< 51] and [> 50], respectively. Use list to store the results after a trial. Run multiple number of trials to observe the results.

  • Ask students to reflect on the results. The sample guiding questions are: (1) What results do you expect? Does the computer simulation close to your expectation? And why? (2) Image that after 1000 trials, we got the results of -5000. Now I run another 1000 trials, what would you expect?

Reference Code:

Painting 1.gif

Task 2: 50% * 2, 50% / 2

Objective: To observe how the money going to change following this rule for several trials and large number of trials. Think about the differences between the rules in Task 1.

Suggested Steps:

  • After simulation, reflect on the results: What are the differences between Task 1 and Task 2, and why? What can we infer from the results?

Reference Code:

Painting 2.gif

Task 3: 30% * 2, 40% / 2, 30% unchanged. Or other conditions

Purpose: Explore the covariational relationship between y and x and create figures representing such relationship.

Problem Statement: Use Scratch to draw with the conditions y = x, y=x2, etc., and elucidate why it represents a straight line. As an additional task, apply inequality signs to these conditions and interpret the outcomes.

Key Concepts: Covariational reasoning.

Suggested Steps:

  •  Program a sprite to systematically move across the stage (as in Task 1).

  • Use the “if … then …” structure with conditions being the relationship between y and x, then pin on the points that satisfy the relationship.

  • Change the operator from “=” to “<” or “>”, then run the program again.

Reference Code:

Painting 3.gif

Task 4: Distance to Two Fixed Points

Purpose: Explore how the parameters in linear function (a and b) can impact its graph, and introduce the ideas of slope and intercept.

Problem Statement:

Use Scratch to draw different conditions like y = ax and y = ax + b, varying 'a' and 'b' to see how the function's graph changes.

Suggested Steps:

  • Set up to variable a and b.

  • Follow the steps in the above tasks, and set the conditions to be “y-coordinate = a * x-coordinate + b”, and change a, b by certain values

Key Concepts: functions; slope; intercept.

Reference Code:

Painting 4.gif


This course guides students to experience experimental probability by using random numbers to simulate real-life probability phenomena. Through this experience, students will feel the differences between concepts like “theoretical probability”, “expected value”, “experimental probability” and “instance trial”. The real-life and unpredictable situation could be engaging for students and create conflict to help the knowledge construction.


The author would like to thank Zhi Hao CUI for designing this lesson and appreciate all the anonymous teachers and students who participated in this research.

bottom of page