The Monty Hall Simulation

Slides:



Advertisements
Similar presentations
The Monty Hall Problem Madeleine Jetter 6/1/2000.
Advertisements

ABC Welcome to the Monty Hall show! Behind one of these doors is a shiny new car. Behind two of these doors are goats Our contestant will select a door.
Lesson 3 Working with Formulas.
Introduction to Excel Formulas, Functions and References.
1 Chapter Five Selection and Repetition. 2 Objectives How to make decisions using the if statement How to make decisions using the if-else statement How.
Simulation Operations -- Prof. Juran.
Judgment in Managerial Decision Making 8e Chapter 4 Bounded Awareness
Games, Logic, and Math Kristy and Dan. GAMES Game Theory Applies to social science Applies to social science Explains how people make all sorts of decisions.
Alice in Action with Java Chapter 5 Random Numbers.
Pradeep Velugoti Lakshman Tallam.  Type in the month name “January” in any cell say A1.  Now drag the fill handle to the right to select the range (Do.
5-1 Flow of Control Recitation-01/25/2008  CS 180  Department of Computer Science  Purdue University.
Flow of Control (1) : Logic Clark Savage Turner, J.D., Ph.D. Some lecture slides have been adapted from those developed.
1 Section 5.1 Discrete Probability. 2 LaPlace’s definition of probability Number of successful outcomes divided by the number of possible outcomes This.
Learning Goal 13: Probability Use the basic laws of probability by finding the probabilities of mutually exclusive events. Find the probabilities of dependent.
Boolean Expressions and If Flow of Control / Conditional Statements The if Statement Logical Operators The else Clause Block statements Nested if statements.
What is the probability that it will snow on Christmas day in Huntingdon?
Catch the Spirit of Mathematical Practices Mathematics Investigations Door 1Door 2 Door 3 Let’s Make a Deal...  Contestant picks one of three doors (1,
Mr Shum Spreadsheets eBooklet. Key Words Key Word CellAn individual box on a spreadsheet RowCells going across in an horizontal line. All rows have a.
Spreadsheets Objective 6.02
XP Copyright 2003 Peter McDevitt 1 Microsoft Excel 2002 Lecture 2 – Working With Formulas and Functions.
2 Explain advanced spreadsheet concepts and functions Advanced Calculations 1 Sabbir Saleh_Lecture_17_Computer Application_BBA.
Lesson 4 Cell Reference Formulas. Working with Cell References continued… Relative Cell Reference A relative cell reference means that the cell value.
Data Analysis Formula and Functions. Formula and functions A function is a calculation in a spreadsheet that has or can be memorized. There are many different.
Chapter 9: Simulation Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Solving Systems of Equations
COMPREHENSIVE Excel Tutorial 7 Using Advanced Functions, Conditional Formatting, and Filtering.
1 9/23/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Prescriptive Analytics Appendix A EXCEL TOOLS FOR THE MANAGEMENT SCIENTIST Business Analytics with Management Science Models and Methods Arben Asllani.
Section 7.1. Section Summary Finite Probability Probabilities of Complements and Unions of Events Probabilistic Reasoning.
Chapter 7 With Question/Answer Animations. Section 7.1.
Math Across the Curriculum: Statistics and Probability Paraprofessional Training August 24 th – August 28th.
Programming in Java (COP 2250) Lecture 11 Chengyong Yang Fall, 2005.
[1] Intro The following instructions will show you how to create an Excel worksheet that allows students to take multiple choice tests (practice or real)
Lesson 7 Using Logical and Financial Functions
Lesson 5: Working with Formulas and Functions Logical and 3D Formulas.
Homework Homework due now. Reading: relations
Conditional Structures UNIVERSITY OF THE PUNJAB (GUJRANWALA CAMPUS) ADNAN BABAR MT14028 CR
Topic 2: Intro to probability CEE 11 Spring 2002 Dr. Amelia Regan These notes draw liberally from the class text, Probability and Statistics for Engineering.
1 Building Java Programs Chapter 5 Lecture 5-2: Random Numbers reading: 5.1, 5.6.
Simulation Using computers to simulate real- world observations.
Microsoft® Excel Key and format dates and times. 1 Use Date & Time functions. 2 Use date and time arithmetic. 3 Use the IF function. 4 Create.
Flow of Control Unless indicated otherwise, the order of statement execution through a method is linear: one after the other in the order they are written.
Introduction Lecture 25 Section 6.1 Wed, Mar 22, 2006.
 2000 Prentice Hall, Inc. All rights reserved. 5.2Program Modules in C Functions –Modules in C –Programs combine user-defined functions with library functions.
Random Numbers Random numbers are extremely useful: especially for games, and also for calculating experimental probabilities. Formula for generating random.
Independence and Dependence 1 Krishna.V.Palem Kenneth and Audrey Kennedy Professor of Computing Department of Computer Science, Rice University.
Decision Statements, Short- Circuit Evaluation, Errors.
CompSci 4 Chap 6 Sec 2 Sep 30, 2010 Prof. Susan Rodger “All your troubles are due to those ‘ifs’,” declared the Wizard. If you were not a Flutterbudget.
1 Learning Objectives Bayes’ Formula The student will be able to solve problems involving finding the probability of an earlier event conditioned on the.
Microsoft Excel Prepared by the Academic Faculty Members of IT.
Section 7.1. Probability of an Event We first define these key terms: An experiment is a procedure that yields one of a given set of possible outcomes.
Monty Hall This is a old problem, but it illustrates the concept of conditional probability beautifully. References to this problem have been made in much.
CIS 100 Test #2 Review 1. EXCEL Functions on Test  SUM, COUNT, COUNTA, MAX, MIN, MEDIAN, MODE, AVERAGE, ROUND, and IF  Possibly Others 
FUNCTIONS The parts of a function In order to work correctly, a function must be written a specific way, which is called the syntax. The basic syntax for.
Ray Karol 2/26/2013. Let’s Make a Deal Monte Hall Problem Suppose you’re on a game show, and you’re given a choice of three doors: Behind one door is.
Computer Science Up Down Controls, Decisions and Random Numbers.
Using Advanced Functions and Conditional Formatting
Excel IF Function.
Microsoft Excel.
Boolean Expressions and If
The Monty Hall Problem Madeleine Jetter 6/1/2000.
If Statement Functions in Excel
IF if (condition) { Process… }
Spreadsheets 2 Explain advanced spreadsheet concepts and functions
Spreadsheets Objective 6.02
Functions theory © EIT, Author Gay Robertson, 2017.
Spreadsheets Objective 6.02
Chapter 3: Selection Structures: Making Decisions
Lessons 3: Coffee Shop Inventory
in Excel Instructor: Zhe He Department of Computer Science
Presentation transcript:

The Monty Hall Simulation in Excel

The Rules of the Game Do you switch?? There are 3 doors to choose from Randomly placed behind one of the doors is a NEW CAR! Behind each of the other two doors is a donkey You are asked to choose a door The host then opens a door you did not choose and shows you a donkey You are then asked if you would like to switch to the remaining closed door Do you switch??

Useful Excel Functions =randbetween(lower_bound, upper_bound) generates a random integer between and including the bound numbers =rand() generates a random decimal number between 0 and 1 =if(condition, value_if_true, value_if_false) tests for a logical condition; returns specified value if condition is true or an alternate specified value if condition is false this is our “decision maker” function =sum(cell:cell) sums up all cells specified; the colon is used to express a range of cells

Divide and Conquer We are going to break our larger problem down into sub-problems for easier coding We will consider three cases In each, the car will be known to be behind a particular door Combining the results of the three cases will provide an understanding of the larger situation

Case 1: Car Behind Door #1 Contestant Chooses a Door Our main usage of random numbers will be for the contestant’s random selection of a door, as the first step of the game Use a formula to generate a random number for the contestant’s selection of door #1, 2, or 3

Case 1: Car Behind Door #1 How does the host decide which door to open? The host will never open the door the contestant selected, so we know Door #1 cannot be opened. However, this might be a good condition to logically check for… These True/False questions can be coded with the “if” function

Case 1: Car Behind Door #1 So, do you switch doors? It is simpler to code the logic that determines whether the contestant would have won if he/she stayed with the original door selection use the “if” function to do this Logically, if the contestant would have won by staying with the original door selection, he/she would have lost having switched doors use the “if” function to code this based off of the win by staying value

Case 1: Car Behind Door #1 (formulas for first game played) Remember to add sums at the bottom of the win columns to total the number of games won either staying or switching

Write the coding for the other two cases, where the car is known to be behind Door #2 and Door #3