My Favorite One-Liners: Part 65

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

I’ll use today’s one-liner just before I begin some enormous, complicated, and tedious calculation that’s going to take more than a few minutes to complete. To give a specific example of such a calculation: consider the derivation of the Agresti confidence interval for proportions. According to the central limit theorem, if n is large enough, then

Z = \displaystyle \frac{ \hat{p} - p}{ \displaystyle \sqrt{ \frac{p(1-p) }{n} } }

is approximately normally distributed, where p is the true population proportion and \hat{p} is the sample proportion from a sample of size n. By unwrapping this equation and solving for p, we obtain the formula for the confidence interval for a proportion:

z \displaystyle \sqrt{\frac{p(1-p)}{n} } = \hat{p} - p

\displaystyle \frac{z^2 p(1-p)}{n} = \left( \hat{p} - p \right)^2

z^2p - z^2 p^2 = n \hat{p}^2 - 2 n \hat{p} p + n p^2

0 = p^2 (z^2 + n) - p (2n \hat{p} + z^2) + n \hat{p}^2

We now use the quadratic formula to solve for p:

p = \displaystyle \frac{2n \hat{p} + z^2 \pm \sqrt{ \left(2n\hat{p} + z^2 \right)^2 - 4n\hat{p}^2 (z^2+n)}}{2(z^2+n)}

p = \displaystyle \frac{2n \hat{p} + z^2 \pm \sqrt{4n^2 \hat{p}^2 + 4n \hat{p} z^2 + z^4 - 4n\hat{p}^2 z^2 - 4n^2 \hat{p}^2}}{2(z^2 + n)}

p = \displaystyle \frac{2n \hat{p} + z^2 \pm \sqrt{4n (\hat{p}-\hat{p}^2) z^2 + z^4}}{2(z^2 + n)}

p = \displaystyle \frac{2n \hat{p} + z^2 \pm \sqrt{4n \hat{p}(1-\hat{p}) z^2 + z^4}}{2(z^2 + n)}

p = \displaystyle \frac{2n \hat{p} + z^2 \pm \sqrt{4n \hat{p} \hat{q} z^2 + z^4}}{2(z^2 + n)}

p = \displaystyle \frac{2n \hat{p} + z^2 \pm z \sqrt{4n \hat{p} \hat{q} + z^2}}{2(z^2 + n)}

p = \displaystyle \frac{2n \hat{p} + z^2 \pm z \sqrt{4n^2 \displaystyle \frac{ \hat{p} \hat{q}}{n} + \displaystyle 4n^2 \frac{z^2}{4n^2}}}{2(z^2 + n)}

p = \displaystyle \frac{2n \hat{p} + z^2 \pm 2nz \sqrt{\displaystyle \frac{ \hat{p} \hat{q}}{n} + \displaystyle \frac{z^2}{4n^2}}}{2(z^2 + n)}

p = \displaystyle \frac{2n \hat{p} + 2n \displaystyle \frac{z^2}{2n} \pm 2nz \sqrt{\displaystyle \frac{ \hat{p} \hat{q}}{n} +\displaystyle \frac{z^2}{4n^2}}}{2n \displaystyle \left(1 + \frac{z^2}{n} \right)}

p = \displaystyle \frac{\hat{p} + \displaystyle \frac{z^2}{2n} \pm z \sqrt{\displaystyle \frac{ \hat{p} \hat{q}}{n} + \displaystyle \frac{z^2}{4n^2}}}{\displaystyle 1 + \frac{z^2}{n} }

From this we finally obtain the 100(1-\alpha)\% confidence interval

\displaystyle \frac{\hat{p} + \displaystyle \frac{z_{\alpha/2}^2}{2n}}{\displaystyle 1 + \frac{z_{\alpha/2}^2}{n} } - z_{\alpha/2} \frac{\sqrt{\displaystyle \frac{ \hat{p} \hat{q}}{n} + \displaystyle \frac{z_{\alpha/2}^2}{4n^2}}}{\displaystyle 1 + \frac{z_{\alpha/2}^2}{n} } < p < \displaystyle \frac{\hat{p} + \displaystyle \frac{z_{\alpha/2}^2}{2n}}{\displaystyle 1 + \frac{z_{\alpha/2}^2}{n} } + z_{\alpha/2} \frac{\sqrt{\displaystyle \frac{ \hat{p} \hat{q}}{n} + \displaystyle \frac{z_{\alpha/2}^2}{4n^2}}}{\displaystyle 1 + \frac{z_{\alpha/2}^2}{n} }.

Whew.

So, before I start such an incredibly long calculation, I’ll warn my students that this is going to take some time and we need to prepare… and I’ll start doing jumping jacks, shadow boxing, and other “exercise” in preparation for doing all of this writing.

My Favorite One-Liners: Part 64

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

From the category “I Really Don’t Recommend That Anyone Does This But It Sure Makes a Great Story Now”: I recently told my students about the time in Spring 2000 that, in the middle of class, I playfully threw an eraser at a wise-cracking student sitting in the back row…

…and I aimed about three feet above his head so that the eraser would richochet off the back wall…

…but the eraser kind of knuckleballed and inadvertently sailed barely over the head of the student sitting in front of him and then nailed him square in the chest…

…and I somehow kept a straight face as if I really had intended to peg him with a cloud of chalkdust…

…and, the next day, my students gave me a half-dozen new erasers for fresh ammuntion.

Ah, memories.

My Favorite One-Liners: Part 63

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

I’ll use today’s one-liner to explain why mathematicians settled on a particular convention that could have been chosen differently. For example, let’s consider the definition of  y = \sin^{-1} x by first looking at the graph of f(x) = \sin x.

sine1

Of course, we can’t find an inverse for this function; colloquially, the graph of f fails the horizontal line test. More precisely, there exist two numbers x_1 and x_2 so that x_1 \ne x_2 but f(x_1) = f(x_2). Indeed, there are infinitely many such pairs.

So how will we find the inverse of f? Well, we can’t. But we can do something almost as good: we can define a new function g that’s going look an awful lot like f. We will restrict the domain of this new function g so that g satisfies the horizontal line test.

For the sine function, there are plenty of good options from which to choose. Indeed, here are four legitimate options just using the two periods of the sine function shown above. The fourth option is unorthodox, but it nevertheless satisfies the horizontal line test (as long as we’re careful with \pm 2\pi.

sine2So which of these options should we choose? Historically, mathematicians have settled for the interval [-\pi/2, \pi/2].

So, I’ll ask my students, why have mathematicians chosen this interval? That I can answer with one word: tradition.

For further reading, see my series on inverse functions.

 

 

My Favorite One-Liners: Part 62

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

This is a story that I’ll tell after doing a couple of back-to-back central limit theorem problems. Here’s the first:

The chances of winning a column bet in roulette is 12/38. The bet pays 2 to 1, meaning that if you lose, you lose $1. However, if you win, you get your $1 back and $2 more. If this bet is made 1000 times, what is the probability of winning at least $0?

With my class, we solve this problem using standard techniques with the normal approximation:

\mu = E(X) = 2 \times \displaystyle \frac{12}{38} + (-1) \frac{26}{38} = - \displaystyle \frac{1}{19}

E(X^2) = 2^2 \times \displaystyle \frac{12}{38} + (-1)^2 \frac{26}{38} =  \displaystyle \frac{37}{19}

\sigma = SD(X) = \sqrt{ \displaystyle \frac{37}{19} - \left( - \displaystyle \frac{1}{19} \right)^2} = \displaystyle \frac{\sqrt{702}}{19}

E(T_0) = n\mu = 1000 \left( -\displaystyle \frac{1}{19} \right) \approx -52.63

\hbox{SD}(T_0) = \sigma \sqrt{n} = \displaystyle \frac{\sqrt{702}}{19} \sqrt{1000} \approx 44.10

P(T_0 > 0) \approx P\left(Z > \displaystyle \frac{0-(-52.63)}{44.10} \right) \approx P(Z > 1.193) \approx 0.1163.

Next, I’ll repeat the problem, except playing the game 10,000 times.

The chances of winning a column bet in roulette is 12/38. The bet pays 2 to 1, meaning that if you lose, you lose $1. However, if you win, you get your $1 back and $2 more. If this bet is made 10,000 times, what is the probability of winning at least $0?

The last three lines of the above calculation have to be changed:

E(T_0) = n\mu = 10,000 \left( -\displaystyle \frac{1}{19} \right) \approx -526.32

\hbox{SD}(T_0) = \sigma \sqrt{n} = \displaystyle \frac{\sqrt{702}}{19} \sqrt{10,000} \approx 139.45

P(T_0 > 0) \approx P\left(Z > \displaystyle \frac{0-(-526.32)}{139.45} \right) \approx P(Z > 3.774) \approx 0.00008.

In other words, the chance of winning drops dramatically. This is an example of the Law of Large Numbers: if you do something often enough, then what ought to happen eventually does happen.

As a corollary, if you’re going to bet at roulette, you should only bet a few times. And, I’ll tell my students, one Englishman took this to the (somewhat) logical extreme by going to Las Vegas and making the ultimate double-or-nothing bet, betting his entire life savings on one bet. After all, his odds of coming out ahead by making one bet were a whole lot higher than by making a sequence of bets.

Naturally, my students ask, “Did he win?” Here’s the video and the Wikipedia page:

My Favorite One-Liners: Part 61

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

This is a story that I like to tell my probability and statistics students when we cover the law of averages.

One of my favorite sports is golf, and one spring afternoon in my senior year I went out to play a round. I was assigned a tee time with two other students (that I didn’t know), and off we went.

Unfortunately, the group in front of us were, as I like to say, getting their money’s worth out of the round. Somebody would be stuck in a sand trap and then blast the ball into the sand trap on the other side of the green. Then he’d go to blast the ball out of that sand trap, and the ball would go back to the original one.

Golf etiquette dictates that slow-playing groups should let faster groups play through. However, this group never offered to let us pass them. And so, hole after hole, we would wait and wait and wait.

On hole #9, a player walking by himself came up from behind us. I’m not sure how that happened — perhaps the foursome that had been immediately behind us was even slower than the foursome in front of us — and he courteously asked if he could play through. I told him that we’d be happy to let him play through, but that the group in front of us hadn’t let us through, and so we were all stuck.

As a compromise, he asked if he could join our group. Naturally, we agreed.

This solo golfer did not introduce himself, but I recognized him because his picture had been in the student newspaper a few weeks earlier. He was Notah Begay III, then a hot-shot freshman on the Stanford men’s golf team. Though I didn’t know it then, he would later become a three-time All-American and, with Tiger Woods as a teammate, would win the NCAA championship. As a professional, he would win on the PGA Tour four times and was a member of the 2000 President’s Cup team.

Of course, all that lay in the future. At the time, all I knew was that I was about to play with someone who was really, really good.

We ended up playing five holes together… numbers 10 through 14. After playing 14, it started to get dark and I decided to call it quits (as the 14th green was fairly close to the course’s entrance).

So Notah tees off on #10. BOOM! I had never been so close to anyone who hit a golf ball so far. The guys I was paired with started talking about which body parts they would willingly sever if only they could hit a tee shot like that.

And I thought to myself, Game on.

I quietly kept score of how I did versus how Notah did. And for five holes, I shot 1-over par, while he shot 2-over par. And for five holes, I beat a guy who would eventually earn over $5 million on the PGA Tour.

green lineHow did the 9-handicap amateur beat the future professional? Simple: we only played five holes.

Back then, if I shot 1-over par over a stretch of five holes, I would be pretty pleased with my play, but it wouldn’t be as if I had never done it before. And I’m sure Notah was annoyed that he was 2-over par for those five holes (he chili-dipped a couple of chip shots; I imagine that he was experimenting with a new chipping technique), but even the best golfers in the world will occasionally have a five-hole stretch where they go 2-over par or more.

Of course, a golf course doesn’t have just five holes; it has 18.

My all-time best score for a round of golf was a four-over par 76.; I can count on one hand the number of times that I’ve broken 80. That would be a lousy score for a Division I golfer. So, to beat Notah for a complete round of golf, it would take one of my absolute best days happening simultaneously with one of his worst.

Furthermore, a stroke-play golf tournament is not typically decided in only one round of golf. A typical professional golf tournament, for those who make the cut, lasts four rounds. So, to beat Notah at a real golf tournament, I would have to have my absolute best day four days in a row at the same time that Notah had four of worst days.

That’s simply not going to happen.

So I share this anecdote with my students to illustrate the law of averages. (I also use a spreadsheet simulating flipping a coin thousands of times to make the same point.) If you do something enough times, what ought to happen does happen. However, if instead you do something only a few times, then unexpected results can happen. A 9-handicap golfer can beat a much better player if they only play 5 holes.

To give a more conventional illustration, a gambler can make a few dozen bets at a casino and still come out ahead. However, if the gambler stays at the casino long enough, he is guaranteed to lose money.

My Favorite One-Liners: Part 60

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

I’m a big believer using scaffolded lesson plans, starting from elementary ideas and gradually building up to complicated ideas. For example, when teaching calculus, I’ll use the following sequence of problems to introduce students to finding the volume of a solid of revolution using disks, washers, and shells:

  • Find the volume of a cone with height h and base radius r.
  • Find the volume of the solid generated by revolving  the region bounded by y=2, y=2\sin x for 0 \le x \le \pi/2, and the y-axis about the line y=2.
  • Find the volume of the solid generated by revolving the region bounded by y=2, y=\sqrt{x}, and the y-axis about the line y=2 .
  • Find the volume of the solid generated by revolving the region bounded by y=2, y=\sqrt{x}, and the y-axis about the y-axis .
  • Find the volume of the solid generated by revolving the region bounded by x=\sqrt{2y}/(y+1), y=1, and the y-axis about the y-axis .
  • Find the volume of the solid generated by revolving  the region bounded by the parabola x=y^2+1 and the line x=3 about the line x=3.
  • Water is poured into a spherical tank of radius R to a depth h. How much water is in the tank?
  • Find the volume of the solid generated by revolving the region bounded by y= x^2, the x-axis, and x=4 about the x-axis.
  • Find the volume of the solid generated by revolving the region bounded by y= x^2, the x-axis, and x=4 about the y-axis.
  • Repeat the previous problem using cylindrical shells.

In this sequence of problems, I slowly get my students accustomed to the ideas of horizontal and vertical slices, integrating with respect to either x and y, the creation of disks and washers and (eventually) cylindrical shells.

As the problems increase in difficulty, I enjoy using the following punch line:

To quote the great philosopher Emeril Lagasse, “Let’s kick it up a notch.”

My Favorite One-Liners: Part 59

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

Often I’ll cover a topic in class that students really should have learned in a previous class but just didn’t. For example, in my experience, a significant fraction of my senior math majors have significant gaps in their backgrounds from Precalculus:

  • About a third have no memory of ever learning the Rational Root Test.
  • About a third have no memory of ever learning synthetic division.
  • About half have no memory of ever learning Descartes’ Rule of Signs.
  • Almost none have learned the Conjugate Root Theorem.

Often, these students will feel somewhat crestfallen about these gaps in their background knowledge… they’re about to graduate from college with a degree in mathematics and are now discovering that they’re missing some pretty basic things that they really should have learned in high school. And I don’t want them to feel crestfallen. Certainly, these gaps need to be addressed, but I don’t want them to feel discouraged.

Hence one of my favorite motivational one-liners:

It’s not your fault if you don’t know what you’ve never been taught.

I think this strikes the appropriate balance between acknowledging that there’s a gap that needs to be addressed and assuring the students that I don’t think they’re stupid for having this gap.

 

My Favorite One-Liners: Part 58

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

One of my great annoyances is when I cover some topic in class, usually theoretical, and a student asks, “Will this be on the test?” Over the years, I’ve developed my standard tongue-in-cheek response to this question:

Put this on the test… that’s a really good idea.

[Students groan as I pull out a piece of paper and write a note to myself, talking out loud as I write:] “Put this on the test.”

[I then fold the paper and place it in my pocket, and then ask, with my best poker face:]

Are there any other questions?

After this, no one ever asks me again if something will be on the test.

My Favorite One-Liners: Part 57

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

Every once in a while, students will ask my procedure for grading their exams. So I’ll tell them, tongue in cheek, that I go home so that I could have some movie playing in the background that would get in the proper mood for grading… something like Braveheart, Gladiator, or The Godfather.

For some reason, students don’t find this terribly reassuring.

My Favorite One-Liners: Part 56

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

This really awful pun comes from a 1980s special by the comedian Gallagher; I would share a video clip here, but I couldn’t find it. I’ll tell this joke the first time that the Greek letters \alpha, \beta, \gamma, or \delta appears in a course. For the discussion below, let’s say that \alpha appears for the first time.

Where does the symbol \alpha come from?

[Students answer: “The Greek alphabet.”]

Good. Now, where did the Greeks get it from?

[Students sit in silence.]

The answer is, ancient cavemen. The sounds in the Greek alphabet correspond to the first sounds that the caveman said when he first stepped out the cave, so you can tell a lot about human psychology based on the Greek alphabet.

The caveman stepped out of the cave, saw a nice bright, sunny day, and said, “Ayyyyy!”

[Students groan.]

So, “Ahhh.” What’s the second sound?

[Students: “buh” or “bee”]

Good, the second sound is “buh.” What’s the third sound?

[Students: “guh” or “cee”]

Don’t forget, it’s the Greek alphabet. “Guh.” What’s the fourth sound?

[Students: “duh”]

Good. Now let’s put these all together to see what the caveman was saying. “Ah buh guh day.”

“Have a good day!”

[Students laugh and/or groan deeply.]

One year, when I told this story, I had a student in the front row who was carefully taking notes as I told this story; she felt very silly when I finally reached the punch line.