Posts Tagged ‘fun’
I think I saw this on twitter the other day. Made me laugh.
I don’t know who did the original work but kudos to them.
I did not write this. It was in an email my wife sent me. No idea who wrote the original but it s a good read so to that person… thanks!
When I was a kid, adults used to bore me to tears with their tedious diatribes about how hard things were when they were growing up; what with walking twenty-five miles to school every morning…
Uphill… barefoot… (more…)
Those are not blue and green spirals in the picture. They are actually exactly the same colour.
The trick is apparently that the orange and pink spirals appear to be continuous but in fact they are just little arc’s in effect tricking your eyes into seeing the aqua-green spirals as blue in one case and green in the other.
Your eyes are deceiving you.
Download the image from here and check.
[HT to Phillip Gibb who sent me a link to this]
After yesterday’s discussion with my family at Sunday tea, I decided to write a computer simulation of the Monty Hall problem.
This is not a fancy thing with graphics etc. but a basic JAVA program that randomly (according to JAVA’s Random class) assigned a car, picked the contestant’s door, opened the appropriate door and summed, over 1,000,000,000 iterations, the win/loose chances of staying or switching. The following are the % of times that strategy won:
swap = 66.66721%
stay = 33.33278%
I realised after finishing the code that the code did not use the open variable (which represents the door the host opened), in other words it could calculate the stats without actually knowing which door the host opened after the players initial choice.
The meat of the code therefore reduced to:
int behind = random.nextInt(3); // this is where the car is
int choice = random.nextInt(3); // this is the contestant’s choice
if (choice == behind) stay++; // staying results in win
else swap++; //swapping results in a win
Looking at that code is, to me, probably the clearest explanation of the result.