Skip to content

Simulates trials of a probability puzzle from Twitter

Notifications You must be signed in to change notification settings

dblinkhorn/101_urns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

The Problem

You have 101 urns labeled 0 through 100. In urn n, there are n green balls and 100 - n red balls. A games show host covers up the labels and mixes up the order of the urns. Your goal is to pick 2 balls of the same color. Should you:

  • (a) Pick both from one urn
  • (b) Pick from different urns
  • (c) Doesn't matter

credit: post by Daniel Litt (@littmath)

This script performs 100,000 trials each of options (a) and (b) and prints the probability that each option will result in drawing matching balls.

About

Simulates trials of a probability puzzle from Twitter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages