Code Monkey home page Code Monkey logo

montyhallproblem's Introduction

Monty Hall project

I made this project to show you the idea of the Monty Hall problem so you can make sure that the right solution โ€” always change the door, is really true, which at first glance, conflicts with the common sense.

How does the program work?

You choose the door, the program opens it but doesn't show you who is behind. Then it shows you where the goat is so you can deside to change your choice or not. And you get the result with graphs and images. You can also see what was behind each door, jump to the history page or restart the game.

The most interesting thing in the program is the Computer plays page. You specify the number of games to play, then program plays this number of games same randomly changing choice and leaving it. Appeared graphs shows you that the winning probability if change choice really is 67%, if not โ€” 33%.

Skills used in the project

In the project besides usual java libraries are used:

If you don't know about Monty Hall problem

Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?

It turns out that the winning probability is bigger if you switch your choice. I made this game so you will see that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.