5/13/06

If someone asked you to guess the color of cards from a standard deck of playing cards, you'd have a 50% chance of being correct for each attempt, and one would expect to get a total of 26 correct on average.

However, if you are allowed to see the outcome of the cards you attempted to guess, you can use that information to increase your success. Start out by guessing a color randomly. Then, if more Blacks came up, guess Red, and vice versa. If an equal number of Black and Red came up then guess the next color randomly. Using this method one can always get 26 or more.

Here is a program for my calculator that I wrote to simulate this.

cards(trials)

Prgm

ClrIO

{}->c

For n,1,trials

Disp n

#generate deck

Lbl start

{}->deck

For a,1,52

#Black = 1, Red = 0

rand(2)-1->deck[a]

EndFor

#to ensure equal Black and Red

If sum(deck) <> 26: Goto start

{}->guess

#initial guess

rand(2)-1->guess[1]

0->rights

For a,1,51

If sigma(deck[a],a,1,a)/a)>.5:0->guess[a+1]

If sigma(deck[a],a,1,a)/a)<.5:1->guess[a+1]

If sigma(deck[a],a,1,a)/a)=.5:rand(2)-1->guess[a+1]

EndFor

For a,1,52

If deck[a]=guess[a]:1+rights->rights

rights->c[n]

EndFor

EndFor

EndPrgm

Examine the vector c to see the number of cards guessed correctly for each trial. Simulations have shown the average is slightly over 30.

If you enjoyed *any* of my content, please consider supporting it in a variety of ways:

- Check out a random article at http://statisticool.com/random.htm
- Buy what you need on Amazon from my affiliate link
- Share my Shutterstock photo gallery
- Sign up to be a Shutterstock contributor