Saturday, January 19, 2013

Are you a good doctor? (Math Puzzle - A look at probability)





Here’s an interesting math puzzle involving probability…

1 out of every 10,000 citizens of a country has a deadly virus.  A blood test can be used to determine whether or not somebody has the virus.  The test is accurate 98% of the time.  There are 1 million people in the country, and each person is tested.  A man who tested positive for the virus talks to his doctor, who informs the man that there is a 98% chance that he does, in fact, have the virus.  The doctor is not correct in making this statement… what is the actual probability that the man has the deadly virus?

To see the answer, scroll down to the bottom.  If you would like help in understanding the logic behind the solution, keep reading.

First of all, we have to understand what probability is.



We know that 1 out of every 10,000 people actually have the virus.

Therefore, out of 1 million people, 100 people have the virus.  (1,000,000 ÷ 10,000 = 100)

The probability that a citizen of the country has the virus is 100 ÷ 1,000,000 = 0.0001 = 0.01%.

This probability is independent of the blood test.

Once the blood test is administered to every citizen in the country, the question becomes a bit more difficult.  We need to determine the probability that a person who tested positive for the virus does, in fact, have the virus.

So, how many people tested positive for the virus?

98% of people who have the virus tested positive.  98% of 100 is 98.

If 100 people have the virus, then 999,900 people do not have the virus. (1,000,000 – 100 = 999,900)

98% of people who don’t have the virus tested negative.  This means that 2% of people who don’t have the virus tested positive.  2% of 999,900 is 19,998.

The total number of people who tested positive is 98 + 19,998 = 20,096.

Now we can calculate the probability that the man who tested positive does, in fact, have the virus.

20,096 people tested positive for the virus.  Of these, 98 people actually have the virus.

Therefore, the probability that the man has the virus is 98 ÷ 20,096 = 0.0049 = 0.49%.

That’s less than half of one percent!

When considering this fact, it is tempting to think that the test is practically worthless – but this is not the case.

Before the test was administered, all we knew was that 0.01% (one 100th of a percent) of the population had the virus.  Now a group has been isolated in which about half of a percent has the virus.

If this group is re-tested, the probability that a person testing positive does, in fact, have the virus will be about 24%.

If the group that tests positive a 2nd time is re-tested, the probability that a person testing positive does, in fact, have the virus will be about 92%.

It’s amazing to see how quickly accuracy is gained through the process of re-testing.

And now you know a little bit of the mathematics that goes into being a good doctor.

------------------------------

For math tutorials and silly math songs, visit www.onlinemathpro.com




Affiliate Disclosure

Wednesday, January 9, 2013

How NOT to cut a pizza into 10 equally-sized pieces



How do you cut a pizza into 10 pieces that are the same size?  Skip to the bottom to find out.  However, if you want to know how NOT to cut a pizza into 10 equally-sized pieces – and maybe learn a little math in the process – keep reading.

In addition to teaching math, I also sponsor a high school class.  Recently, the class I sponsor held a fundraiser at which pizza was sold.

Normally, when pizzas are delivered for our fundraisers, each pizza is cut into 8 pieces that are roughly the same size.

However, the pizzas for this fundraiser had all been cut into 10 pieces.  I was somewhat annoyed – and somewhat amused – to see that the person who had cut the pizzas had done a very poor job of making equally-sized pieces.  Some pieces appeared to be oversized, while others were quite obviously undersized.

Naturally, everybody wanted to buy the oversized pieces, while nobody wanted to buy the undersized pieces.

I began to think about the skills that a person needs to have in order to be a good pizza cutter:

            1.  Good hand-eye coordination
            2.  Good motor skills
            3.  Good math skills

…Huh?  Good math skills?!

That’s right.  The difference between mediocrity and greatness in the field of pizza cutting boils down to math.

In order to be a mediocre pizza cutter, one only needs to be able to cut a pizza (or pieces of pizza) in half.  Most people can do this well enough.  Unfortunately, if this is the extent of one’s pizza cutting skills, then it will only be possible to cut pizzas into a number of equally-sized pieces that is a power of 2.

Powers of 2 are:  21 = 2,  22 = 4,  23 = 8,  24 = 16,  etc…

If you are considering how much of the pizza each piece makes up, it’s better to consider powers of  one-half.



Since 8 is a power of two, even a mediocre pizza cutter can cut a pizza into 8 pieces that are roughly the same size.

On the other hand, in order to cut a pizza into 10 equally-sized pieces one must know that


{If you hate fractions, consider the fact that the prime factorization of 10 is 2·5.}

Therefore, after the initial cut dividing the pizza into halves, the pizza cutter must divide each half into five equally-sized pieces.  If the person cutting the pizza makes the mistake of cutting each half into two equally-sized pieces, then there is no chance of ending up with 10 equally-sized pieces because five is not divisible by two.  (This is how NOT to cut a pizza into 10 equally-sized pieces.)


This appears to be where our pizza cutter made his/her fatal mistake.  (Mathematically fatal, that is.)

A good, mathematically sound pizza cutter would have made the first cut dividing the pizza into halves.  Then, he/she would have begun cutting the halves into fifths.


If you really want to delve into the mathematical implications of this series of cuts, consider how each successive cut takes off a bigger fraction of the big piece of pizza remaining:


One last thing to consider:  I believe that people who cut pizzas for the big pizza chains (Domino’s, Pizza Hut, etc.) use a cutting instrument that reaches all of the way across a pizza – a diameter, assuming that the cut passes through the center.  If this is the case, then it is impossible to cut a pizza into an odd number of pieces by making cuts through the center.

If you’re feeling devious, try ordering a pizza and requesting that it be cut into nine pieces.

On the other hand, maybe you shouldn’t… the person cutting the pizza might actually try to do it.


***Disclaimer:  I love pizza.  I think that pizza should be one of the main food groups.  Therefore, by extension, I love the people who prepare pizza for me – even if they don’t cut the pizza into equally-sized pieces.  If you are a professional pizza cutter, I hope that you are not offended by my mathematical musings.  On the contrary, I salute you and thank you for all that you do for pizza lovers like me.***





---------------------------------------------------
For math tutorials and silly math songs, visit www.onlinemathpro.com





Affiliate Disclosure

Thursday, January 3, 2013

Is 2013 a prime year? (A look at divisibility)



Happy New Year!  I hope your year is off to a great start.

If you like to contemplate numbers like I do, you may have wondered whether or not 2013 is a prime number. After a quick review of basic divisibility rules (yeah, there's a song for that) we can see that 2013 is divisible by 3.

(2 + 0 + 1 + 3 = 6, and 3 goes into 6.)

Factoring out 3, we have:  2013 = 3(671)

So, is 671 a prime number?  It doesn’t fit any of the divisibility rules for 2 through 10.  However, as it turns out, 671 is divisible by 11.

Factoring out 11, we have:  671 = 11(61)

Therefore, the prime factorization of 2013 is 3·11·61.

In general, how can we tell whether or not a number is divisible by 11?

Here's a fairly easy Divisibility Rule for 11:

1) Find the sum of every other digit in the number (1st digit + 3rd digit + 5th digit + …)

2) Find the sum of the digits not used in step 1 (2nd digit + 4th digit + 6th digit + …)

If these sums differ by 0, or a multiple of 11, then the original number is divisible by 11.

{If you want to know why this rule works, continue reading.  If you don't care why it works, but would like to see another neat divisibility rule for 11, skip to the bottom.}
 
Why this rule Works

Think back to elementary school, when you used pencil and paper to multiply.  What does it look like when a number is multiplied by 11?

Here is an example:                 12345
                                           ×         11
                                                12345
                                          +  123450
                                              135795

 

Let’s take a look at a general case, in which a 5-digit number is multiplied by 11.  The conclusions we draw can be generalized for multiplying any length of number by 11.


                                                ABCDE
                                             ×           11
                                                ABCDE
                                         +  ABCDE0

 

The answer will have the following values for its digits:

            1st digit:           A
            2nd digit:          (A + B)
            3rd digit:           (B + C)
            4th digit:           (C + D)
            5th digit:           (D + E)
            6th digit:           E
 
The sum of digits 1, 3 and 5 is A + (B + C) + (D + E)

The sum of digits 2, 5, and 6 is (A + B) + (C + D) + E

Clearly these sums have a difference of 0.

But… what if we need to carry when adding ABCDE + ABCDE0?

Exactly what happens when we carry?

If a digit’s value exceeds 9, then we subtract 10 from that value, and add 1 to the value of the digit to the left.

For example:               39
                                  +  7
                                    46

 (9 + 7 = 16.  16 – 10 = 6.   We write 6 in the one’s place, and add 1 to the digit in the ten’s place)


Subtracting 10 from a digit’s value and adding 1 to the value of the digit to the left causes a net change of 11 between the sum of digits 1, 3 & 5 and the sum of digits 2, 4 & 6.
 

Let’s assume that in our generalized example, (D + E) exceeds 9.  In this case, since we have to carry, the answer will have the following values for its digits:

            1st digit:           A
            2nd digit:          (A + B)
            3rd digit:           (B + C)
            4th digit:           (C + D) + 1
            5th digit:           (D + E) – 10
            6th digit:           E
 
Now the sum of digits 1, 3 and 5 is  A + B + C + D + E – 10

And the sum of digits 2, 4 and 6 is  A + B + C + D + E + 1

These sums differ by 11.

 
Every time we carry (subtract 10 from a digit’s value and add 1 to the value of the digit to the left) we are causing a net change of 11 between the sum of digits 1, 3 & 5 and the sum of digits 2, 4 & 6.  These changes may accumulate, or cancel each other out.

 
If we carry twice, the sums could differ by 22 (if the net changes of 11 accumulate) or they could differ by 0 (if the net changes cancel each other out).

By generalizing this explanation, we can show that for any multiple of 11, the sum of digits 1, 3, 5, etc. will differ from the sum of digits 2, 4, 6, etc. by 0, or a multiple of 11.

Here’s an even easier divisibility rule for 11:

Subtract the last digit from the number formed by the remaining digits.  (You can repeat this step as often as necessary.)  If the resulting number is divisible by 11, then the original number is divisible by 11.

(Example:  671 is divisible by 11 because 67 – 1 = 66, and 66 is divisible by 11.)

Why does this work?  I bet you can figure it out…

*Hint: It might be helpful to once again consider this problem:
 
                                                ABCDE
                                             ×           11
                                                ABCDE
                                         +  ABCDE0

 
If you want to try out an explanation, feel free to post a comment below.
 

Here’s to a great (not to mention, mathtastic) year in 2013.

---------------------------------------

For math tutorials and silly math songs, visit  www.onlinemathpro.com
 



Affiliate Disclosure


Thursday, December 27, 2012

Watermelons and New Years' Parties (Puzzle)


Here’s a fun math puzzle involving percents.  The solution is not terribly difficult – but it is surprising how many people end up getting the answer wrong.  Why not give it a try:

The owner of a farm stand puts a bunch of watermelons on display at the beginning of the day.  The watermelons have a mass of 200 kg.  99% of the watermelons’ mass is water.  It is hot, and during the day water evaporates from the melons.  At the end of the day, 98% of the watermelons’ mass is water.  Assuming that no watermelons were sold during the day, what is the mass of the watermelons at the end of the day?

If you’d like to check your answer, the correct solution is below.

 

If you’re having a hard time, consider this puzzle.  The math involved the same as the watermelon problem, but the way in which the puzzle is presented tends to make the solution easier to find.

Some guys planned a New Years’ party and invited only women.  At the party, there were a total of 200 people, 99% of whom were women.  A lot of the women thought that the party was lame, so they left.  After one hour, 98% of the people left at the party were women.  How many total people were at the party after one hour?

This puzzle is slightly easier to grasp because it explicitly states that there are men and women.  (And, it states that only women leave the party.)
 
See below for the solutions.
 
 


 
Solution: New Years’ party puzzle

It’s not very hard to determine how many men and women there were at the beginning of the party:

Women:  99% of 200 = 198           Men:  1% of 200 = 2

Since only women left the party, there are still two men after one hour.  However, these two men now comprise 2% of the total party crowd.  2 is 2% of 100… therefore, there are 100 people at the party after one hour.

 

Solution: Watermelon puzzle

The watermelon puzzle is a little trickier simply because the problem doesn’t explicitly state that the watermelon is made up of water and solids.  Therefore, many people get hung up focusing on the water.

If 99% of the watermelon mass is water, then 1% is made up of solids.  1% of 200kg is 2 kg – so there are 2 kg of solids.  Solids do not evaporate, so at the end of the day, there are still 2 kg of solids.  This now comprises 2% of the total watermelon mass.  2 kg is 2% of 100 kg.  Therefore, there are 100 kg of watermelons left at the end of the day.

Happy New Years’, Everyone!
 
------------------------------
 
For Math Tutorials and Silly Math Songs, visit   www.onlinemathpro.com
 
 
 

Thursday, December 13, 2012

Ready, Go, SET!

Riddles and puzzles are a good way to challenge yourself and increase your logic skills.  They also give valuable practice in solving the story problems that seem to haunt so many math students.

Here’s a brain teaser that can be solved with simple math.  (As is the case with many math puzzles, there is more than one way to solve the problem.)  If you think you’re up to it, try to answer the question before reading the solutions and explanations at the bottom of this page.

There are 340 players in a SET* tournament.  Each game in the tournament is played with 4 people.  For each game, there is one winner who moves on to the next round.  Rounds will continue until there is just one winner left – the champion.  In any round, if the number of players is not a multiple of 4, then some players will be chosen randomly to advance automatically so that the number of people playing in that round is divisible by 4.  (This will ensure that each game that is played will have 4 players.)  How many total games will be played in the tournament?


{Scroll down for solutions}


--------------------------------------------------

*I love card games.  I also love activities that help people learn and/or increase their brain power.  SET is a card game that is simple to learn, fun for a wide range of players (recommended for players 6 years old and above), and helps build brain power.  As a teacher and card game enthusiast, I give SET my full recommendation.  (And now SET-Junior is available for younger players.)




--------------------------------------------------


Solutions/Explanations

Method 1 (slow)

To solve the problem, many people get out pencil and paper and begin calculating the results, round by round.  For each round, they keep track of the number of games, and then add these up at the end to find the answer to the question.  This method can be quite time consuming.  One such solution is shown:



Method 2 (fast)

Of course, there is another way to solve this problem – a way that takes much less time.  In the previous solution, the focus was on the WINNERS from each round.  (The number of players in rounds 2 – 5 was determined by figuring out how many winners there were in the previous round and adding this amount to the number of people who were lucky enough to advance automatically.)  A much quicker solution involves focusing on LOSERS:

We know each game that is played will have 4 players.  This means that each game is guaranteed to have 3 losers.  The tournament begins with 340 players, and 339 of those players will be a loser at some point.  All we need to do is divide 339 by 3 to find our answer: There will be 113 games.


When looking at a tough problem, we often hurt ourselves by focusing on the wrong part of the problem.  Sometimes it is helpful to take a step back, reexamine the problem, and figure out if our focus is in the right place.


For math tutorials and silly math songs, visit www.onlinemathpro.com




Affiliate Disclosure

Wednesday, December 5, 2012

Percentiles?!




We take tests throughout our school years and most of us understand how the scoring works.  Take the number of points earned, divide by the number of points possible, move the decimal a couple of spaces right and, voila, we have a percent that represents our score.  (If you want to learn more about percents, there's a song for that.)


But then, once a year, we take a standardized test and when the score is reported, we are given a percentile.  What in the world is a percentile?

Unfortunately, we don’t learn much about percentiles in school.  However, we do learn about the median, which I discussed in my last blog entry, and also about quartiles.  Let’s review briefly:

If all of the values in a data set are arranged in order, then the middle number (or, if there are two middle numbers, their average) is the median.  This number divides the data set into two equal groups:  Half of the values in the set are above the median, and half of the values are below the median.

If all of the values in a data set are arranged in order, then the quartiles (there are three of them) are the values that split the data set into four equal groups:

One-fourth (25%) of the values in the set are less than or equal to the 1st quartile, and three-fourths (75%) of the values are greater than or equal to the 1st quartile.

Half (50%) of the values in the set are less than or equal to the 2nd quartile, and half (50%) of the values are greater than or equal to the 2nd quartile.  (The 2nd quartile is the same as the median.)

Three-fourths (75%) of the values in the set are less than or equal to the 3rd quartile, and one-fourth (25%) of the values are greater than or equal to the 3rd quartile.
 

If you understand how quartiles work, then it’s not much of a leap to understand percentiles.

If all of the values in a data set are arranged in order, then the percentiles (there are 99 of them) are the values that split the data into 100 equal groups.  (Note: some people call these centiles.)

1% of the values in the set are less than or equal to the 1st percentile, and 99% of the values are greater than or equal to the 1st percentile.

2% of the values in the set are less than or equal to the 2nd percentile, and 98% of the values are greater than or equal to the 2nd percentile.

And so on…

Because they split the data set into so many groups, percentiles are only useful in analyzing data sets that are very large – like the number of students who take standardized tests.

If we understand how percentiles work, then interpreting standardized test scores becomes much easier.

If a score is reported as 20th percentile, then 20% of test-takers scored at or below that level.

If a score is reported as 90th percentile, then 90% of test-takers scored at or below that level.

That wasn’t so hard was it?

So, why are there so many people who struggle with percentiles?

I blame politicians.
 
In the recent years, politicians arguing over tax rates have consistently discussed “Americans in the top two percent of earners”.  They would do us all a great service if they would instead argue about “Americans at or above the 98th percentile of earnings”.  It wouldn’t make politicians any more likely to work well together, but at least people would understand standardized test scores better!



Affiliate Disclosure

Friday, November 30, 2012

NFL Salaries (part 2) - Is Average really Average?



In my last blog entry, I discussed average NFL salaries.  I had initially hoped to talk about median salaries but, with my limited internet searching skills, was not able to find enough information about the history of median NFL salaries.

When analyzing data, why do we often focus on the median instead of the average (mean)?

The fact is that the average (mean) is not always so average (typical).  If we want to get a good picture of what a typical NFL player makes, we should analyze median salaries. 


Indianapolis Colts – 2012 Salaries

Rk
Player
Salary
1
Dwight Freeney
$19,035,000
2
Antoine Bethea
$6,225,000
3
Robert Mathis
$5,750,000
4
Andrew Luck
$4,015,000
5
Reggie Wayne
$3,500,000
6
Adam Vinatieri
$3,200,000
7
Antonio Johnson
$2,000,000
8
Samson Satele
$1,866,667
9
Anthony Castonzo
$1,818,431
10
Cory Redding
$1,716,667
11
Jerry Hughes
$1,691,250
12
Winston Justice
$1,500,000
13
Austin Collie
$1,417,388
14
Donald Brown
$1,385,000
15
Pat McAfee
$1,322,500
16
Drew Stanton
$1,225,000
17
Pat Angerer
$1,132,500
18
Tom Zbikowski
$1,033,333
19
Coby Fleener
$971,000
20
Vontae Davis
$957,500
21
Fili Moala
$873,000
22
Trai Essex
$825,000
23
Mewelde Moore
$825,000
24
Jerraud Powers
$784,625
25
Darius Butler
$770,000
26
Mike McGlynn
$700,000
27
Moise Fokou
$627,438
28
Drake Nevis
$622,278
29
Donnie Avery
$615,000
30
Justin King
$615,000
31
Delone Carter
$571,301
32
Dwayne Allen
$565,826
33
Ricardo Mathews
$551,628
34
Kavell Conner
$551,309
35
Josh Gordy
$540,000
36
Jeff Linkenbach
$540,000
37
Seth Olsen
$540,000
38
Matt Overton
$540,000
39
T.Y. Hilton
$521,750
40
Sergio Brown
$490,000
41
Cassius Vaughn
$490,000
42
Joe Lefeged
$467,667
43
Kris Adams
$465,000
44
Mario Addison
$465,000
45
Martin Tevaseu
$465,000
46
Joe Reitz
$455,000
47
Vick Ballard
$426,140
48
LaVon Brazill
$409,670
49
Chandler Harnish
$401,474
50
Mario Harvey
$390,000
51
Justin Hickman
$390,000
52
Dominique Jones
$390,000
53
Nathan Palmer
$390,000
54
Bradley Sowell
$390,000
55
Jerrell Freeman
$375,000
Source: Fox Sports*
As an example, let’s look at the salaries for the 2012 Indianapolis Colts.
This team is somewhat of an anomaly because they have the highest-paid player in the league (Dwight Freeney) and the lowest total team payroll in the league.  This makes the Colts an exaggerated microcosm of the NFL – a league in which most players earn a high salary, but a few players earn an insanely high salary.


So, how much money does the typical player on the Colts earn?


If we use average salary (rounded to the nearest dollar) the answer is $1,469,115 – but is this really typical?  43 players, representing78 percent of the team, make less than this amount.


The average salary is artificially inflated by the top-earning players on the list.  If we take the top three salaries (Freeney, Bathea, and Mathis) off of the list and recalculate the average, it becomes $957,526 (again, rounded to the nearest dollar).  Removing three players caused the average salary to decrease by about 35%.


It seems more reasonable to use median salary and state that the typical player on this team earns $622,278.  This amount is not artificially inflated by the top earners on the list.  If we remove the top three salaries, the median becomes $615,000.  This number is about 1% lower than the original median.


If the example of the Colts does not convince you that median is the better way to go, consider this example:


A group of one hundred people decide to look in their wallets to see how much money each person is carrying.  Ninety-nine of the people are carrying $1 and one person is carrying $1,000,000.  The average amount of money per person is $10,000.99 ($1,000,099 ÷ 100).  Does this mean that the typical person in this group is carrying over ten thousand dollars in his/her wallet?  Of course not.


In situations like these, median gives the best approximation of the typical case – the average is not really very average.

----------------------------------------------------------------------------
For Math Tutorials and Silly Math Songs, visit