## Posts tagged ‘probability’

### Constant Change

I’m also old, cranky, and cynical. Whatever.

My frustration is not the my-flight-was-delayed-three-times-then-eventually-cancelled-and-there-are-no-more-flights-to-Cleveland-till-tomorrow-morning type. It’s not even the can’t-believe-my-boss-is-making-me-go-to-Cleveland kind of frustration. More like the why-aren’t-there-the-same-number-of-hot-dogs-and-buns-in-a-pack variety. So it’s a First World problem, to be sure, but still annoying. I’ll explain more in a moment.

But first, how ’bout a math problem to get us started?

If you make a purchase and pay with cash, what’s the probability that you’ll receive a nickel as part of your change?

Sure, if you want to get all crazy about this, then we can take all the fun out of this problem by stating the following assumptions:

- You only pay with paper currency. If you paid with coins, then the distribution of coins you’d receive as change would likely vary quite a bit.
- You never use 50¢ coins. Honestly, they’re just too obscure.
- Transaction amounts are uniformly distributed, so that you’re just as likely to receive 21¢ as 78¢ or any other amount.
- Cashiers don’t round because they dislike pennies. So, if you’re supposed to get 99¢ change, the cashier doesn’t hand you a dollar and say, “Don’t worry about it.” Instead, you actually get 99¢ change.

But stating assumptions is a form of mathematical douchebaggery, isn’t it? (As an aside, check out the definition of douchey that’s returned when you do a search. Sexist, anyone?) I prefer problems with no assumptions stated; let folks make their own assumptions to devise a model. If you and I get different answers because of different assumptions, no worries. Maybe we both learn something in the process.

Anyway, where was I? Oh, yeah…

Understanding the solution to that problem is a precursor to the issue that’s causing me frustration. I’ll give the solution in a minute, so pause here if you want to solve it on your own, but let me now allow the proverbial cat out of its bag and tell you why I’m frustrated.

At our local grocery store, there’s a **coin counting machine** that will count your change, sort it, and spit out a receipt that you can take to the customer service desk to exchange for paper currency. Walk in with a jar full of change, walk out with a fistful of fifties. Pretty nifty, right? Except the machine charges a ridiculous 8.9% fee to perform this service. No, thank you.

My bank used to have a similar coin counting machine, and if you deposited the amount counted by the machine into your account, there was no fee. The problem is that everyone was doing this to avoid the grocery store fee, so the machine broke often. The bank finally decided the machine wasn’t worth the maintenance fees and got rid of it. Strike two.

Which brings me to my current dilemma. One Saturday morning every month, we now spend 30 minutes counting coins and allocating them to appropriate wrappers. Which is fine. The problem, however, is that we run out of quarter and penny wrappers way faster than we run out of nickel or dime wrappers. Which brings me to the real question for the day:

Since pennies, nickels, dimes, and quarters are not uniformly distributed as change,

why the hell does every package of coin wrappers contain the same number for each coin type?

The Royal Sovereign Assorted Coin Preformed Wrappers is the best-selling collection of coin wrappers on Amazon, and it provides 54 wrappers for each coin type. They also offer a 360‑pack with 90 wrappers for each coin type; Minitube offers a 100‑pack with 25 wrappers for each coin type; and Coin-Tainer offers a 36‑pack with 9 wrappers for each coin type. But what **no one** offers, so far as I can tell, is **a collection of coin wrappers with a distribution that more closely resembles the distribution of coins that are received as change**.

Whew! It feels good to finally raise this issue for public consideration.

So, the question that I really wanted to ask you…

Given the distribution of quarters, dimes, nickels, and pennies that are received in change, and given the number of coins needed to fill a coin wrapper — 40 quarters, 50 dimes, 40 nickels, and 50 pennies — how many of each wrapper should be sold in a bundled collection?

To answer this question, I determined the number of coins of each type required for every amount of change from 1¢ to 99¢. The totals yield the following graph:

The number of pennies is nearly five times the number of nickels. And there are nearly twice as many quarters as dimes.

But I realize that’s a **theoretical** result that may not match what happens in practice, since this assumes that the amounts of change from 1¢ to 99¢ are uniformly distributed (they aren’t) and that cashiers don’t round down to avoid dealing with pennies (they do). In fact, when I made a purchase of $2.59 yesterday, instead of getting one penny, one nickel, one dime, and one quarter as change, the cashier gave me one penny, **three** nickels, and one quarter, in what was clearly a blatant attempt to skew my data.

So for an **experimental** result, I counted the pennies, nickels, dimes, and quarters in our home change jar. The results were similar:

The ratio of pennies to nickels is closer to three, but the ratio of quarters to dimes is still roughly two.

Using a hybrid of the theoretical and experimental results, and accounting for the fact that only 40 quarters and nickels are needed to fill a wrapper whereas 50 pennies and dimes are needed, it seems that an appropriate ratio of coin wrappers would be:

**quarters : dimes : nickels : pennies :: 17 : 8 : 6 : 19**

Okay, admittedly, that’s a weird ratio. Maybe something like **3:2:1:4**, to keep it simple. Or even 2:1:1:2. All I know is that 1:1:1:1 is completely insane, and this nonsense has got to stop.

Hello, Royal Sovereign, Minitube, and Coin-Tainer? Are you listening? I’ve completed this analysis for you, free of charge. Now **do the right thing**, and adjust the ratio of coin wrappers in a package accordingly. Thank you.

Wow, that was a long rant. Sorry. If you’ve made it this far, you deserve some comic relief.

How many mathematicians does it take to change a light bulb?

Just one. She gives it to a physicist, thus reducing it to a previously solved problem.If you do not change direction, you may end up where you are heading. – Lao Tzu

The only thing that is constant is change. – Heraclitus

Turn and face the strange ch-ch-ch-changes. – David Bowie

A Buddhist monk walks into a Zen pizza parlor and says, “Make me one with everything.” The owner obliged, and when the pizza was delivered, the monk paid with a $20 bill. The owner put the money in his pocket and began to walk away. “Hey, where’s my change?” asked the monk. “Sorry,” said the owner, “change must come from within.”

As for the “probability of a nickel” problem that started this post, here’s my solution.

For change amounts from 1¢ to 25¢, there are ten values (5‑9 and 15‑19) for which you’ll receive a nickel as part of your change.

This pattern then repeats, such that for change amounts from **25 n + 1** to

**25**, where

*n*+ 25*n*is the number of quarters to be returned, you’ll receive a nickel when the amount of change is

**25**, where

*n*+*k**k*∈ {5, 6, 7, 8, 9, 15, 16, 17, 18, 19}. For 0 ≤

*n*< 4, there are 40 different amounts of change that will contain a nickel, so the probability of getting a nickel as part of your change is 40/100, or 40%.

### Probability, the Playoffs, and the Indianapolis Colts

With one week left in the NFL season, Dan Graziano had this to say about the Indianpolis Colts’ chances of making the playoffs:

Indianapolis can still win a third straight AFC South title. Really, it can. All it needs is to win and then have

the Texans, Bengals, Chargers, Jets, Saints, Chiefs, Patriots and Browns all lose. The league will throw in the partridge in a pear tree.

If the Colts win and the Houston Texans lose, both would be 8-8, and the first four tiebreakers for deciding which team makes the playoffs – record against one another, record against divisional opponents, record against common opponents, and record within the conference – would not be enough to decide who makes the cut.

It then comes down to strength of victory and strength of schedule. And for things to play out in the Colts’ favor, a lot of things have to go their way.

Fox Sports referred to this as long shot, comparing it to a recent win by a horse who was 200-to-1:

Sure, going 9 for 9 here looks dim, but long shots come in every once in a while.

Are the Colts’ odds as good as that horse’s? Seems not.

Using a simplistic model, assume that each of the nine necessary outcomes are equally likely. That alone would put the Colts’ odds at 511-to-1. (Since 2^{9} = 512.)

But it’s not that simple. The following chart from 538.com gives the probability of each team winning their game this weekend:

The good news is that the Colts have an 81% chance of winning their game against Tennessee. The bad news is that it seems unlikely that any of the Texans, Bengals, Chiefs, or Patriots will lose, let alone all four of them. So putting all those numbers together, the Colts’ chances of making the playoffs are:

0.81 × 0.20 × 0.22 × 0.84 × 0.54 × 0.69 × 0.15 × 0.18 × 0.77 = 0.0002 = 0.02%

or, more precisely, about **4,311-to-1**. That’s more than a long shot; that’s an extended-to-an-unfathomable-distance shot.

The Colts are in the unenviable position of Lloyd Christmas in *Dumb and Dumber*, “So, you’re telling me there’s a chance…”

### Dreidel is Not Fair

Is dreidel fair?

The rules of dreidel are straightforward. At the beginning of each round, players put one coin into the pot. (For young kids, the “coins” are actually chocolate pieces in the shape of a coin and wrapped in gold foil. This is known as *geld*, and as far as I’m concerned, chocolate is a currency to kids.) Players then take turns spinning the dreidel, and a reward is earned based on which of the four Hebrew letters appears on top when the dreidel stops spinning:

**Nun:**nothing.**Hey:**half the pot.**Gimel:**all of the pot.**Shin:**put one in.

Play continues clockwise, with each person spinning the dreidel until Gimel occurs and all coins are removed from the pot. At that point, everyone antes another coin, and a new round starts with the next player.

Officially, a player is out of the game when she or he has no coins left to contribute to the pot, and the game ends when one person has all the coins. But practically speaking, the game often ends much earlier, because players get bored and quit or, in the case of very young kids, the game lasts beyond bedtime and the children are pulled away by their parents.

No matter how the game ends, though, **it’s not fair**.

The following table is courtesy of Paul J. Nahin (*Will You Be Alive 10 Years from Now?*, Princeton University Press, 2014, p. 81). It shows the amount, over the long run, that each player will win during a dreidel game.

Player |
||||||

1 |
2 |
3 |
4 |
5 |
||

Numberof Players |
2 |
1.143 | 0.857 | |||

3 |
1.361 | 0.956 | 0.680 | |||

4 |
1.617 | 1.102 | 0.757 | 0.524 | ||

5 |
1.900 | 1.267 | 0.855 | 0.580 | 0.398 |

In other words, the first player has a significant advantage over the others. In a game of five players who start with 10 coins each, the **first player will finish the game with 19 coins**, on average, whereas the **fifth player will finish with just 4 coins**. That’s if the game ends early. If played until one person gets all the coins, then the first player is **five times** more likely to win than the fifth player.

This disparity in odds is likely the reason that an unofficial rule of dreidel is that the youngest player goes first, the second-youngest player goes second, and so on.

The word *dreidel* is Yiddish and means “to turn around.” Because the dreidel is, after all, a top.

This fact is not lost on comedian Lewis Black, who has some thoughts on the matter.

Happy Chanukah!

### Wait, Wait… I’ve Got a Math Question

“Not My Job” is a segment on the NPR game show ** Wait, Wait… Don’t Tell Me!** During the segment, host Peter Sagal asks a celebrity three questions, on a topic about which they likely have no clue. For instance,

- Cindy Crawford was asked questions about
*scale*models, not*super*models; - Rob Lowe was asked questions about brat
*wurst*, not the Brat*Pack*; - Stephen King was asked questions about the Teletubbies; and,
- Leonard Nimoy was asked questions about the
*other*Dr. Spock (you know, the celebrity pediatrician).

My favorite of these segments, however, was with singer-songwriter Will Oldham, better known by his stage name Bonnie “Prince” Billy. Sagal explained, “You sing mostly sad or mournful songs, interspersed with the occasional tragic one. And we were thinking, who’s the singer least like you? […] So, we’re going to ask you three questions about Ms. Doris Day, the sweet-faced, sweet-voiced singer most famous in the 50s and 60s.”

Oldham answered two of the three questions correctly, so he won.

As Sagal congratulated him, Oldham pretended that Doris Day was in the room with him. “Hey, Doris, you were right!” he said. “All the questions *were* about you!”

Now, that’s funny!

(As an aside, let me share with you a slide that I sometimes show during presentations about classroom technology:

Yep, that’s Doris Day in the 1958 movie *Teacher’s Pet*. Hopefully that image looks a little odd to you in 2015. Honestly, if you’re teaching math to adolescents and still using chalk and a wooden pointer, I’ll kindly ask you to consider a different career. There are other options for you. For instance, you could become a dentist and specialize in square root canals. But, I digress.)

So, back to the point.

The celebrity quiz contains three multiple-choice questions, each with three choices. If the guest answers at least two questions correctly, he or she wins. Which got me to thinking…

What is the probability that a celebrity guest will get at least two questions correct if she guesses randomly?

Brute force is definitely an option here. Write down all possible answer choice combinations, randomly decide which configuration will be correct, and then figure out how many of the possible combinations would yield a winner. Not pretty, but it works.

Speaking of combinations, here’s a joke that just has to be shared:

Courtney Gibbons’s comics used to appear at Brown Sharpie, but then she got a job.

### Sock Probability

I don’t know if problems like the following are famous, but there sure are a lot of them online — Cut the Knot, Stack Exchange, and Braingle, for example — and they’re typical for a high school classroom or middle school math competition:

There are 14 red, 6 orange, 10 yellow, 8 green, 4 blue, 12 indigo, and 2 violet socks in my sock drawer. How many socks must I randomly remove from the drawer to guarantee that I have two socks of the same color?

You may or may not know the answer, but the problem itself leads to a follow-up question:

Why the hell do I own socks in every color of the rainbow?

That’s just weird. But if you can get past that, here is a related problem:

If I randomly remove two socks from the drawer, what is the probability that they form a matching pair?

As it turns out, I’m something of a sock aficionado. (Yeah, it’s weird, but surely not surprising. I mean, I write a math jokes blog. You didn’t think I was normal, did you?) Although the context above is fictitious, I am indeed the owner of three pairs of identical socks that look like those shown in the picture. And yes, those are *my* feet and ankles. My mathematical sexy runs all the way down to my toes.

Here’s a close-up of one of them, in case you can’t see it in the larger picture:

That’s a letter **R**, because these socks are specially designed for each foot. The other sock has a letter **L**. (Duh.)

This leads to another mathematical question, more real-world than those above:

I just finished washing these three pairs of socks. While folding them, I selected two socks at random and rolled them together. What’s the probability that there’s one R and one L?

The answer, of course, is **zero**.

Yes, I know that *theoretically* the answer should be **3/5**. But theory doesn’t match practice in this case. When I do my laundry, I sometimes forget to pay attention to the R and the L, and my sock drawer invariably results in one pair of two R’s, one pair of two L’s, and one correctly matched pair. And then when I wake up at 5:30 a.m. and put on my socks in the dark (so as not to rouse my wife from slumber), my feet feel all weird. The one with the wrong sock starts tingling, so I have to remove the socks and choose another pair entirely.

Similarly, here’s another real-world problem, based on my sock experience:

If there are 10 socks in a load of laundry that I place in the washer and then transfer to the dryer, how many socks will remain when the load is finished drying?

**Nine.** Yes, I *know* it’s a cliche. Everyone makes jokes about losing socks. It’s so overdone that the National Comedian’s Guild has declared a moratorium against them. But, *I’m not joking*. I can’t remember the last time I did a load of laundry and wasn’t missing a sock. I now have a drawer filled with unmatched socks, each like Tiger Woods longing for the return of its Lindsey Vonn.

Sadly, this post is going public just a little too late. **Lost Socks Memorial Day** was **May 9**, so we just missed that one. Likewise, we missed **No Socks Day** on **May 8**. But there are other holidays in the coming months when you can celebrate the amazing undergarments that protect our feet from our shoes:

- July (exact date TBD):
**Red Socks Day**(commemorating Sir Peter Blake) - October 4:
**Odd Socks Day**(Australia) - January (every Friday):
**Snow Sock Day**

And though not an official holiday, there are unlimited **Crazy Sock Days** happening at elementary, middle, and high schools near you.

99% of socks are single, and you don’t see them crying about it.

How do engineers make a bold fashion statement?

They wear their dark grey socks instead of the light grey ones.Somewhere, all of my socks, Tupperware lids, and ball point pens are hanging out together, just laughing at me.

—

Because I know you won’t be able to sleep tonight…

- I need to remove
**8 socks**from my sock drawer to guarantee a color match. - I don’t actually own socks in
**every color**of the rainbow. Just most colors. - The probability of selecting two socks from my drawer and getting a matching pair is
**23/140**.

### Shoestring Probability

March 15 is Shoe the World Day. And April 5 is One Day Without Shoes Day.

Shoes and math have a lot in common.

A shoe salesman consults a mathematician on what size shoes to keep in stock. The mathematician tells him, “There is a simple equation for that,” and shows him the Gaussian normal distribution.

The shoe salesman stares at the equation for a while, then asks, “What’s that symbol?”

“That’s the Greek letter π.”

“What is π?”

“The ratio between the circumference and the diameter of a circle.”

The shoe salesperson thinks for a minute. “What the hell does a circle have to do with shoes?”

As it turns out, there are at least 43 different ways to arrange the laces on your shoes. My favorite is the hexagram method:

But there are some fun things to do with your shoelaces other than lacing up your kicks. Here’s one.

Take the shoelaces out of your shoes. Fold the shoelaces in half and hold them in one hand so that the four aglets are exposed but the rest of the shoelaces are hidden in your palm. Like this:

Have a friend select two of the aglets and tie those ends together (I recommend a square knot). Then, have your friend tie the other two ends together. Finally, offer your friend the following wager:

You give me $1 if you formed one large loop.

I’ll give you $1 if you didn’t.

Is it a fair bet?

Too easy? Then try this. Take your shoelaces *and* your friend’s shoelaces, fold them in half, and then expose the eight aglets. Choose two at a time and tie them together. The wager remains the same.

Now is it fair?

Is it possible to create a fair wager with any number of shoelaces? If so, how many?