

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Two strategies for choosing a prize box in a game where only one contains the grand prize. The first strategy is to stick with your initial choice, while the second strategy is to switch with the remaining box. The document also includes examples of shell programming and javascript code for simulating the game and counting the frequency of winning with each strategy.
Typology: Slides
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Lecture 14
Fall 2008
b=gen-random p=gen-random if [ $b = $p ] then echo yes else echo no fi
b=gen-random p=gen-random if [ $b = $p ] then echo no else echo yes fi
…