File Exchange

image thumbnail

Prove of Monty Hall Problem

version (384 Bytes) by Mohammad Alhashash
Should I switch the door or not. Yes! Why? Run the script.


Updated 22 Dec 2017

View License

The code uses 100 random trails of selecting among three doors to win a car. each with randomly selected door that containing the care in variable called 'prize', and randomly candidate door in a variable 'candidate' . The host decided to open a door with a goat, this shown in variable called 'host' and then there is a variable containing the case of switch to the other door ' selecting.
The experiment shows that the switching result in much higher probability of winning the car from one third to two third ! Try it .

Cite As

Mohammad Alhashash (2020). Prove of Monty Hall Problem (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux