2006/9/10, Björn Helgason  <[EMAIL PROTECTED]>:
> The probability of new toss of a coin is not dependent
> on the previous tosses

There is no coin, in the original context.

> You now have a 50/50 chance of choosing your door or the other

You have 100% chance of choosing the door you choose.

But which door has the car behind it?

> The probability is even anything else is just plain silly

The probability of what?  Of a coin toss landing a specific
way?  Sure.

For that matter, if you flip a coin to decide whether you switch
or stay, then your probability of picking a car is 50%.

But there are three doors, and the probability of a car appearing
behind any one of the doors is not 50%, it's roughly 33%.  So if
you do not switch, you have, roughly, a 33% chance of picking the
right door.

Furthermore, if you do switch, and the car was behind the door you
originally picked, you lose.  So you have at least a 33% chance of
losing if you switch.

However, if the car was not behind the door you originally picked,
a goat was behind that door, and there are only two goats.

Here's how I like to simulate this:

NB. door numbers
   doors=: 1+?~3

NB. door indices
   car=:   ?3
   mine =: 0
   monty=: {.(?~3)-.car,mine

To find door numbers (assuming you're interested in that), use:
   car   { door
   mine  { door
   monty { door

As for whether or not I win:

If I don't switch, I win if mine=car, and lose otherwise.

If I do switch, I lose if mine=car, and win otherwise.

Why do I win if I switch and mine~:car?  Because when mine~:car I
picked a goat, monty picked the other goat, and there are only two
goats.

In other words, regardless of how large n is, and regardless of
how many times you run the following, its result is always true:
   n=:      1e6
   mine=:   n#0
   cars=:   ?n#3
   montys=: {."1 (?~n#3) -."1 cars,.mine
   *./ (0 = cars) +. cars = (?~n#3) -."1 montys,.mine

-- 
Raul


2006/9/2, Roger Hui <[EMAIL PROTECTED]>:
> The object of the game is to win a car.
>
> Two goats and a car are hidden behind 3 doors, one
> item per door.  You choose a door.  The gamemaster
> (Monty Hall), who knows what's behind the doors,
> opens one of the other doors, revealing a goat, and
> offers you the opportunity to change your choice of
> doors.  Your chosen door is then opened and you get
> what is behind.
>
> Should you stick or switch?


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to