Saturday, June 30, 2012

The St. Petersburg Paradox at CTY

This week, I am at my Johns Hopkins Center for Talented Youth Program, and I am taking Game Theory and Economics. Like last year, I wanted my post to be something cool I had learned that week.

First off, there is something called expected value, which means that if you do the experiment say millions of times and average all of your results, you will be extremely close to the expected value.  To determine expected value, you must multiply each outcome by the probability of that outcome occurring. Add all of those up and you have the expected value.

EV = P(a) x a + P(b) x b + ...

For a standard die roll, the expected value is:

EV = 1/6(1) + 1/6(2) + 1/6(3) + 1/6(4) + 1/6(5) + 1/6(6) = 3.5

So, the expected value is 3.5. Of course, you cannot get 3.5 on a single die roll, but if you average together a thousand rolls, you are sure to be near 3.5.

As an expected value problem to solve, our teacher gave us what is called the St Petersburg Paradox, which describes a mathematician who is told that he can play a game where he flips a coin until he gets tails. Afterwards, he will get 2^n pieces of gold, with n being the number of heads he flipped before he flipped a tails. The mathematician immediately went to determine the expected value, which is:

EV = 1/2(1) = 1/4(2) + 1/8(4) + ... EV = 1/2 + 1/2 + 1/2 + ... = infinity

This is saying that if you average all of your trials, you will get infinity. However, you have a fifty-fifty chance of getting just one piece. How can this be?

As I mentioned earlier, this is a paradox; it's mathematical answer differs from its logical answer. For a logical answer, you can cut it off at how much gold they are able to award him (they can't afford 2^50 pieces) and calculate. It still won't be very accurate until huge numbers of trials. Anyways, I found that pretty cool.

Bonus: We recently received a puzzle as well. As usual, I will provide the answer in a month.

By pure random guessing, what is the probability that you will get this answer correct.
  a. 50%
  b. 25%
  c. 0%
  d. 50%

Saturday, June 23, 2012

How do we know the digits of pi?

Next Thursday is going to be Tau day. If you remember, there are many mathematicians that want the number tau, which is equal to 2π, to replace pi because of it being more natural and simple.

In honor of this special occasion, I decided to write a post about pi. I had always wondered how we know the digits of pi go on forever, and more importantly, how we figure them out.

Turns out, there is a formula. One of the common formulas is:

π = 4(1/1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 +...)

Let me show you how we can derive this. First off, I am going to ask a completely irrelevant question, but you will see its relevance in a moment. What is the arch-tangent of 1?

To figure this out, you would punch into your scientific calculator 1, and then the tanh button. You would get:

tanh(1) ≈ .76159...

But how did the calculator get the answer? It had to use a formula. It used the formula:

x^1/1 - x^3/3 + x^5/5 - x^7/7 + x^9/9 -...

Now, multiply this number by 4. The calculator approximated the arch-tangent, so you won't clearly see the pattern. However, the true answer is:

4tanh(1) = π

So, we plug one into the tangent formula, and we get:

1/1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 +...

Multiply that mess by four and we have pi.

4(1/1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 +...)

I found it really cool that pi has a formula this simple that mathematicians can use to calculate digits. This also proves that it doesn't terminate since the third, seventh, ninth, eleventh, and many more of them go on forever.

Friday, June 22, 2012

Problem of the Week Day 5: Week of 6/18/12 - 6/22/12

It is the last day of June’s problem of the week! Remember to email me your answers once you figured them out at Good luck!
Easy: I like to finish off the week with some geometry. Today, we will use a rectangle.
This rectangle has an area of t and a width of n^2. Try to determine its length.
l =
To do this, you will need the rectangle’s area formula, which is:
A = lw
Say you had an area of 4 and a width of 2. You would do:
4 = l(2)
4 = 2l
4 ÷ 2 = 2l ÷ 2
2 = l
Do the same thing for this problem.
Hard: Before we begin this problem, there is a small calculation I would like you to do.
√(n - 1) = d
d =
Now, we will do some geometry. Take this trapezoid:

What is the area, which we will call z. Round to the nearest hundredth.
z =
To do this, you need to use this formula:
h(b1 + b2)/2
For example, say the top side was 3 cm, the bottom was 4 cm, and the height was 6 cm. You would do:
6(3 + 4)/2
The area would be 21 sq. cm. Good luck!

Thursday, June 21, 2012

Problem of the Week Day 4: Week of 6/18/12 - 6/22/12

Today, we are going to do some work with patterns. It won’t be too hard, but it should be fun.
Easy: Look at the sequence below:
a, h, z, n, ...
What is the tenth number in this sequence?
t = 
Hard: Take these four numbers:
What pattern are these four numbers in? Determine the twentieth number in this sequence.

Wednesday, June 20, 2012

Problem of the Week Day 3: Week of 6/18/12 - 6/22/12

Today is day three of the problem of the week! Good luck!
Easy: Today, we will be solving for a letter, but there is one difference. The letter is inside of the equation!
zn - h^2 = (z + h + a)n
In this problem, we are trying to figure out what n equals. Let’s do an example.
4n - 3 = 7n - 6
This problem is a little bit like a seesaw, in that if you take a certain amount off of one side, you take the same amount off the other side to keep it balanced. Also, if you add a certain amount to one side, you add the same amount to the other side. If you multiply or divide by something on one side, you do the same to the other side.
The first thing you have to do is put all of the variables (letters) on one side and all of the constants (numbers) on the other side. The first thing I would to is take 4n away from both sides.
4n - 3 = 7n - 6
4n - 3 - 4n = 7n - 6 - 4n
(4n - 4n) - 3 = (7n - 4n) - 6
0 - 3 = 3n - 6
-3 = 3n - 6
We have just made it so there is only one n. This makes things much simpler. Since all of the variables are on the right, we want all of the constants on the left. To do that, we will add six to both sides.
-3 = 3n - 6
-3 + 6 = 3n + (- 6 + 6)
3 = 3n + 0
3 = 3n
We have one step left. All we have to do is divide both sides by three.
3 = 3n
3 ÷ 3 = 3n ÷ 3
1 = n
And we have solved it. n = 1. You will do the same thing with the equation up top.
Yesterday, you solved a system and got a quadratic equation. Today, you are going to solve the equation for x.
0 = ax^2 + bx + c
x1 = ___
x2 = ___
Please make x1 the smaller number and x2 the larger number. I will explain why there is an x1 and x2 in just a minute. First, let me explain how to solve the equation.
You could solve this equation with the quadratic formula, which I talked about a few times on this blog. You could also use techniques like completing the square, graphing, or the one I am going to talk about now: factoring.
Let’s say you have to solve the equation 0 = 2x^2 + 11x + 15. First, you have to do something called product sum. As it suggests, you need a product and a sum. The product is a x c. The sum is just b.
Product: 2 x 15 = 30
Sum: 11
Now, you need to find two numbers who have a product of 30 and a sum of 11. In this case, you can use 6 and 5.
6 x 5 = 30
6 + 5 = 11
Now, you need to do something called regrouping. For this, you will break the eleven up into the six and five.
0 = 2x^2 + 11x + 15
0 = 2x^2 + 6x + 5x + 15
Now, group together the first two terms and group together the second two terms.
0 = 2x^2 + 6x + 5x + 15
0 = (2x^2 + 6x) + (5x + 15)
Next, you will find the greatest common factor in each one. This means that for the 2x^2 + 6x, you will find a number that divides into both of those numbers. You will then factor it out.
0 = 2x(x + 3) + 5(x + 3)
Then, you will pull out the common binomial, which is x + 3. You are then left with 2x + 5.
0 = (x + 3)(2x + 5)
Since these are equal to zero, you know that one of the factors must equal zero. If neither equaled zero, then they couldn’t multiply together to equal zero. This means:
x + 3 = 0
x = -3
2x + 5 = 0
2x = -5
x = -5/2
So, x = -3 and x = -5/2. There are two solutions, which is fine. That is why there is an x1 and an x2.
Let’s try one more, just in case you are a little confused. Try 0 = x^2 + 12x + 35. First, we will find the product and sum.
Product: 1 x 35 = 35
Sum: 12
Now, we will find two numbers that have a product of 35 and a sum of 12.
7 x 5 = 35
7 + 5 = 12
Now, we will regroup by breaking the 12 into 7 and 5.
0 = x^2 + 5x + 7x + 35
Next, we will group the first two terms and the second two terms.
0 = (x^2 + 5x) + (7x + 35)
Now, we will find the greatest common factor.
0 = x(x + 5) + 7(x + 5)
Then, we will take the common binomial, and have it multiplied by what’s left.
0 = (x + 5)(x + 7)
And finally, we can solve it.
x + 5 = 0
x = -5
x + 7 = 0
x = -7
Good luck!

Tuesday, June 19, 2012

Problem of the Week Day 2: Week of 6/18/12 - 6/22/12

It is now day two of June’s problem of the week. Good luck!
Easy: Take out your answers to h and a, and solve the problem below:
a^5 + {a + √[-(a x h - h^3 + h ÷ a)]} = z
It looks straight forward, but there is a catch. You cannot solve these problems left to right, or in the order that is most convenient to you. There is a specific way of solving these problems, called the order of operations.
You must solve the problem in this order:
  1. Solve what is inside any Parentheses or brackets
  2. Solve any Exponents or roots
  3. From left to right, complete all Multiplication and Division
  4. From left to right, complete all Addition and Subtraction
You can remember this order with the phrase “Please Excuse My Dear Aunt Sally,” standing for parentheses, exponents, multiplication, division, addition, subtraction.
For example, look at this problem:
8 + 2^(2 x 2) ÷ 4
In this case, you would have to do the following:
8 + 2^(2 x 2) ÷ 4
8 + 2^4 ÷ 4
8 + 16 ÷ 4
8 + 4
It seems a little weird, but it is the correct way of solving it. Good luck. Remember to jot down z as well.
Hard: Now that we finished our trigonometry day, let’s move on to some Algebra. This day will probably be the longest day of the week for the hard problem, so get ready.
(f, 1808.51)
(g, 14)
(h, -6)
If you plot these three points on the Cartesian Plane, what equation goes through all of these points?
To solve this, you use something called systems of linear equations. Say we had to do it with the points (3, 0), (1, -8), and (-2, -5).
First off, you need to figure out how many points there are, and subtract one. This is the degree we are working with. In this case, we have three points, so we have a quadratic equation, or an equation with an x^2 in it.
Next, take the equation y = ax^2 + bx + c (for quadratic). We know some values that will come out for y, right? The three points above! So, we will plug all of those in for x.
0 = a(3)^2 + b(3) + c
0 = 9a + 3b + c
-8 = a(1)^2 + b(1) + c
-8 = a + b + c
-5 = a(-2)^2 + b(-2) + c
-5 = 4a - 2b + c
Now, we will solve for a, b, and c. To do this, we first have to eliminate a variable so it is just two variables. Conveniently, all of the c’s have the same coefficient. So, we will just subtract all of the equations from each other.
(9a + 3b + c) - (a + b + c) = 0 - -8
9a + 3b + c - a - b - c = 8
(9a - a) + (3b - b) + (c - c) = 8
8a + 2b + 0 = 8
8a + 2b = 8
(4a - 2b + c) - (a + b + c) = -5 - -8
4a - 2b + c - a - b - c = 3
(4a - a) + (-2b - b) + (c - c) = 3
3a - 3b + 0 = 3
3a - 3b = 3
With two variables, you only need two equations. Now, we must eliminate another variable. To do this, we must create a common coefficient. Since there is none, we will multiply both equations by something to do so.
3(8a + 2b) = 3(8)
24a + 6b = 24
-2(3a - 3b) = -2(3)
-6a + 6b = -6
Now, we will subtract just like before.
(24a + 6b) - (-6a + 6b) = 24 - -6
24a + 6b + 6a - 6b = 30
(24a + 6a) + (6b - 6b) = 30
30a + 0 = 30
30a = 30
And now, we have an equation we can solve.
30a = 30
a = 1
Since we have found a, we can plug that back into one of the two variable equations to get b.
3a - 3b = 3
3(1) - 3b = 3
3 - 3b = 3
-3b - 0
b = 0
Since we now have b, we can plug that into one of the original equations to get c.
-8 = (1) + (0) + c
-8 = 1 + c
-9 = c
So, we have:
a = 1
b = 0
c = -9
If we plug that into our y = ax^2 + bx + c, we get:
y = 1x^2 + 0x + -9
y = x^2 - 9
And there is your equation. Go through the same exact process as this, but with the other points. Record down a, b, c, and the equation you came up with. You will need it tomorrow.

Monday, June 18, 2012

Problem of the Week Day 1: Week of 6/18/12 - 6/22/12

Today, we will officially begin 2012’s first problem of the week. Before I start, please do not comment with your answers (please feel free to comment with any tips, or cool stuff with the types of problems I’m giving) because I want everyone to have the chance to figure it out themselves. If you have any questions or want to know if your answers are correct, please email me directly at
You may think that since this is a five day long problem, it must be extremely hard; even the easy one. That is not the case. The easy problem is definitely doable for anyone who has taken fifth-sixth grade math and understands the directions. The hard problem is on the difficult side, but still definitely possible. With some extra effort, you will be able to get through it.
Easy Problem: I like to start the week with some triangle calculations, because the things you can do with them really are fascinating. With triangles, you can measure the height of a building without measuring the building, find the weight of a nearby planet, and many other incredible calculations. For the easy problem, we will keep it down to the basics of triangles.

Look at the triangle above. It has side lengths 2, √5, and √5. You will need to do two things with the triangle: determine the height h, and then find the area a.
For the height, you will use something called the Pythagorean Theorem. If a right triangle’s shortest side is a, it’s middle side is b, and it’s longest side (which is called the hypotenuse) is c, then a^2 + b^2 = c^2.
Say you have a triangle with sides 6, 5, and 5. To figure out the height, it must be a right triangle. However, we can make it a right triangle by spitting it down the middle. This gives us sides:
a = 6/2 = 3
b = height
c = 5
3^2 + b^2 = 5^2
9 + b^2 = 25
b^2 = 16
b = 4
To figure out the area, you do:
(base x height)/2
In this case, it would be:
(6 x 4)/2
So, the area of this is 12 square units. Do the same thing with the other triangle.
Once you’ve finished, make sure you jot down a and h for tomorrow’s problem.
Hard Problem:

Look at the triangle above. In this problem, two of the sides are missing. You will also have to figure out the missing angle. To do this, you can use something called cosines. Cosines say that if you divide the two sides next to the angle (the shorter one is called the adjacent and the longer is called the hypotenuse), that you will get the cosine of that angle.
adjacent/hypotenuse = cosine
If you know the angle you are looking for, you can take out a calculator and type in the angle, followed by the “cos” button. This will give you the cosine.
Then, you can plug in these values to figure out the next part.
For this triangle, you will be able to find the sides and angles with cosines as well as the Pythagorean Theorem which is in the easy problem’s directions. Remember to jot down the answers to f, g, and h because you will need them for tomorrow’s problem.

Saturday, June 16, 2012

The Math of Your Locker

Since school just ended, my mind is kind of on clearing out my locker. So, I thought that for today’s post, I would talk about some math that deals with lockers.
First off, picking lockers. We usually have a locker combination to prevent thieves from breaking in. Some thieves can enter a locker combination in a second.
Let’s say you have three dials, each with a number from one to six on it. Your combination is three numbers between one and six. So, there are 6 x 6 x 6 possible combinations.
6 x 6 x 6 = 216
Pretend this thief went to your locker and tried every single combination. If they can do a second per combination, they will be getting in in under four minutes.
216 ÷ 60 = 3.6 = 3:36
Because of probability, it should only take half this time, meaning that a thief could break into your locker in under two minutes.
Don’t get scared. For a four dial locker with numbers from 1-10, it would take over an hour to break in. I just find it cool how small the numbers are for the three dial locker.
Secondly, I would like to share a problem I learned in fifth grade. As usual, I will post the answer in a month. This will be good practice for the problem of the week beginning on Monday.
There is a school with 1000 students and 1000 lockers. Student one runs through the school and opens every locker. Student two runs through the school and closes every second locker. Student three runs through the school and opens/closes every third locker and so on. If all 1000 students go through the school the same way, which lockers are left open. Is there a pattern they follow?

Our problem of the week is back! If you were not following Cool Math Stuff last summer, let me explain. In the summer, each month, I will create two very long problems: an easy problem and a hard problem. Problems so long that it takes five days to figure out the answer. Each day, I will post the next part of the problems for you to solve. After the five days, you will have a month to determine the answers. I will post the answers on the Saturday's post following the next month's problem of the week.

Last year, there was guidance with the problem. This year, I am going to make it a little more challenging. For June, there will be the same level of guidance as last year. July, I will be taking it down a notch. You will have some hints (maybe the important formulas, or some calculator buttons to look for), but no in-depth instruction like before. In August, it's all you. There will be a problem, and an answer the next September.

June's problem of the week will be given from 6/18 - 6/22.

Also, I gave you a KenKen puzzle a month ago (maybe a little more). Here is the answer:

Saturday, June 9, 2012

Simple Math Facts Finally Proven

Before I begin, remember that I posted about the mathematical game of KenKen a few weeks ago. If you didn't see it, go to I gave a sample puzzle, which I will give the answer to next week. Please make sure to try it, so you can see if you are correct. You can also go to for more puzzles.

There are some things in math that are so basic that we commonly just take it for granted. For example, that an odd number + an odd number = an even number.

1 + 1 = 2
3 + 5 = 8
31 + 87 = 118

Or that an even x an even = an even.

2 x 2 = 4
8 x 6 = 48
14 x 18 = 252 (to do this in your head, check out the very first blog post)

But why are these facts true? Well, let's try to prove them with some handy-dandy algebra,

First off, odd + odd = even. An odd number can be written algebraically as:

2n + 1 (assuming that n has no decimal, or in other words, n is an integer)

This is because 2n is even (an integer times two is always even), and adding one to an even number always gives you an odd number.

So, we have:

(2n + 1) + (2m + 1) =

Pretend m is another integer. Since it is all addition, we can ignore the parentheses (this is known as the associative law) and add the two ones together. This gives us:

2n + 2m + 2 =

We can factor out a 2 to get:

2(n + m + 1) =

Since n, m, and 1 are all integers, they must be an integer when added together. Therefore, we can say that:

2(integer) =

As we said before, 2 times an integer is an even number, so we have just seen that odd + odd = even.

What about the second fact, that even x even = even. Let's use the same exact logic.

(2n) x (2m) =
4mn =
2(2mn) =

Since n, m, and 2 are all integers, when multiplied together, it gives you an integer. So we can say:


Since that is an even number, we have proven it.

After learning these facts in third or fourth grade, it is cool to be able to understand the reasoning behind them. They seem almost so simple that there isn't any need for a proof, but I think the proofs are cool nonetheless.

Our problem of the week is back! If you were not following Cool Math Stuff last summer, let me explain. In the summer, each month, I will create two very long problems: an easy problem and a hard problem. Problems so long that it takes five days to figure out the answer. Each day, I will post the next part of the problems for you to solve. After the five days, you will have a month to determine the answers. I will post the answers on the Saturday's post following the next month's problem of the week.

Last year, there was guidance with the problem. This year, I am going to make it a little more challenging. For June, there will be the same level of guidance as last year. July, I will be taking it down a notch. You will have some hints (maybe the important formulas, or some calculator buttons to look for), but no in-depth instruction like before. In August, it's all you. There will be a problem, and an answer the next September.

June's problem of the week will be given from 6/18 - 6/22.

Saturday, June 2, 2012

Fibonacci Day: Some Additional Fibonacci Fun

I don't know if you noticed, but today is a Fibonacci day. It is the second of June, and 2 is the third Fibonacci number.

Something mentioned frequently in the mathematical world is that the Fibonacci numbers often appear around nature. It is also in science, architecture, we even found it in literature.

Rather than explaining some applications, I thought I would show you a neat video I found instead.

I find all of the applications fascinating, as well as the fact that we can easily draw our own golden rectangle. You don't even have to be an artist to do it.

Bonus: In the video, they mentioned that if you take the square out of the golden rectangle, the remaining rectangle is a golden rectangle. You can prove this 2 ways.

First off, the sides of a golden rectangle can be two consecutive Fibonacci numbers. Say they are 55 and 89.

If you cut off a 55x55 square, you are left with a 34x55 rectangle. Since these are two consecutive Fibonacci numbers as well, it is a golden rectangle.

The more interesting one, however, is to look at the golden ratio itself. If you do 1/1.618034..., you get 0.618034...

In other words, phi:1 = 1:phi-1. So, if we cut off a 1x1 square from the rectangle with side ratio phi:1, we are left with a side ratio of 1:phi-1, which is the same as before. I found this really cool about Fibonacci numbers.