Monty Hall problem: Difference between revisions

m
→‎{{header|JavaScript}}: minor correction
m (→‎Extensive Solution: better position for the note)
m (→‎{{header|JavaScript}}: minor correction)
Line 2,332:
</syntaxhighlight>
 
In the above code/problem version with n doors, only one "losing" door is opened/shown by the contestantshow host before the possibility of switch. There is a generalization to the problem in which the contestantshow host progressively opens losing doors one by one until two remains. In this case, the win probability of switching increases as the number of door increases. This has been discussed in a [https://www.researchgate.net/publication/262373808_A_generalization_of_the_Monty_Hall_Problem] 2009 article.
 
Slight modification of the script above for modularity inside of HTML.