7 ms·
Programming does definetly helps me when i do not understand an idea. For exmaple: I did not understood why in the Monty Hall problem [1] do i have 2/3 chance
by mcprwklzpq 6y ago
Programming does definetly helps me when i do not understand an idea. For exmaple:
I did not understood why in the Monty Hall problem [1] do i have 2/3 chance of winning if i do change the door instead of 1/2 that my intuition tells me until i wrote it as two functions.
function change() {return random(3) != random(3);} // 2/3 chance
function not_change() {return random(3) == random(3);} // 1/3 chance
Then i also saw that i do get that 1/2 chance of winning if i choose between changing the door and not at random.
function random_change() {if (random(2) == 1) {return change();} else {return not_change();}}
// (1/3)/2 + (2/3)/2 = 1/2 chance
This was so much more convincing than math and theory and even explanations with cards and drawings because i could run it in a loop a 1000 times and see the results be close to the prediction.
1 - https://en.wikipedia.org/wiki/Monty_Hall_problem https://en.wikipedia.org/wiki/Monty_Hall_problem
- gspr 6y agoReally? I also value the evidence that numerical simulations provide, and if I didn't know of the problem at hand, the simulation would indeed convince me of the correct answer. But has one really understood something just because one has become comfortable with its behavior?
- theelous3 6y agoI would say it was more so the process of implementing that same logic forces you to understand it, and then seeing that logic pan out is a confirmation of what was learned in implementation. Much like you can understand the math of a lever and see levers working, but precalculating that x can lift y with a z long lever, and then building it, reinforces the logic you used in precalculation and binds the abstract to the real.
- mcprwklzpq 6y agoI was able to predict how simulation would go when i saw the program that i wrote. When i saw the simulation confirm my prediction it was so much more convincing then any other method. If the logic was to complex for me to understand then i would only see the behavior and not much more.
- andrepd 6y agoMaths is not experimental. This roundabout, handwavy, vague way to deal with things causes more harm than good, in my opinion. Try to understand a proper mathematical proof instead.
- chewz 6y agoI disagree. Math is very experimental - it is bottom up science where you first touch various details in the dark and generalization comes later. I am with Arnold on that. > Arnold was an outspoken critic of the trend towards high levels of abstraction in mathematics during the middle of the last century. He had very strong opinions on how this approach—which was most popularly implemented by the Bourbaki school in France—initially had a negative impact on French mathematical education, and then later on that of other countries as well. https://en.m.wikipedia.org/wiki/Vladimir_Arnold https://en.m.wikipedia.org/wiki/Vladimir_Arnold
- kubanczyk 6y agoMath is experimental at its roots. If the result here wasn't usable in real life, scarcely anyone would develop that specific branch of probability theory. Instead they would think of adjusting the axioms and work out a useful probability theory. For example, most children check 1+2 experimentally before accepting the theory.
- jonsen 6y agoWhat’s the theory to accept for 1+2?
- theelous3 6y agoI think he means loosely that the theory here, is that they add up to three. Kids will grab objects and group and ungroup them while counting and so on, before outright accepting math is real.
- stan_rogers 6y agoThat can be trivially inferred from 110-643 (Vol. 2, p. 86) in Whitehead & Russell's Principia Mathematica.
- chills 6y agoI think if I was not aware of the Monty Hall problem and I ran that simulation, I'd assume there was a bug in my code.
- AmericanChopper 6y agoThe trick to understanding the Monty Hall problem isn’t to run it 1000 times, it’s to imagine it with 1000 doors. Thinking about the problem with an arbitrarily large number of doors make the solution intuitively obvious. No code required.
- theelous3 6y agoYes! This was how I first figured out how to understand it, and how I explain it to anyone if it comes up. It's immediately obvious with a large number of doors.
- jonsen 6y agoI pick 333 doors, and Monty opens 333 doors?
- kemotep 6y agoNo the variation with 1000 doors is that you open 1 door, Monty opens 998 doors and asks if you want to switch.
- AmericanChopper 6y agoYeah, the use of 3 doors, and the bit where one is opened just kinda hides what’s happening. Which is that you’re actually choosing between one random door, or ALL the other doors.
- scubbo 6y agoThe Eureka moment for me was similar, but slightly different. Consider a variant game with N doors. You pick a door, then Monty offers you two switch your payout to "the best single result from the remaining N-1 doors". Clearly, you would swap. Now set N to 3, and consider that, by opening a door without the prize, that's exactly what Monty's offering you.
- sacado2 6y agoI had the same experience with that very problem. Didn't understand it before I programed it.
- pgt 6y agoThe Monty Hall problem is typically not clearly explained with the confounding precondition that the game show host won’t open a door that reveals the prize. Once I understood that there was a bias against one of the doors, the problem became obvious.
- mjburgess 6y agoI agree. I think a lot of these probability puzzles end up being "illusions of emphasis", ie., that we fail to grasp the problem because how components of it are expressed in language. When the host opens the door and why need to be repeated several times and with lots of emphasis before asking the question. These ordinarily minor details are extraordinarily relevant, and the language used should express that.
- Rerarom 6y agoYes, because if the problem was expressed purely formally from the start, there could not possibly be any controversy. The appeal of Monty Hall is precisely this interplay of natural and formal language.
- daveFNbuck 6y agoPeople aren't generally very good at probability. Plenty of people get it wrong despite understanding the puzzle correctly.
- mannykannot 6y agoThis is a fairly common reacton to the puzzle these days. In the time and place of the problem's first widely-distributed posing (Parade Magazine, 1990) it might reasonably be assumed that many people seeing it there were somewhat familiar with the game show it is loosely based on. Even without that background, one might reasonably deduce that the second door opening never reveals the prize, as there would be no point, in that case, in asking whether the contestant wants to change her pick. That is a somewhat meta argument, in that it involves understanding human intent and what makes for a good puzzle, and it means that it is not just a math/logic/probability challenge, but it is nevertheless a good puzzle. There's no law that says a puzzle must explicitly state every fact of the matter.