Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Monty Hall problem based on Harvard Fat chance #35

Open
EmbraceLife opened this issue Aug 10, 2018 · 0 comments
Open

The Monty Hall problem based on Harvard Fat chance #35

EmbraceLife opened this issue Aug 10, 2018 · 0 comments
Labels
Basic basic statistics and probability Fat Chance Fat chance: probability from ground up

Comments

@EmbraceLife
Copy link
Owner

The Monty Hall problem

key question

How to understand Monty Hall problem intuitively and with conditional probability and total probability of sum?

video links

original courses p51-53

my note videos p50-52

Problem

3 doors, 1 car, 2 goats; you pick one, host open a door with a goat; should you switch to the remaining door?

Intuitive analysis

total = 3 doors or options

if not switch, winning outcome = pick1(car) = only 1 car to pick from = 1

  • prob(win without switch) = 1/3

if switch, winning outcome = pick1(goat first, switch to car) = 2 goat to pick from = 2

  • prob(win with switch) = 2/3

Formula analysis

total = n doors or options, and 1 cars inside

if not switch,

  • winning outcome = pick1(car) from only 1 car exists
  • losing outcome = pick1(goat) from n-1 goats
  • openning a door with a goat affect nothing
  • prob(win without switch) = pick1(car) = 1/n
  • prob(lose without switch) = pick1(goat) = n-1/n

if switch and win,

  • how many doors left = n - 1 - 1
  • then the original pick must a goat
    • prob(second pick car | original pick goat and open a goat door and switch) = 1/(n-1-1)
  • prob(second pick car after switch and original pick goat) = prob(original goat) x prob(second pick car | original goat, open a goat door, switch) = $\frac{n-1}{n} \times \frac{1}{n-2} = \frac{n-1}{n-2} \times \frac{1}{n}$ ⚛️ = A
  • A > 1/n so switch is always better

Extended Analysis

total = n doors, k doors have cars

prob(car) = k/n, prob(goat) = (n-k)/n

if original pick = car, and then switch after open a door with a goat

  • prob(second pick car | original pick car and switch) = (k-1)/(n-2)
  • prob(second pick car | original pick goat and switch) = k/(n-2)
  • prob(second pick car and original pick car) = prob(original pick car) x prob(second pick car | original pick car, open goat door, switch) = k/n x (k-1)/(n-2) = A ⚛️
  • prob(second pick car and original pick goat) = prob(original pick goat) x prob(seocnd pick car | original pick goat, open goat door, switch) = (n-k)/n x k/(n-2) = B
  • A + B = prob(pick car) = prob(second pick car with or without original pick car) = $\frac{k(k-1)+k(n-k)}{n(n-2)} = \frac{k(n-1)}{n(n-2)} = \frac{k}{n} \frac{n-1}{n-2} \gt \frac{k}{n}$

Practice

problem

n doors, k doors have cars, monty opens a goat door, do you switch? (always switch)

  • prob(original pick car) = k/n = A
  • prob(original pick goat) = (n-k) / n = B
  • prob(second pick goat | original pick car, open goat door, switch) = (how many goat left = (n-k)-1 ) / (how many doors left = n - 1 - 1) = (n-k-1) / (n-2) = C|A
  • prob(second pick goat | original pick goat, open goat door, switch) = (how many goat left = n-k-1-1) / (how many doors left = n - 1 - 1) = (n-k-2) / (n-2) = C|B
  • prob(second pick goat & first pick car) = A x C|A
  • prob(seocnd pick goat & first pick goat) = B x C|B
  • prob(second pick goat) = prob(lose) = (A and C) + (B and C) = C = prob(lose when always switch)
@EmbraceLife EmbraceLife added Basic basic statistics and probability Fat Chance Fat chance: probability from ground up labels Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Basic basic statistics and probability Fat Chance Fat chance: probability from ground up
Projects
None yet
Development

No branches or pull requests

1 participant