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