3 Probability in Casinos
By: Evan Whiteway-Willard
Probability in Casinos
Introduction to Probability in Casinos:
- Introduce the activity by reviewing probability concepts, focusing on expected values and randomness in games of chance.
- Present the scenario: Mr. W’s casino is losing money due to unprofitable slot machines.
- Discuss the challenge: Students must adjust the slot machine code to make it profitable while keeping it fun for customers.
- Explain the goal: Aim for an average total points of -50 for 500 spins.
Students will tinker with the existing code and attempt to lower the average points won after 500 spins to -50.
Working Progress:
- Provide students with the existing slot machine code.
- Have students analyze the code, identify potential bugs, and report them to the teacher.
- Students modify the script, adjusting probabilities and payouts to achieve the target profitability.
- Students run simulations (500 spins), recording their average points and refining their code as needed.
Consolidation:
- Analyzing the Impact of Probability Adjustments:
- Discuss how small changes in probability affect profitability.
- Ethical Considerations in Game Design:
- Explore fairness in gambling and responsible gaming practices.
- Data Analysis and Graphing:
- Have students visualize their results by creating graphs or tables.
- Comparing Different Strategies:
- Students compare different approaches (e.g., changing payouts vs. modifying probabilities).
- Real-World Applications:
- Relate findings to how real casinos balance profit and customer experience.
Resource Information:
Tags: Tinkering, debugging
Grade: 8
Main Subject: Coding
Other Integrated Subject:
Grade 8 Math
D2.1: solve various problems that involve probability, using appropriate tools and strategies, including Venn and tree diagrams
Grade 8 Coding
C3.2: read and alter existing code involving the analysis of data in order to inform and communicate decisions, and describe how changes to the code affect the outcomes and the efficiency of the code
Learning to Code?: No
Coding to Learn?: Yes
URL Link to Code: https://scratch.mit.edu/projects/1138317924