Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Monty Hall Paradox

By Sean Smith,

"The Monty Hall Paradox is a veridical paradox in that the result appears absurd but is demonstrably true."


I wrote this piece of code to demonstrate that the laws of probability change drastically by simply setting the "@vSwitch_Door_Picked" variable from 1 to 0 or 0 to 1.


More detailed information on this paradox can be found on Wikipedia:


The code is just for fun and makes for an interesting conversation piece at best. Give it a try and enjoy!

Total article views: 1171 | Views in the last 30 days: 4
Related Articles

Connecting Paradox 4.0 (DOS) to MSSQL 2008.. $contract$ available

Connecting Paradox 4.0 (DOS) to MSSQL 2008


Review: The Abilene Paradox

The Abilene Paradox by Jerry Harvey is not a new book, written in 1988. It’s part of some reading I’...


Need help importing Paradox data

Trying to import Paradox tables with memo fields to SQL Server 2008



Hi Folks Is it possible to access a Paradox table through Query Analyzer, can OpenRowSource be used...


Paradox Help !!!

Hi Guys, I've got a collection of paradox tables that I need to connect to SQL server 2000.  I've b...


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones