Forum Replies Created
-
AuthorPosts
-
26 July, 2017 at 9:16 pm #1062577
Drac you have a good brain , for love of God use it. There aren’t “100 doors” there are 3 doors rendering your analysis of these odds and computer programme unfit for purpose.
The simulation can be run with any number of doors, I provided the results when there are 3 doors also. Read my response more carefully, lol.
Even using your example, the summary of the odds is flawed as using your example, one door is removed from 100 meaning the original choice has a 1 chance in 99 doors of being the car which is not 1%. In addition to that you state ” 98 of the goat doors were removed from the 99″ which was not the question but pursuing this line , that means switching doors would not give you a ” 99%” chance of being a car
The typical definition of the Monte Hall problem is that all doors except one (excluding the door previously chosen) are opened.
26 July, 2017 at 7:58 pm #1062564That’s mathematically impossible
Why do you say that?
When the alternate door is offered, 98 of the 99 goat doors are removed from the selection.
The original choice has 1/100 (1%) chance of being the car, therefore the one remaining door must have a 99/100 (99%) chance of being the car.
26 July, 2017 at 7:27 pm #1062558Your computer programme has gone wrong if it says there is a 1% chance of a straight shootout between 2 doors and a 50/50 chance.
Read what I wrote again

26 July, 2017 at 6:56 pm #1062550It depends on the university as some polytechnics masquerading as universities offering a degree in ” media studies ” have an entry standard so low that practically writing your own name correctly would enable you to enroll.
A quick search shows that Cambridge offers a masters in ‘film studies’, this isn’t something that is limited only to ex-polytechnics.
I did my bachelors degree with Open University, which in practice doesn’t have any entry requirements at all. It was still a fairly comprehnsive and challenging course however.
26 July, 2017 at 6:49 pm #1062545I will bow to your superior knowledge of computer programming rather than trying to enter one myself, as it will probably end up with a pork sandwich being revealed at the door. To clarify, are you saying that after testing this, the end result is a negligible /no benefit from switching the door as Mister Q and I have stated?
Running the simulation with 3 doors staying with the initial door gives ~33% chance of winning, switiching doors gives a ~77% chance of winning.
If you run the simulation with 100 doors instead, staying with the initial door gives ~1% chance of winning, switiching doors gives a ~99% chance of winning.
26 July, 2017 at 3:24 pm #1062516Turns out I recalled the solution inncorectly. I wrote a simulation to test the problem, swapping doors idoes mprove your chances of winnining.
This is why you shouldn’t rely on memory, and analyse things properly every time.

26 July, 2017 at 3:20 pm #1062514I made a slight mistake in the progam, where if you initially select the car, it can give you the same door you selected as the option to swap to. I haved fixed it here :
public class MontyHall
{
public static float calculateProbability(int doors, boolean swap)
{
Random rand = new Random();
int repeats = 1000;int wins = 0;
for(int i = 0; i <= repeats; i++) {
// Place the car behind a random door
int car = rand.nextInt(doors);// Chose a random door
int choice = rand.nextInt(doors);// Provide an alternate door at random
int option;
if(choice == car) {
while(option == car) option = rand.nextInt(doors);
}else {
option = car;
}// Swap doors
if(swap) choice = option;// Check if the chosen door wins
if(choice == car) ++wins;
}return ((float) wins / (float) repeats) * 100.f;
}public static void main(String[] args)
{
int doors = 3;
System.out.println(“Simulating the Monty Hall problem with ” + doors + ” doors”);
System.out.println(“Probability of winning when not swapping is ” + calculateProbability(doors, false) + “%”);
System.out.println(“Probability of winning when swapping is ” + calculateProbability(doors, true) + “%”);
}
}26 July, 2017 at 3:09 pm #1062507Turns out I recalled the solution inncorectly. I wrote a simulation to test the problem, swapping doors idoes mprove your chances of winnining.
Copy the following text into https://www.compilejava.net/ to run the program in your browser
import java.util.Random;
public class MontyHall
{
public static float calculateProbability(int doors, boolean swap)
{
Random rand = new Random();
int repeats = 1000;int wins = 0;
for(int i = 0; i <= repeats; i++) {
// Place the car behind a random door
int car = rand.nextInt(doors);// Chose a random door
int choice = rand.nextInt(doors);// Provide an alternate door at random
int option;
if(choice == car) {
option = rand.nextInt(doors);
}else {
option = car;
}// Swap doors
if(swap) choice = option;// Check if the chosen door wins
if(choice == car) ++wins;
}return ((float) wins / (float) repeats) * 100.f;
}public static void main(String[] args)
{
int doors = 3;
System.out.println(“Simulating the Monty Hall problem with ” + doors + ” doors”);
System.out.println(“Probability of winning when not swapping is ” + calculateProbability(doors, false) + “%”);
System.out.println(“Probability of winning when swapping is ” + calculateProbability(doors, true) + “%”);
}
}26 July, 2017 at 2:29 pm #1062495I’m in a fairly heated debate with someone on a football forum over probability and it’s an old age argument you may have encountered. To summarise , there are three doors, one has a car behind it and two have goats. The contestant picks one door and the host picks a door with a goat behind it leaving the door the contestant has picked and one more door. The host then offers the contestant the option of switching. My argument is it is now a 50/50 chance of having a car or a goat and switching doors is irrelevant but common opinion amongst PHD maths graduates is theprobability benefit of switching increasing the chance of getting to the car to 2/3 … how so?
Switching doors doesn’t statistically improve your chances of winning the car, the Monty Hall problem is a good example of how raw probabilities can be misleading.
The easiest way to demonstrate this would be to write two computer programs that randomly select doors. The first program always switches doors, the other will always keep it’s door. On average across many attempts each program will win roughly the same number of times.
This isn’t a difficult task, and I could write this for you if you wanted.
26 July, 2017 at 2:25 pm #1062493Well first of all, people who go to University, take higher education etc are very intelligent people who have some amazing knowledge.
I’m not sure how much I agree with this. From my experience most people who go to university are of average or below average intelligence. And if they already had knowledge then there is no purpose in them attending a university course.
If people could live long enough, there would probably be people from hundreds of years ago alive still and still debating whether the earth is flat even though the evidence is plain to see today that it’s not. They just don’t want to believe it.
There are still people who believe that today.
-
AuthorPosts
