Empirical Lab Repository

Title: Let's Make a Deal (a.k.a. The Monty Hall Problem)

Author: Grant W. Braught, Dickinson College, braught@dickinson.edu

Possible courses: CS1

Empirical Concepts Used: average, percent

Empirical Concepts Introduced: precision, resolution, consistency, accuracy, percent error

Computer Science Concepts Used: conditionals and iteration, basic input/output, arithmetic expressions, random number generation, rounding

Summary: This assignment asks students to develop a simulation and analysis of the classic Monty Hall problem. In this problem there are three curtains. Behind two of the curtains are dud prizes and behind the third curtain is a real prize. The contestant is asked to select one of the three curtains. After the contestant selects a curtain, one of the remaining curtains is opened revealing a dud prize. The contestant is then given the opportunity to change to the remaining unopened curtain. The empirical question to be investigated is whether or not the contestant should switch doors.

The programming assignment is language independent and outlines the program design. The student is asked to simulate a contestant who plays the game over and over again, switching curtains each time. The basic analysis of the data asks the student to complete multiple trials of the game with each trial consisting of a number of rounds. The result of a trial is determined by the percentage of the rounds which are won. Additional exercises introduce and explore consistency and accuracy. The final exercises consider the effect of increasing the number of rounds or the number of trials on consistency and accuracy.