Posts tagged ‘probability’

Constant Change

Coin PileI’m frustrated.

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?

Coin WrappersThe 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:

Change - Theoretical

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:

Change - Experimental

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 25n + 1 to 25n + 25, where n is the number of quarters to be returned, you’ll receive a nickel when the amount of change is 25n + k, where 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%.

August 30, 2016 at 5:10 am 3 comments

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.

Colts HelmetIf 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 29 = 512.)

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

NFL Week 17 - Game Probabilitiess

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…”

December 31, 2015 at 5:05 pm 1 comment

Dreidel is Not Fair

Dreidel

play an online version of dreidel at the Jewish Outreach Institute (but turn the sound off)

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
Number
of
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.

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

Happy Chanukah!

December 4, 2015 at 6:47 am Leave a comment

Wait, Wait… I’ve Got a Math Question

Wait Wait“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 supermodels;
  • Rob Lowe was asked questions about bratwurst, 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).

Will OldhamMy 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:

Technology - Doris Day

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:

Combinatorial Pillow Talk

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

November 11, 2015 at 9:36 pm Leave a comment

Sock Probability

SocksI 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:

Right Sock

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.

May 15, 2015 at 1:31 pm 2 comments

What If?

My favorite question is, “Why?” (And my favorite answer is, “Because.”) But not far behind is the question, “What if?”

What if a baseball player swings a bat with the proper speed, but starts swinging 0.01 seconds too late? What if I could earn 6.3% on a real estate investment instead of 1.4% in a Roth IRA, but had to pay capital gains taxes? What if I tried to walk through a revolving door with a pair of skis on my shoulder?

“What if…?” questions don’t always have to be mathy, ya know.

The beauty of Excel is that you can repeatedly ask “What if…?” questions and then explore to your heart’s content.

Overheard in math class:

“It’s not that I don’t want to do all those math problems,” Julia said to her teacher. “I’m just saying, if we put them into a spreadsheet and let Excel do its thing, we can have an extra 20 minutes for recess.”

Sure, one of the powers of Excel is reducing the tedium associated with calculations, but a much greater power is its ability to allow for deep exploration of math topics in a short period of time.

Art Bardige and Peter Mili agree. That’s why they’re giving away spreadsheets that allow students to explore mathematics.

Their What If Labs allow students to investigate questions like:

  • What if you used Excel to design a house?
  • Is the world population growing at a faster or slower rate than 50 years ago?
  • Instead of wood, nails, and string, what if you used a graph and coordinates to create string art?

The spreadsheets are useful, fun, educational and — dare I say — beautiful. Not to mention, free.

Art believes that teaching math with Excel has two benefits. First, it fosters business skills by having students learn the basics of the most ubiquitous business application on the planet. Second, it empowers students by giving them complete control to explore on their own.

I concur with Art’s philosophy.

Excel is one of my best friends. I use it to test conjectures, especially for probability problems about which I don’t have any intuition — or, more often, when my intuition is wrong!

One of my favorite problems, which was discussed in the post Fair and Square in 2011, is the following:

Three points are randomly chosen along the perimeter of a square. What is the probability that the center of the square will be contained within the triangle formed by these three points?

Unsure how to attack this problem, the answer was estimated using an Excel simulation. From the insights gained by that simulation, a solution eventually revealed itself.

Would I have solved that problem without Excel? Maybe. Probably. But without Excel, it would have taken longer, and I might not have had the same deep understanding of the underlying structure.

Kudos to Art and Peter for providing a free resource that will let other students benefit from that same type of insight.

March 30, 2015 at 7:33 am 2 comments

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:

Shoelaces

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?

March 7, 2015 at 10:30 am Leave a comment

Older Posts


About MJ4MF

The Math Jokes 4 Mathy Folks blog is an online extension to the book Math Jokes 4 Mathy Folks. The blog contains jokes submitted by readers, new jokes discovered by the author, details about speaking appearances and workshops, and other random bits of information that might be interesting to the strange folks who like math jokes.

MJ4MF (offline version)

Math Jokes 4 Mathy Folks is available from Amazon, Borders, Barnes & Noble, NCTM, Robert D. Reed Publishers, and other purveyors of exceptional literature.

Past Posts

December 2016
M T W T F S S
« Nov    
 1234
567891011
12131415161718
19202122232425
262728293031  

Enter your email address to subscribe to the MJ4MF blog and receive new posts via email.

Join 246 other followers

Visitor Locations

free counters