An Economics Application of the Quadratic Formula

“What am I ever even going to use this for?” – Annoyed Students Everywhere

By popular request, we’re providing some applications of the quadratic formula.  Today we give you an example from economics, but there are more examples in the works.  We’ll end today’s article with the beautiful proof of the fact that

If x,a,b, and c are all real numbers and ax^2+bx+c=0, then

x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

Be sure and come back in the future for more examples of how useful this formula can be in other fields, too!

Example from Economics.

Simple revenue is a fairly straightforward concept.  Suppose you’re running a business that sells one product, let’s call them “widgets.”  The amount of money you make from widget sales is called your “revenue.” It’s different from profit, which is the revenue minus the cost of making the widgets.  Here, we’ll use R to represent revenue, and \Pi to represent profit.  Important note!   The symbol \Pi is not the same as \pi, which is a constant number we use universally in mathematics.  In the field of Mathematical Economics, we use the capital Greek letter \Pi for profit.

The revenue function here is fairly simple.  If p is the price of each widget, and q is the quantity of widgets sold in a month, then

R=pq

But of course it isn’t just that simple.  In economics, there is something we call “the law of demand.” Basically, the law of demand tells us that if the price of an item falls, then people will buy more of that item.  If it doesn’t sound realistic phrased that way, we could also say that if the price of an item falls, then more people will buy it.

So you see, q is actually a function of p.  Now, let’s suppose that the current price per widget is $5, and that you’ve done market research and determined that with current demand, people will buy 10,000 widgets per month from you at the current price.  But your market research also indicates that if you lower your price, people will buy 1000 more widgets for each dollar you lower the price.  Then we can write

q=10,000+1000(5-p)

Go ahead and stew on that until it makes sense.  When the equation is written this way, it’s clear what happens to the quantity sold when the price is $5, or when it’s more or less than $5.  Now that we can see that, let’s clean up our expression for q with a little algebra:

q=10,000+1000(5-p)

q=10,000+(1000)(5)-(1000)(p)

q=10,000+5000-1000p

q=15,000-1000p

Then we can incorporate that definition of q into our definition of R:

R=pq=p(15,000-1000p)

and we’ll do a little algebra to clean that up, too…

R=15,000p-1000p^2

Now, let’s think about the cost function, C.  Suppose it costs us $0.50 to make each widget when we’re making 10,000  widgets per month.  Now, we have fixed costs, too, like paying rent on our widget factory, and other monthly bills.  Suppose those add up to $5,000 per month.  If we want to produce extra widgets, we need to pay our employees a little overtime, we need to do a little extra maintenance on our widget maker machines, and we need to buy extra supplies used for making widgets.  What this means is each extra widget produced costs a little more than the widget before it.

So, you talk to Janet in accounting and you guys get some coffee and Chinese takeout and stay up all night going over the books.  When it’s all said and done, you and Janet finally agree that for each additional widget you wish to produce, the average cost of all widgets produced will increase by $0.0001.  Then our cost function for each month is

C=5000+q[0.5+0.0001(q-10,000)]

Again, stare at this equation until it makes sense why we’ve chosen it – all of the information in the two paragraphs above it is in this equation.

But let’s again do a little Algebra and clean it up:

C=5000+q[0.5+0.0001q-(0.0001)(10,000)]

C=5000+q(0.5+0.0001q-1)

C=5000+q(-0.5+0.0001q)

C=5000-0.5q+0.0001q^2

Now remember, q is a function of p, because the number we sell depends on the price.

So we’ll remember the way q depends on p and use that information to rewrite the above equation:

q=15,000-1000p

\implies C=5000-0.5(15,000-1000p)+0.0001(15,000-1000p)^2

then let’s take a moment to just clean that up a little bit:

C=5000-7500+500p+0.0001[15,000^2-2(15,000)(1000)p+(1000p)^2]

C=5000-7500+500p+0.0001[225,000,000-30,000,000p+1,000,000p^2]

C=-2,500+500p+(0.0001)(225,000,000)-(0.0001)(30,000,000)p+(0.0001)(1,000,000)p^2

C=-2,500+500p+22,500-3000p+100p^2

C=20,000-2500p+100p^2

and now we have our cost function C, our revenue function R, and we’re ready to look at the profit function:

\Pi=R-C

\Pi=(15,000p-1000p^2)-(20,000-2500p+100p^2)

again we’ll rearrange and collect terms to clean it up a bit:

\Pi=15,000p-1000p^2-20,000+2500p-100p^2

\Pi=-1100p^2+17,500p-20,000

Now we have the profit function, and we can do some interesting things with it.  It might not surprise you that sometimes raising the price of widgets will cause us to make more money, but it’s also true that sometimes raising the price we charge for widgets will cause us to lose money.  Remember the law of demand!!!  The higher the price is, the fewer people will buy the widgets.  If we raise the price too high, we won’t even sell enough widgets to cover our costs!!!  But on the other hand, if we don’t charge enough for our widgets, we might sell lots of widgets and still won’t be able to cover our costs.  Doesn’t it make perfect sense, then, that there are two places where this function equals zero? If the price is below the lower one, the profit is negative, and we suffer a loss.  If the price we charge is above the upper one, the profit is again negative.  But if it’s between the two places where this function is zero, we make a profit!

So, being the CEO of the largest producer of widgets on the east coast, you’re very interested in knowing what price to charge for widgets so that you’ll be in-between charging too little and charging too much.  Jobs depend on this!  Janet in accounting is depending on you to solve the quadratic, here!!!

So let’s do it.  Solving for p such that \Pi=0 in this situation will give you the two price points at which profit is zero – then you’ll know that if you set the price between those points, your business will at least be able to cover costs. So:

\Pi=0

\iff -1100p^2+17,500p-20,000=0

Now, according to our familiar quadratic formula, we have the information 

a=-1100, b=17,500, c=-20,000

\implies p=\frac{-17,500\pm\sqrt{17,500^2-4(-1100)(-20,000)}}{2(-1100)}

\iff p=\frac{-17,500\pm\sqrt{306,250,000-88,000,000}}{-2200}

\iff p=\frac{-17,500\pm\sqrt{218,250,000}}{-2200}

\iff p\approx\frac{-17,500\pm 14,773.29}{-2200}

\iff p\approx 7.95\pm 6.72

and so we may write

\Pi\approx 0 \mbox{ when } p= 1.23\mbox{ or }p=14.67

Now, we know that as long as the price we charge is between $1.23 and $14.67, we’ll turn a profit.  Good ole Janet in accounting is safe, because right now we are charging $5 per widget.  But that’s not all we might want to know.  We should try and make maximum profit!  So, do we just charge the highest price we can get away with?  Should we charge $14.67?

It’s pretty natural to think so, but the answer is no.  Remember, if we charge $14.67, our profit will be zero.  We just did all that work figuring that out.  So how do we maximize profit?

Well, we maximize profit by charging the price that the vertex of this parabola is at.  A parabola is the graph of a quadratic function.  Its vertex is the point where the graph “turns around” – for a parabola like this profit function, that is the maximum.

Luckily, we know that parabolas are symmetrical.  That means the maximum of our profit function is halfway between its two zeros.  Remember, the midpoint between a and b is \frac{a+b}{2}, so the location of the vertex of a parabola is always

\frac12 \left(\frac{-b+\sqrt{b^2-4ac}}{2a}+\frac{-b-\sqrt{b^2-4ac}}{2a}\right)=\frac12 \left(\frac{-b+\sqrt{b^2-4ac}-b-\sqrt{b^2-4ac}}{2a}\right)=\frac12 \left(\frac{-2b}{2a}\right)

=\frac{-b}{2a}

which means our profit is maximized at the price point \frac{-b}{2a}=\frac{-17,500}{-2200}\approx 7.95.  To maximize profit, then, we should charge $7.95 per widget.

But the work of a CEO is never really just that easy, is it?  Now we need to know, if we charge $7.95 per widget, how many widgets should we expect to sell?  Also, how much profit will we be expecting to make?

Recall that we defined q in terms of p before, so the number of widgets we should expect to sell is

q=15,000-1000p

q=15,000-1000(7.95)

q=15,000-7950=7050

which is pretty nice when you think about it.  Before we started doing all this quadratic formula stuff, we were charging $5 per widget, and we were selling 10,000 widgets per month.  So now we get to produce fewer widgets each month, and make more money doing less work!!!

But just how much more profit are we going to make?  Let’s evaluate the profit function \Pi at our price point of $7.95.

\Pi(7.95)=-1100(7.95)^2+17,500(7.95)-20,000

\Pi(7.95)=-1100(63.2025)+139,125-20,000

\Pi(7.95)=-69,522.75+119,125

\Pi(7.95)=49,602.25

I’ll leave it to you to verify that this is $9,000 more money than we would make charging $5 per widget, even though we made it by selling around 3000 fewer widgets!

Proof of the Quadratic Formula.

Now that we’ve seen a taste of how useful the formula can be, let’s have a look at why it works!

Let a,b,c, and x be real numbers, such that ax^2+bx+c=0.  Then the following is true:

x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

Proof. First, we start from the assumption that

ax^2+bx+c=0

and we subtract the expression \left(c-\frac{b^2}{4a}\right) from both sides:

ax^2+bx+c-\left(c-\frac{b^2}{4a}\right)=0-\left(c-\frac{b^2}{4a}\right)

ax^2+bx+\frac{b^2}{4a}=-c+\frac{b^2}{4a}

Then, we divide both sides of the equation by a:

x^2+\frac{b}{a}x+\frac{b^2}{4a^2}=-\frac{c}{a}+\frac{b^2}{4a^2}

Now, we recognize that

\left(x+\frac{b}{2a}\right)^2=x^2+\frac{b}{a}x+\frac{b^2}{4a^2},

which means we may write

\left(x+\frac{b}{2a}\right)^2=-\frac{c}{a}+\frac{b^2}{4a^2}

Now, taking the square root of both sides, we write

x+\frac{b}{2a}=\pm\sqrt{\frac{-c}{a}+\frac{b^2}{4a^2}}

Then, we clean up the expression in the radical a bit:

x+\frac{b}{2a}=\pm\sqrt{\frac{-4ac}{4a^2}+\frac{b^2}{4a^2}}

x+\frac{b}{2a}=\pm\sqrt{\frac{b^2-4ac}{4a^2}}

x+\frac{b}{2a}=\pm\frac{\sqrt{b^2-4ac}}{\sqrt{4a^2}}

x+\frac{b}{2a}=\pm\frac{\sqrt{b^2-4ac}}{2a}

Then, subtracting \frac{b}{2a} from both sides gives us

x=-\frac{b}{2a}\pm\frac{\sqrt{b^2-4ac}}{2a}

x=\frac{-b\pm\sqrt{b^2-4ac}}{2a},

which was what we set out to prove!

Mathematical Induction: Explained in Words and Demonstrated in Examples

Today we’ll be discussing one of the most important tools in a Mathematician’s toolbox: the Principle of Mathematical Induction.  In this article, we’ll use sigma notation, but beyond that, it’s all high school Algebra.  For the final three examples, we’ll use basic linear algebra, but all of the linear algebra tools you’ll need will be given to you.  First, we explain induction in words, then we demonstrate its use by proving a few theorems with it.  Then we’ll discuss when to use induction, what it’s good for and what it’s not-so-good for, and then we’ll finish with some more examples.

What is Induction?

You actually already know what induction is, because it’s sort of built into your brain.  So let’s look at the way it works in your innate wiring, first, then we’ll give it a more rigorous definition.

Imagine you just started working at a playing card factory, and you’re told you will need to gather all of the playing cards that are spades.  You’re also told that each machine in the factory has the following property: if the last card to come out of the machine is a spade, then the next card that comes out of the machine will also be a spade.

Now, as you wander through the factory, you see a machine, and just as you see it, the machine spits out a playing card.  You pick up the card.  It’s the ace of spades!  This means the next card to come out of the machine will also be a spade.  But you have a sharp brain, so you get a lot more out of this discovery than just the information that the next card will be a spade.  You conclude that every card this machine produces will be a spade!

This really doesn’t seem that far fetched, does it?  After all, if the next card the machine produces is a spade, that means the card after that will also be a spade; in turn, this implies the card after that one will also be a spade, ad infinitum.  So, we’ve taken two pieces of information, and from them we’ve concluded that every card the machine produces from this point on will be a spade.  The two pieces of information we used: this machine just produced a spade; and this machine follows the rule “spade now implies spade next.”

We can’t say anything for sure about the cards the machine produced before, but we know all the cards it produces from this point forward will be spades.  This is the essence of Mathematical Induction.

So, let’s define induction more rigorously.  Suppose there is a statement, S_n, which depends on a natural number n.  Then, the Principle of Mathematical Induction States that if:

A) The statement S_n is true when n=1, and

B) The truth of the statement S_n always implies the truth of the statement S_{n+1},

then the statement S_n is true for all integers n\geq 1.

So, in our machine example, the statement S_n is “the nth card produced is a spade,” and since the first card we looked at was the ace of spades, this means S_1 is true.  We’ve taken on faith that the machine always follows the rule “spade now implies spade next,” because that’s what we were told by the people who run the factory.  In an inductive proof, S_n would be a mathematical statement, and we would show mathematically that S_n\implies S_{n+1} (the symbol “\implies” is recognized internationally by mathematicians to represent implication).  Those two things are all that’s needed to prove S_n is true for all n\geq 1, that is, every card from now to infinity is a spade.

So let’s go ahead and use induction to prove that, for any r\not\in\{0,1\}, and any n\in\mathbb{N}

\sum\limits_{i=1}^{n}r^{i-1}=\frac{1-r^n}{1-r}

Base case: When n=1, the sum is r^{n-1}=r^{1-1}=r^{0}=1, and since r^n=r in this case, the numerator 1-r^n is equal to the denominator 1-r of the expression on the right.  So the expression on the right is just a fancy way of writing the number 1, and thus it’s equal to the sum.

Inductive step: Suppose for some fixed n\in\mathbb{N}, the statement

S_n\mbox{:}\sum\limits_{i=1}^{n}r^{i-1}=\frac{1-r^n}{1-r}

is true.  Then,

\sum\limits_{i=1}^{n+1}r^{i-1}=\sum\limits_{i=1}^{n}r^{i-1}+ r^{n}

\iff \sum\limits_{i=1}^{n+1}r^{i-1}=\frac{1-r^n}{1-r} +r^n

\iff \sum\limits_{i=1}^{n+1}r^{i-1}=\frac{1-r^n}{1-r} +\frac{(1-r)r^n}{1-r}

\iff \sum\limits_{i=1}^{n+1}r^{i-1}=\frac{1-r^n}{1-r} +\frac{r^n-r^{n+1}}{1-r}

\iff \sum\limits_{i=1}^{n+1}r^{i-1}=\frac{1-r^n+r^n-r^{n+1}}{1-r}

\iff \sum\limits_{i=1}^{n+1}r^{i-1}=\frac{1-r^{n+1}}{1-r},

is true as a consequence, which is equivalent to the statement S_{n+1}.   So we’ve shown S_n\implies S_{n+1}, and hence, by the principle of Mathematical Induction, S_n is true for every integer n\geq 1.

If you read the direct proof of this fact, which we published just a few days ago here, you’ll notice the inductive proof is quite a bit shorter.  However, you’ll also notice that some of the beauty is gone, because in an inductive proof, we don’t need to say why a fact is true, we can simply show that the fact is true.  But most of the time the reason a math fact is beautiful is all in the reason why.

A great example of the benefits and drawbacks comes from a Swiss second grade student…

The Benefits and Drawbacks of Using Induction

There is a well-known story in the math community about a young man by the name of Leonhard Euler.  Young Lenny had a teacher who needed to buy some time to get a little grading done, so he told the class to go ahead and work out the sum of all the integers from 1 to 100.  The poor teacher looked up just moments later, to his dismay, to see little Lenny had already worked out the answer.

“It’s 5050,” he said.  When asked how the boy had found the answer so quickly, young Euler (who would go on to become one of the greatest mathematicians of all time) explained:

“The sum of the first integer and the last is 101.  Also, the sum of the second integer and the second to last is 101.  Also, adding the third integer to the third from last integer yields 101.  In fact, you can take all 100 integers and pair them up this way, and you’ll have fifty pairs, with each having the same sum: 101.  So the sum of the first 100 integers is 50\times 101=5050.”

Of course that’s not verbatim but it’s basically the explanation he gave, according to popular legend, which was later formalized in the statement

\sum\limits_{i=1}^{n}i=\frac{n(n+1)}{2}

Now the way Euler thought about the problem and found a creative solution is what’s beautiful about the whole thing.  But you should note that writing a direct proof using the logic we’ve put into 2nd grade Euler’s mouth would actually result in a pretty cumbersome proof.

You’d likely need to write an odd case and an even case, and the notation would maybe get a little annoying if you’re speaking in terms of general n instead of picking a number such as 100, like we did.  Beyond that, the logic is creative enough that the proof might still leave the reader anxious to try it out on a few actual numbers before accepting it, if it’s their first time hearing of this fact.

But have a look at an inductive proof of the same fact:

Base case: When n=1, we have \frac{n(n+1)}{2}=\frac{2}{2}=1, which is in fact the sum.

Inductive step: Suppose for some fixed n\in\mathbb{N}, the statement

S_n\mbox{: } \sum\limits_{i=1}^{n}i=\frac{n(n+1)}{2}

is true.  Then,

\sum\limits_{i=1}^{n+1}i=\sum\limits_{i=1}^{n}i +(n+1)

\iff\sum\limits_{i=1}^{n+1}i=\frac{n(n+1)}{2}+(n+1)

\iff\sum\limits_{i=1}^{n+1}i=\frac{n(n+1)+2(n+1)}{2}

\iff \sum\limits_{i=1}^{n+1}i=\frac{(n+1)(n+2)}{2}

is true as a consequence, which is in fact the statement S_{n+1}.  Then, by the principle of Mathematical Induction, the statement S_n is true for every integer n\geq 1.

Not only is it compact and efficient, it’s convincing.  Again, though, reading this proof shares none of the beauty that went into the creation of the fact!  It also leaves the reader with no real sense of how similar facts might be motivated to come into the light.

All the induction does is shows us that the statement is true, it doesn’t get across why.  So, if you slave away at the chalkboard all day every day for months to find a theorem, once you find the theorem you can try using induction to prove it.  If you can do it, you might have just crystalized all of those pages upon pages of hard work into a proof that takes only a few lines to write.

There are reasons you might want to do this.  Perhaps you’re only interested in convincing your reader of the truth of your theorem, and you actually don’t want to “give away” the process you used to find it because you’re on the verge of repeating the process for a more profound theorem.

Or, suppose the method you used to find your theorem is so complicated that it really does take several pages of work to prove directly.  You’ll want to accompany your direct proof with an inductive proof, if possible, and probably put the inductive proof first.  Inductive proofs aren’t always shorter but they’re almost always much more convincing.  This is because if induction is the right tool for the job, an induction proof only has two “moving parts,” but often a direct proof has many, and if it’s creative, some of those are custom-made “moving parts.”

The more moving parts a machine has, the more things can go wrong with it.  You want your reader to feel like their time in reading your direct proof is justified.  If they read a short induction proof with an induction step justified by nothing more than simple algebra, they may be reassured that the fact is true, and maybe even become curious as to why.

Some examples from my own work.

I’ll be using induction here to prove three facts about sums of matrices which have popped up over the past few months in my research.  I know for sure the first is fairly well known; I never bothered to check if the other two are.  But I see no reason why somebody wouldn’t have already come across them.

Sometimes it really is less effort to find facts in the chalkboard than it is in a journal.  Just make sure you give them a few tests before you rest any weight on them.  For these sorts of facts, induction is a pretty good test, and they pass.

What you’ll need to know about matrices: You don’t even need to remember how to multiply matrices to understand these proofs.  You’ll need to know

1) Identity. In the world of numbers, there is only one identity, and we call it “1“.  But in the world of matrices, there are infinitely many identities, and we refer to whichever one makes sense with the symbol “I“.  All identity means here is that multiplying the matrix A by the identity matrix I results in the matrix A again, for all choices of the matrix A.

2) Inverse.  Every number has an inverse, except 0.  We write the inverse of a as \frac{1}{a}. With matrices, there are infinitely many matrices which don’t have inverses (they have determinants of zero), but if the matrix A has an inverse it’s written A^{-1}, and it has only one. Multiplying a number or matrix by its inverse always results in an identity.

3) Matrix multiplication doesn’t commute.  In the world of numbers, xy=yx for all x,y; but in the world of matrices, AB\neq BA, at least, not for most choices of matrices A,B.

Suppose the square matrix P has real entries, and that Det(P),Det(I-P)\neq 0.  Then

\mbox{Statement }A_k\mbox{) }\sum\limits_{i=1}^{k}P^{i-1}=(I-P)^{-1}(I-P^k)

and

\mbox{Statement }B_k\mbox {) }(I-P)^{-1}(I-P^k)=(I-P^k)(I-P)^{-1}.

Base case.  For the case k=1, the sum on the left hand side of A_k is simply I, and noting that P^k=P, and invoking the definition of an inverse, the right hand side is

(I-P)^{-1}(I-P^k)=(I-P)^{-1}(I-P)=I

The same logic gives us

(I-P^k)(I-P)^{-1}=(I-P)(I-P)^{-1}=I

so both of the equations are true when k=1.

Inductive step. Suppose for some fixed k\in\mathbb{N}, the statement A_k is true.  Then

\sum\limits_{i=1}^{k}P^{i-1}=(I-P)^{-1}(I-P^k),

and since

\sum\limits_{i=1}^{k+1}P^{i-1}=\sum\limits_{i=1}^{k}P^{i-1}+P^k,

we may write

\sum\limits_{i=1}^{k+1}P^{i-1}=(I-P)^{-1}(I-P^k)+P^k.

Then, multiplying P^k from the left by I=(I-P)^{-1}(I-P) gives us

\sum\limits_{i=1}^{k+1}P^{i-1}=(I-P)^{-1}(I-P^k)+(I-P)^{-1}(I-P)P^k

\iff\sum\limits_{i=1}^{k+1}P^{i-1}=(I-P)^{-1}\left((I-P^k)+(I-P)P^k\right)

\iff\sum\limits_{i=1}^{k+1}P^{i-1}=(I-P)^{-1}\left(I-P^k+P^k-P^{k+1}\right)

\iff\sum\limits_{i=1}^{k+1}P^{i-1}=(I-P)^{-1}\left(I-P^{k+1}\right),

which happens to be exactly the statement A_{k+1}.  Hence, we’ve shown A_k\implies A_{k+1}.  Now suppose the statement B_k is true for the same k.  Then, since A_k is also true, we have

\sum\limits_{i=1}^{k}P^{i-1}=(I-P^k)(I-P)^{-1}

and since

\sum\limits_{i=1}^{k+1}P^{i-1}=\sum\limits_{i=1}^{k}P^{i-1}+P^k,

we may write

\sum\limits_{i=1}^{k+1}P^{i-1}=(I-P^k)(I-P)^{-1}+P^k.

Then, multiplying P^k from the right by I=(I-P)(I-P)^{-1}, we get

\sum\limits_{i=1}^{k+1}P^{i-1}=(I-P^k)(I-P)^{-1}+P^k(I-P)(I-P)^{-1}

\iff \sum\limits_{i=1}^{k+1}P^{i-1}=\left((I-P^k)+P^k(I-P)\right)(I-P)^{-1}

\iff\sum\limits_{i=1}^{k+1}P^{i-1}=\left(I-P^k+P^k-P^{k+1})\right)(I-P)^{-1}

\iff\sum\limits_{i=1}^{k+1}P^{i-1}=\left(I-P^{k+1})\right)(I-P)^{-1}.

Now, we’ve already shown A_k\implies A_{k+1}, so this means

(I-P)^{-1}(I-P^{k+1})=\left(I-P^{k+1}\right)(I-P)^{-1},

which is the same as statement B_{k+1}.  Then, we’ve shown that (A_k \wedge B_k)\implies (A_{k+1} \wedge B_{k+1}).

Hence, by the principle of Mathematical Induction, the statements A_k and B_k are both true for all integer values k\geq 1.

The fact proven above is used fairly often, although it might take some searching if you want to find a proof of it online, in a journal, or in a textbook.  I needed an expression for the partial sum of a geometric series of a matrix, though, and I was at least able to find the fact, even if I couldn’t find a proof of it right away.

But I also needed similar expressions for the partial sums I’m addressing below, and couldn’t find them anywhere.  After searching a while, I decided to start looking for them in an empty chalk board.  I found them, and I proved them directly.  These facts give us an excellent opportunity to demonstrate just how much more convincing an induction proof can be than a direct proof, at least in some cases, as you’ll understand when you see the direct proof of these two facts.

I’ll share the direct proofs of these facts in the coming weeks on this blog, but for now, for your enjoyment, I present you with the much easier (and shorter) proofs by induction.

Let P be a square matrix such that Det(P), Det(I-P)\neq 0.  Then for any k\in\mathbb{N}, the following statement is true:

\mbox{Statement }S_k\mbox{) }\sum\limits_{i=1}^{k}iP^{i-1}=(I-(k+1)P^k+kP^{k+1})(I-P)^{-2}

Proof (by induction): Base case – in the case of k=1, the left hand side of the equation is I.  The right hand side is

(I-2P+P^2)(I-P)^{-2}=(I-P)(I-P)(I-P)^{-1}(I-P)^{-1}

\iff (I-2P+P^2)(I-P)^{-2}=(I-P)I(I-P)^{-1}

\iff (I-2P+P^2)(I-P)^{-2}=(I-P)(I-P)^{-1}

\iff (I-2P+P^2)(I-P)^{-2}=I,

and hence, the statement S_1 is true.

Inductive step: Suppose S_k is true for some fixed k\in\mathbb{N}.  This means

\sum\limits_{i=1}^{k}iP^{i-1}=(I-(k+1)P^k+kP^{k+1})(I-P)^{-2},

and because 

\sum\limits_{i=1}^{k+1}iP^{i-1}=\sum\limits_{i=1}^{k}iP^{i-1}+(k+1)P^{k},

we may then write

\sum\limits_{i=1}^{k+1}iP^{i-1}=(I-(k+1)P^k+kP^{k+1})(I-P)^{-2}+(k+1)P^k.

Now, as was shown in the base case, (I-P)^{2}(I-P)^{-2}=I, hence we can multiply the last term, (k+1)P^k, by (I-P)^{2}(I-P)^{-2} without changing the expression on the right hand side of the equation.  We can multiply any matrix by I from either side without changing it, and here we’ll multiply from the right:

\sum\limits_{i=1}^{k+1}iP^{i-1}=(I-(k+1)P^k+kP^{k+1})(I-P)^{-2}+(k+1)P^k(I-P)^2(I-P)^{-2}

and now we’ll pull out a common factor of (I-P)^{-2} on the right of the term in square brackets:

\sum\limits_{i=1}^{k+1}iP^{i-1}=[I-(k+1)P^k+kP^{k+1}+(k+1)P^k(I-P)^2](I-P)^{-2}

We can write out the term (I-P)^2=(I-2P+P^2), and then distribute the term (k+1)P^k across it:

\sum\limits_{i=1}^{k+1}iP^{i-1}=[I-(k+1)P^k+kP^{k+1}+(k+1)P^k(I-2P+P^2)](I-P)^{-2}

\iff\sum\limits_{i=1}^{k+1}iP^{i-1}=[I-(k+1)P^k+kP^{k+1}+(k+1)P^{k}-

\hspace{30pt} -2(k+1)P^{k+1}+(k+1)P^{k+2}](I-P)^{-2}

Then we collect like terms:

\sum\limits_{i=1}^{k+1}iP^{i-1}=[I-(k+2)P^{k+1}+(k+1)P^{k+2}](I-P)^{-2}

But this is, in fact, the statement S_{k+1}, so we’ve shown S_k\implies S_{k+1}.

Then, by the principle of Mathematical Induction, the statement S_k is true for all k\in\mathbb{N}.

The proof is similar for the fact that

\sum\limits_{i=1}^{k}iP^{i-1}=(I-P)^{-2}(I-(k+1)P^k+kP^{k+1}),

which we leave the reader to verify.

Let P be a square matrix such that Det(P), Det(I-P)\neq 0.  Then for any k\in\mathbb{N}, the following statement is true:

\mbox{ Statement }S_k\mbox{) }

\sum\limits_{i=1}^{k}i^2P^{i-1}=(I+P-(k+1)^2P^{k}+(2k^2+2k-1)P^{k+1}-k^2P^{k+2})(I-P)^{-3}

Proof (by induction)(Base case) In the case of k=1, the left hand side is I.  The right hand side is

(I+P-4P+3P^2-P^3)(I-P)^{-3}=(I-3P+3P^2-P^3)(I-P)^{-3}=

=[(I-2P+P^2)(I-P)](I-P)^{-3}=(I-P)^{3}(I-P)^{-3}=I,

and hence, S_1 is true.

Inductive step: Consider that, for any natural k, we have

\sum\limits_{i=1}^{k+1}i^2P^{i-1}=\sum\limits_{i=1}^{k}i^2P^{i-1}+(k+1)^2P^{k}

Now suppose the statement S_k is true for some fixed k\in\mathbb{N}.  We may then rewrite the above as

\sum\limits_{i=1}^{k+1}i^2P^{i-1}=(I+P-(k+1)^2P^{k}+(2k^2+2k-1)P^{k+1}-k^2P^{k+2})(I-P)^{-3}+(k+1)^2P^k

and then, since (I-P)^{3}(I-P)^{-3}=I, we multiply the last term on the right hand side by (I-P)^{3}(I-P)^{-3} without changing the value of the right hand side.  This gives us

\sum\limits_{i=1}^{k+1}i^2P^{i-1}=(I+P-(k+1)^2P^{k}+(2k^2+2k-1)P^{k+1}-k^2P^{k+2})(I-P)^{-3}+(k+1)^2P^k(I-P)^3(I-P)^{-3}

from here, we factor out (I-P)^{-3} from the right to get

Equation 1:

\sum\limits_{i=1}^{k+1}i^2P^{i-1}=[(I+P-(k+1)^2P^{k}+(2k^2+2k-1)P^{k+1}-

-k^2P^{k+2})+(k+1)^2P^k(I-P)^3](I-P)^{-3}

Now, to unclutter our workspace, we will examine the following expression in isolation, and return to Equation 1 (above) after a moment.

(k+1)^2P^k(I-P)^3=(k+1)^2P^k(I-3P+3P^2-P^3)=

=(k+1)^2P^k-3(k+1)^2P^{k+1}+3(k+1)^2P^{k+2}-(k+1)^2P^{k+3}

Incorporating this into equation 1 gives us

\sum\limits_{i=1}^{k+1}i^2P^{i-1}=[(I+P-(k+1)^2P^{k}+(2k^2+2k-1)P^{k+1}-k^2P^{k+2})+

+(k+1)^2P^k-3(k+1)^2P^{k+1}+3(k+1)^2P^{k+2}-(k+1)^2P^{k+3}](I-P)^{-3},

which certainly looks intimidating, until you collect like terms and simplify:

\sum\limits_{i=1}^{k+1}i^2P^{i-1}=[(I+P+(2k^2+2k-1-3(k+1)^2)P^{k+1}+

+(3(k+1)^2-k^2)P^{k+2})-(k+1)^2P^{k+3}](I-P)^{-3}

 

\iff\sum\limits_{i=1}^{k+1}i^2P^{i-1}=[(I+P+(2k^2+2k-1-3k^2-6k-3)P^{k+1}+

+(3k^2+6k+3-k^2)P^{k+2})-(k+1)^2P^{k+3}](I-P)^{-3}

 

\iff\sum\limits_{i=1}^{k+1}i^2P^{i-1}=[(I+P+(-k^2-4k-4)P^{k+1}+

+((2k^2+4k+2)+(2k+2)-1)P^{k+2})-(k+1)^2P^{k+3}](I-P)^{-3}

 

\iff\sum\limits_{i=1}^{k+1}i^2P^{i-1}=[(I+P-(k+2)^2P^{k+1}+

(2(k+1)^2+2(k+1)-1)P^{k+2})-(k+1)^2P^{k+3}](I-P)^{-3}

which is none other than the statement S_{k+1}.  Hence, we’ve shown S_k\implies S_{k+1}.

Then, by the principle of Mathematical Induction, we conclude that the statement S_k is true for all k\in\mathbb{N}.

A similar proof leads us to conclude that it doesn’t matter from which side we multiply the longer expression by (I-P)^{-3}.

The Proof that Sparked my Love of Math

Here, we’ll prove that, if r is a real number between 0 and 1,

r^0+r^1+r^2+r^3+\cdots=\frac{1}{1-r}.

(It’s true more generally as well, but we are only proving it for r\in(0,1))

This proof is written for students who are basically familiar with high school Algebra.  However, we use a system of notation called “sigma notation” such students might be unfamiliar with.  It’s really not very complicated, so we’ll give you a crash course right now.

A Crash Course in Sigma Notation

It might look a little intimidating, but it’s really not so bad.  Suppose we are adding 1+2+3+4+5.  We could write this in many ways, and below, we’ve written two of them, in the form of an equation:

1+2+3+4+5=\sum\limits_{i=1}^5i

On the right hand side of the equals sign, you’ll see a large, capital sigma (“\sum“).  Below the sigma is a little equation, which tells you what the variable of summation is (in this case we choose “i,” but really any letter works) and also shows what value the variable has at the beginning.  Above the sigma is the number we will stop summing at.  Then, just to the right of the sigma is the expression we’re summing.  In this example, the expression is “i,” but it can be any expression.

The idea is to evaluate the expression for the first value we’re given (under the sigma), then add that to the expression evaluated at the next integer greater than that, then add that to the expression evaluated at one value greater than that, and so on, until we’ve evaluated the expression with the variable equal to the value above the sigma, and then stop.

More examples should get you in the swing of it:

\sum\limits_{i=1}^5i^2=1+4+9+16+25

 \sum\limits_{i=1}^52^i=2+4+8+16+32

Make sense?  You can see how useful this can be if we have a really long sum we want to work with.  It’s just a more compact way of working with sums.

One more note on sums.  We sometimes call a sum that can be written this way a “series.” When we do, and when the number above the sigma is the \infty symbol, we call the series an “infinite series” because summation never stops.  Surprisingly, there are many infinite series which have finite values.  We’ll show that geometrically next, for a series we call the “geometric series.” But just note: when we look at infinite series, it’s often helpful to look at the first n terms of the sum.  So, you’ll see the phrase “nth partial sum” a lot, and that’s what that phrase means – it means we are looking at the sum of the first n terms.

The “Geometric Series” Explained Geometrically

So, it might be hard to believe that we can have an infinite sum with a finite value.  But I’ll convince you of that with a visual argument.  Imagine we have drawn a square.  Now, let’s say the square has an area of 1.  Then, we cut the square in half, right down the middle.  Each half has an area of 0.5.  But wait!  Now we cut the right half in half, by drawing another line right down the middle. Each half of the half has an area of 0.25, so the total area of the segments of the square is 1=0.5+0.25+0.25.  But let’s again cut the rightmost half of a half in half.  So now we have a half square, a quarter square, and two eighth squares, with a total area of 1=0.5+0.25+0.125+0.125.

You can see that we can keep doing this as long as we like, and in fact, in a theoretical world, we can do it infinitely many times.  Now, let’s name the segments of our square; we’ll name them after numbers.  The leftmost segment is segment 1, the second segment from the left is segment 2, the third is segment 3, and so on.  I think you’ll agree with me that the area of segment i is \left(\frac{1}{2}\right)^i.  Then, since we’ve already established the area of the whole square is 1, we may write

1=\sum\limits_{i=1}^{\infty}\left(\frac{1}{2}\right)^i=0.5+0.25+0.125+0.0625+\cdots

and you’ve just shown yourself visually that an infinite sum can have a finite value.

Now if you like, you can repeat this imagination experiment, this time cutting the square into two sections of unequal length, maybe the one on the left is two-thirds of the square, et cetera.

But I’d like to move on now to the proof I’m itching to show you… I want to prove

\sum\limits_{i=1}^{\infty}r^{i-1}=\frac{1}{1-r},

and I’ll start by proving

\sum\limits_{i=1}^{n}r^{i-1}=\frac{1-r^n}{1-r}.

So, it’s going to help us out if we give a name to the nth partial sum of this series.  Let’s call it S_n, and we’ll write a mathematical definition of it:  Let n be some natural number, then

S_n=\sum\limits_{i=1}^{n}r^{i-1}=r^0+r^1+r^2+\cdots+r^{n-2}+r^{n-1}

We note that any real number taken to the power 0 is 1, that is, r^0=1, so we write

S_n=1+r^1+r^2+\cdots+r^{n-2}+r^{n-1},

and let’s go ahead and multiply both sides of that equation by r.

rS_n=r\left(1+r^1+r^2+\cdots+r^{n-2}+r^{n-1}\right)

\iff rS_n=(r)1+(r)r^1+(r)r^2+\cdots+(r)r^{n-2}+(r)r^{n-1}

\iff rS_n=r+r^2+r^3+\cdots+r^{n-1}+r^{n}

Hey, what the heck?! That looks pretty familiar!  Let’s add 1 to both sides… then you should recognize the right hand side from our mathematical definition of S_n evaluated at n+1:

1+rS_n=1+r+r^2+r^3+\cdots+r^{n-1}+r^n

\iff 1+rS_n= S_{n+1}

I have a feeling that equation is going to come in handy, so let’s call it “equation 1.” I’ll write it again below in red so you can find it easier later:

Equation 1: 1+rS_n= S_{n+1}

Now let’s look at something that might seem a little obvious: what is the difference between S_{n+1} and S_{n}?

S_{n+1}-S_n=\left(1+r+r^2+\cdots+r^{n-1}+r^{n}\right)-\left(1+r+r^2+\cdots+r^{n-1}\right)

\iff S_{n+1}-S_n= r^n

Now we’re getting somewhere.  Okay, let’s rearrange the terms a bit and we’ll write another important equation (the one we literally just found), which we’ll call “equation 2”

Equation 2: S_{n+1}=S_n+r^{n}

It seems like we’re done hammering together the tools we need, here.  Let’s combine equations 1 & 2, now.  Since equation 1 tells us 1+rS_n=S_{n+1}, which happens to be the subject of equation 2, we may set the left side of equation 1 equal to the right side of equation 2, like so:

1+rS_n=S_n+r^{n}

We’ll do a little algebra on this equation.  Subtracting 1+S_n from both sides gives us

rS_n-S_n=r^{n}-1

and multiplying both sides by -1 gives us

S_n-rS_n=1-r^{n}.

Then we pull out the common factor on the left hand side

S_n\left(1-r\right)=1-r^{n}

and divide both sides by (1-r), [which we can do because we know (1-r)\neq 0 because r\neq 1 because r\in (0,1)]

S_n=\frac{1-r^{n}}{1-r}

Holy smokes, you guys!!! That’s exactly what we were trying to prove!!!  I can rewrite it, recalling the definition of S_n:

\sum\limits_{i=1}^{n}r^{i-1}=\frac{1-r^n}{1-r}

The rest of the proof is all about taking the limit of the partial sum as n\to\infty, that is, if we take the partial sum for increasingly large values of n, what happens to the expression of the partial sum?

There is a limit law that states the limit of a sum is the sum of limits of the addends.  There’s another limit law that states the limit of a product of a variable expression with a constant expression is the product of the constant with the limit of the variable expression.

Today, we’ll skip over the explanation of these limit laws – they’re the first thing you learn when you begin to learn Calculus, and this article isn’t intended to teach calculus.  For now, just take my word that we can use limit laws, combined with the partial sum expression we just found, to do the following…

\sum\limits_{i=1}^{\infty}r^{i-1}=\lim\limits_{n\to\infty}\sum\limits_{i=1}^{n}r^{i-1}=\lim\limits_{n\to\infty}\frac{1-r^n}{1-r}

\iff \sum\limits_{i=1}^{\infty}r^{i-1}=\frac{1-\lim\limits_{n\to\infty}r^n}{1-r}

For the same reason we didn’t go too deep into limit laws, we’ll just point out there is a theorem that states, if r\in(0,1) then \lim\limits_{n\to\infty}r^n=0, without going into too much detail about why this is true.  Now we can finally write

\sum\limits_{i=1}^{\infty}r^{i-1}=\frac{1}{1-r}

 

Hey wait a minute!!!  In the green section, we found that

\sum\limits_{i=1}^{\infty}\left(\frac{1}{2}\right)^i=1,

and according to what we just found, it should be 2!!! What is going on here?

I’ll write down an equation for you to puzzle over for a minute.  If you see why the below statement is true, that should clear up any issues.

1+\sum\limits_{i=1}^{\infty}\left(\frac{1}{2}\right)^i=\sum\limits_{i=1}^{\infty}\left(\frac{1}{2}\right)^{i-1}

Proof that the Normal pdf integrates to 1

We present here one of the most beautiful proofs in Mathematics.  The reason it’s so gorgeous: outside-the-box thinking.  The move that’s unexpected: squaring the integral and using Fubini’s Theorem to turn it into a three-dimensional problem allows us to learn about the square of the integral, and we can then use that information to draw a conclusion about the integral we’re really interested in.

This version of the proof is written for people who are mathematically inclined, but perhaps a bit uncomfortable with multivariable calculus.  The assumption is that the reader is at least comfortable with the “trick” commonly called a “u-substitution.”  This version of the proof is wordy.  For a more straight-forward (but perhaps a bit less entertaining) version, check back here for a link.  We’ll be posting it shortly.)

Two concepts from multivariate calculus will need to be used, and both are fairly simple.  First, what is Fubini’s Theorem?  Suppose we have a function f(x), and another function g(y).  Then Fubini’s Theorem allows us to write:

\int\limits_{a}^{b}\int\limits_{c}^{d} f(x)g(y)dydx = \left(\int\limits_{a}^{b} f(x)dx\right)\left(\int\limits_{c}^{d}g(y)dy\right)

You can see how helpful this is, as it allows us to go from a multiple integral to a single integral.  But note: here, we’ll use it “backwards” to its most common use, to go from a single integral to a multiple integral.  Here is the integral we’d like to evaluate:

\int\limits_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx

Note that we are hoping to show that this integral evaluates to 1.  That means we’re trying to prove the equivalent of

\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx=\sqrt{2\pi}\sigma

Now it’s important to notice that the integrand here is always greater than zero.  This means that if the integral converges to a finite value, it converges to a value greater than zero.  Hence, we square both sides of the above equation, and we get the below, which implies and is implied by the above:

\left(\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx\right)^2=2\pi\sigma^2

Now we’ll go ahead and use Fubini’s Theorem.

\left(\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx\right)\left(\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx\right) = \left(\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx\right)\left(\int\limits_{-\infty}^{\infty}e^{-\frac{(y-\mu)^2}{2\sigma^2}}dy\right)

\iff \left(\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx\right)^2=\int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}} e^{-\frac{(y-\mu)^2}{2\sigma^2}}dxdy = 2\pi\sigma^2

Note that we are still simply restating what we wish to prove.  We haven’t started to prove it yet.  But we have learned that if we can prove

\int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}} e^{-\frac{(y-\mu)^2}{2\sigma^2}}dxdy = 2\pi\sigma^2,

then we’ve proven

\int\limits_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx=1.

Now we’ll use the other concept from multivariate calculus.  If you’re familiar with u-substitution, where we set u=f(x) and find du=f'(x)dx, this should make pretty easy sense to you.  It’s called the Jacobian of a transformation.  Here, we are going to transform the integral from an integral in Cartesian coordinates into an integral in Polar coordinates.

To make it more clear what’s going on here, you need to visualize what we’re doing.  If you’re used to single-variable integration, you know that a single integral represents the area under the curve described by the integrand.  More accurately, it’s the area between the curve and the axis of the variable of integration.

Now, when we have a function of two variables as an integrand and we’re integrating both variables, the function describes a surface instead of a curve.  So the integral is actually the volume under the surface.  More accurately, it is the volume between the surface and the xy-plane.

So what does this surface look like?  The whole surface is above the xy-plane, and it is shaped a bit like a bell curve (in cross-section), and it is radially symmetrical about the point (\mu,\mu), which is its global maximum.  Here’s a picture:

normnorm

Evaluating the double integral above the way it’s written means evaluating first across the entire x-axis for each infinitesimal portion of the y-axis, from negative \infty to positive \infty, and doing that infinitely many times across the entire y-axis.  We propose a better way:  let’s still evaluate over the entire xy-plane, but instead of doing it in that order, let’s do it using infinitesimally thin, concentric rings, where the center of each ring is the point (\mu, \mu).

Here is where the transform happens.  We write

x = r\cos\theta+\mu; y= r\sin\theta+\mu; dxdy=rdrd\theta

We mentioned that using the Jacobian is something like doing a u-substitution.  In fact, many students of multivariate calculus get by just fine without ever truly learning how it is different from one.  A later article will explain this in greater depth.  Just know that we need to replace dxdy with rdrd\theta, and not with drd\theta as one might expect.  I trust the other substitutions make pretty easy sense.  So, rewriting our double integral, we get

\int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}} e^{-\frac{(y-\mu)^2}{2\sigma^2}}dxdy = \int\limits_{0}^{2\pi}\int\limits_{0}^{\infty}e^{-\frac{(r\cos\theta)^2}{2\sigma^2}} e^{-\frac{(r\sin\theta)^2}{2\sigma^2}}rdrd\theta = \int\limits_{0}^{2\pi}\int\limits_{0}^{\infty}e^{-\frac{r^2\cos^2\theta+r^2\sin^2\theta}{2\sigma^2}} rdrd\theta

\iff\int\limits_{0}^{2\pi}\int\limits_{0}^{\infty}e^{-\frac{r^2(\cos^2\theta+\sin^2\theta)}{2\sigma^2}} rdrd\theta=\int\limits_{0}^{2\pi}\int\limits_{0}^{\infty}e^{-\frac{r^2}{2\sigma^2}} rdrd\theta

Now it’s as simple as applying Fubini’s Theorem again the way it’s normally used:

\int\limits_{0}^{2\pi}\int\limits_{0}^{\infty}e^{-\frac{r^2}{2\sigma^2}} rdrd\theta = \int\limits_{0}^{2\pi}d\theta\int\limits_{0}^{\infty}e^{-\frac{r^2}{2\sigma^2}} rdr = \left.\theta\right|_{0}^{2\pi}\int\limits_{0}^{\infty}e^{-\frac{r^2}{2\sigma^2}} rdr=2\pi\int\limits_{0}^{\infty}e^{-\frac{r^2}{2\sigma^2}} rdr

And it’s a simple matter of integrating in one variable.  We’ll use the u-substitution u=\frac{r^2}{2\sigma^2}\implies du=\frac{r}{\sigma^2}dr, so we are now evaluating

2\pi\frac{\sigma^2}{\sigma^2}\int\limits_{0}^{\infty}e^{-\frac{r^2}{2\sigma^2}} rdr=2\pi\sigma^2\int\limits_{0}^{\infty}e^{-\frac{r^2}{2\sigma^2}} \frac{r}{\sigma^2}dr=2\pi\sigma^2\int\limits_{0}^{\infty}e^{-u} du=2\pi\sigma^2\left(\left.-e^{-u}\right|_{0}^{\infty}\right)

=2\pi\sigma^2\left(\left(\lim\limits_{u\to\infty}-e^{-u}\right)-(-e^0)\right)=2\pi\sigma^2(0+1)=2\pi\sigma^2

Wonderful!  Going back and putting together all of this work allows us to write:

\left(\int\limits_{-\infty}^{\infty}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx\right)^2=2\pi\sigma^2,

which is equivalent to what we set out to prove, as was shown at the beginning of the proof.

We need to talk about the math behind measles clusters…

When I first started writing this article, the goal was simple. I just wanted to explain why it’s not so surprising that the measles clusters we’ve had in the United States these past few years have had around 8%-10% of patients who were vaccinated before they fell ill. It’s a bit of a shock, at first, to see that figure. The more I investigated the math behind it, the more I realized that it actually is an unexpected figure, and now I’m interested in explaining why that is. It means we need to consider the consequences of vaccinating and not vaccinating more thoroughly than we seem to be doing right now.

See, as a person who’s well-acquainted with the math surrounding probability in biology, when I see the figure of 8%-10%, I don’t see it as unusually high. But I understand why someone would. So let me explain that first. The MMR vaccine is well known to be 97.5% effective at preventing susceptibility to measles infection when properly administered. That means that when you administer the vaccine to someone, there is a 97.5% probability that person will become immune to measles; it also means there is a 2.5% probability that person will not become immune to measles. So in the real world, if you have 50 vaccinated kids and you expose them all to measles, you should expect one of those vaccinated kids to become infected.

Of course, if you have 50 unvaccinated kids and you expose them all to measles, you should expect 50 of them to become sick.  Just to be clear, when I say “expose them” what I mean is an event that would certainly cause an unvaccinated person to contract the measles.  So, if we have 50 vaccinated kids and 50 unvaccinated kids, and we expose all 100 kids to measles, we can expect 51 kids to come down with the measles. Let’s change the ratios a bit. Suppose we have 91 vaccinated kids and 9 unvaccinated kids. We expect ~2.5% of the vaccinated kids (we’ll round that down to 2 kids) to become ill. And we expect 9 of the unvaccinated kids to become ill. So in total, we have a measles cluster of 11 kids, and 2 of them (that’s around 18%) are kids that were vaccinated before they became infected.

Notice that we did this math with a 97.5% effectiveness of the MMR vaccine, and we also assumed a 91% vaccination rate. The CDC actually reports that, in the age groups of a majority of the measles patients we’ve seen in the recent clusters, the national vaccination rate is 91%; also, it is well-known that the MMR vaccine is 97.5% effective. So actually, we really should expect about 20% of measles patients to be patients that were vaccinated before they became infected. (Why 20% and not 18%? Remember we rounded down to 2 kids, if we don’t do that the real expectation becomes about 20%)

Why is this concerning? Well, let’s examine what would need to be different in order for the expectation to be a lower proportion, like the observed 8%-10%. We know from clinical studies that the MMR vaccine is 97.5% effective at preventing measles susceptibility. But what if this were not the case? If, for example, the MMR vaccine were less effective, say it’s 90% effective, then we would actually expect the proportion of vaccinated measles patients to be even higher than what we calculated above. In fact, even such a seemingly small difference in the effectiveness of the MMR vaccine would more than double the proportion we expect. With a 90% effectiveness, we would expect more than half of measles patients to be prior vaccinated individuals. So we know that the unexpected observation is not a result of the MMR vaccine being less effective than the studies indicate. In fact, if the 8%-10% figure indicates something about the effectiveness of the vaccine, then it indicates the vaccine is more effective than the studies show, not less. But I’m not claiming that figure reflects anything about the effectiveness of the vaccine – the effectiveness question is settled.

So let’s examine the other thing that could change the observed proportion of measles patients who were vaccinated prior to falling ill. That is, let’s look at the vaccination rate. The CDC estimate is 91%. But what if that figure were lower? Well, as you saw when we were supposing 50 vaccinated kids and 50 unvaccinated kids were all exposed to measles, we expect 1 sick vaccinated kid and 50 sick unvaccinated kids, so that’s an expected ~2% of measles cases that are prior vaccinated. That’s ten times lower than the ~20% expectation we got using the 91% vaccination rate. So we can see how lowering the vaccination rate to 50% would lower the proportion of vaccinated kids in the measles clusters. Notice also, with the 91% vaccination rate, we expect 11 kids to be infected – and with the 50% vaccination rate we’re toying with, we expect 51 kids to be infected. So, decreasing the vaccination rate has two effects – it causes larger clusters, and it also causes a lower proportion of vaccinated kids in those clusters. This makes sense when you think about it. If 100% of kids were vaccinated, then of course, any measles cluster we might see would consist of 100% vaccinated kids.

So why in the world would the vaccination rate the CDC is reporting be higher than the real vaccination rate? Well, I’m not actually suggesting that it is. What I’m suggesting is that the rate the CDC is reporting is nationwide, and it does not account for the way people network socially. Think about this. In your city, there are probably many more people you’ve never met than there are people you have met. And the people you encounter every day aren’t always a random sample from the population of the city. If you don’t have a job dealing with the public, then you probably have a pretty small group of individuals with which you interact on a daily basis.  Also note: if you are a child enrolled in primary school, your network is even smaller, mostly consisting of other children at your school, teachers, and importantly, family members.

So what I’m pointing at here, is that each person’s network has its own vaccination rate. And it would seem that where these measles clusters are popping up, the networks have a lower vaccination rate than what the CDC reports nationwide for all people in the United States. What does this mean? I’ll step out onto a limb and claim this: it means that if you don’t vaccinate your kids, you are more likely to be friends with other people who don’t vaccinate their kids; it means that your kids are more likely to be playing with other unvaccinated kids. I’m not saying that’s the case for every unvaccinated kid. What I’m proposing is the data seem to indicate that this is what’s going on, by and large.

Just how much lower is the network vaccination rate for the social networks where measles clusters have popped up? Well, the fun thing about the math we’ve been doing in this article is that we can use it to find out an estimate of the answer to that question!!! Let’s do it by using basic high school algebra. If the vaccination rate is R then the proportion of sick kids who were vaccinated before they got sick is

P

(The numerator is the proportion of the whole population that is vaccinated and also not immune to measles.  The denominator is the sum of the proportion of the population that is not vaccinated and the numerator.)

We can solve for R in terms of P:

math

So if we are actually observing P=0.09 (we’ll pick a number in the middle of the confidence interval the CDC gives us of 8%-10%), that would mean the network vaccination rate, on average, for the clusters we’ve seen, is

numerical

So in conclusion, we estimate the network vaccination rate is around 79.82% for the people in the clusters.  This is around 11% lower than the national rate.

This is that concern we should all have that I mentioned at the beginning of the article. Whether you are anti-vaxx, or just a normal person, this should concern you thoroughly. “Cluster” is a good word for the groups of people who have become ill with measles in the past year or so in this nation. “Cluster” is also a great word for how antivaxxers exist – they do not just pop up in isolation. Antivaxxers move in packs, and the communities in which they live suffer much less effective herd immunity than well-vaccinated communities. As we saw in the numbers we ran above, they bring down the effective vaccination rate of the communities in which they live by something like 11%, as an estimate derived from real data from the CDC. That’s a big deal. We shouldn’t have this problem in a nation like the United States. We need to reconsider the consequences of tolerating antivaxxers in our communities, and especially in our public schools.

A tale of deceit, betrayal and murder: the origin of the Pythagorean Theorem

The Pythagorean Theorem is named, ironically, for Pythagoras, a Greek Philosopher and Mathematician. Pythagoras was certainly a smart guy, but his biggest blunder is one we should all learn from. There is some evidence to suggest it resulted in a murder to prevent its discovery.

Pythagoras went on a journey to Babylonia and then to Egypt through much of his life, learning everything he could in every temple he found along the way. When he came back to his hometown, he found too few people interested in his philosophies and theorems, and decided to settle down in a Greek colony in Italy, called Croton. There, he formed a “school” (cult), which revered the integers as either spirits or gods. Yes, that’s right – the integers themselves were worshiped, or at least prayed to.

Everything in the Universe, in the Pythagorean school of thought, could be understood as either an integer (a pure incarnation of one of these spirits) or as a ratio of integers (a mixture or a child of two of them). Thus everything had some divine essence, and that essence could be understood by learning about the ratios involved in it. This spiritual system was so well developed that it presented Pythagoras with some difficulty when he really started looking at the theorem we now call the Pythagorean Theorem.

It may very well be true that Pythagoras brought the Pythagorean Theorem home to the Greeks for the first time, though it had been known to the Babylonians for at least a millennium by the time he did. But the problem Pythagoras faced is the problem this theorem gives us when we ask the question “What is the ratio of the side of a square to the diagonal of the square?”

According to the Pythagorean Theorem, this ratio is √2. But wait… we now know √2 is NOT a ratio. Indeed, the proof of the fact that there is no ratio of integers which is equal to √2 is now well-known and doesn’t even take up a full page. Students of Mathematics are now regularly asked to prove this fact as part of an introduction to the art of proof-writing.

Continue reading “A tale of deceit, betrayal and murder: the origin of the Pythagorean Theorem”