Saturday, August 16, 2014

Algebraic Inequality


Normally, I'm in favor of equality. But not today. Today we're talking algebra.
Don't let the "algebra" word trick you: inequalities are easy. Picture one of those old-style balances, with a plate on each side. You put something on the left and something on the right, and whichever side is heavier goes down.

Let's say you have 8 pounds on the left, and y pounds on the right (hey, I said it was algebra), and the scale balances. OK, this one's easy: y = 8.
Let's make it a little harder. Now we're going to have 14 pounds on the left, and y pounds on the right. We look at the scale and see that the right side is heavier. That's the one with y, so we can say y is more than 14:  y > 14.

OK, that's pretty easy. What will happen if we add two pounds to both sides? Umm...nothing, right? The right side was heavier before we added the two pounds to both sides, and it's still heavier now: y + 2 > 16.
What if we go back to y > 14 and multiply both sides by two? (We put 14 more pounds on the left and y more on the right?) We know what's going to happen there: nothing again. The right side was heavier before, and it still is: 2y > 28.

What if we multiply by negative 1 instead? This is trickier to picture. Before the left side was being pulled down by 14 pounds, and the right side was being pulled down by more than that (y pounds, whatever that is). Now we're going to pull up on the left side with 14 pounds, and pull up on the right side with y pounds. We're pulling the right side up harder, so the right side will be up and the left side will be down. (Do you see that?)
OK, so what have we learned? If you have an inequality like
y > 14
we can add (or subtract) any number from both sides without changing the greater than (or less than) sign. We can multiply by a positive number without changing the sign. But if we multiply by a negative number, the sign will flip:

-y < -14
Let’s fill in a number that works in the original equation and make sure it still makes sense:
                y > 14

Let’s pick a number for y. It doesn’t mean it’s the one correct number, because this isn’t an equality. It’s an inequality, and we’re just picking one of the things y might be. Maybe y is 20: that’s more than 14. And we said 
                -y < -14
Does that still work for 20?
                -20 < -14 (Yes, it does.)

So let’s look a few problems we can now solve.
x + 38 > 50

Well, we know that we can add or subtract anything from both sides, and we really kind of want the x by itself. So we can subtract 38 from both sides.
                x + 38 - 38 > 50 - 38
                x > 12

How about 3y - 18 < 6 ?
Hm. It would be nice to just have 3y on one side, so let’s add 18 to both sides:
                3y < 6 + 18    (note that on the left I got rid of the “-18” on the left side by adding 18)
                3y < 24
Then we can divide both sides by 3. That’s the same as multiplying by 1/3, which is positive, so the sign doesn’t change:
                y < 8
Are we sure we’re right? Our answer here tells us that if we put 7, it will satisfy the original equation:
                3y  - 18 < 6
                3(7) - 18 < 6
                21 - 18 < 6
                3 < 6 (Well, yeah)

Our answer tells us that if we put 9, it won’t satisfy the original equation:
                3y - 18 < 6 (this should be false)
                3(9) - 18 < 6
                27 - 18 < 6
                9 < 6 (It’s not, just as we thought.)

Saturday, July 26, 2014

Coin Flips and Probability I

Coin flips and probability. What could be easier? Each flip, a 50/50 chance with a fair coin. The chances of two heads in a row: ½ for the first flip, and ½ of that for the second flip. Half of a half = ½ * ½ = ¼.

It can get a little bit harder than that, though. Let’s try a bar bet. We’re dealing with a fair coin, and nobody trying to cheat or control the flip. Someone says that if you flip two heads within the first eight flips, you win a dollar. So if you get HTTHH, you win! Is that a good bet? What if it were fifteen flips, or five? What kind of number would make this a fair bet?
You don’t know? OK, that’s fair. But there has to be a number, right? We’re in algebra-land, so we’re going to call that something. Let’s call the average number of flips before you get two heads in a row is x.
So, what can happen when you flip? Maybe the first flip you get is tails. That didn’t help. You still expect to need as many flips as you did before you started.
It didn’t help you get HH, but it did help us figure out something. When you flip tails (a ½ chance), you already had one flip and you’re going to need an average of x more flips. Now we’re getting somewhere.
OK, what else could happen? Clearly, you could flip heads first. Then you could flip heads again, and win! OK, in that case, you used two flips, and the chance of that happening are ¼. Or you could flip tails the second time. Ugh. The chances of that happening are also ¼. You used two flips, and you’re back where you started (you need an average of x more flips).
And…those are the only things that can happen. You get tails (and start over) or you get heads. If you get heads, your next flip is either heads again (and you’re done) or tails (and you start over).
(chanceOfHH)(expectedFlipsForHH) + (chanceOfHT)(expectedFlipsForHT) + (chanceOfT)(expectedFlipsForT) = expectedNumberOfFlips
We pretty much know everything we need to know now:
expectedNumberOfFlips = x – that’s what we called it
chanceOfHH = ¼
expectedFlipsForHH = 2 – we flipped two times and we’re done
chanceOfHT = ¼
expectedFlipsForHT = 2 + x – we wasted two flips and now we’re starting over
chanceOfT = ½
expectedFlipsForT = 1 + x – we wasted one flip and now we’re starting over
So if we fill those values in so it looks like real algebra, we get:
¼(2) + ¼(2 + x) + ½(1 + x) = x
This would look prettier if we multiplied both sides by 4:
2 + (2 + x) + 2(1 + x) = 4x
Simplify:
2 + 2 + x + 2 + 2x = x
6 + 3x = 4x
Subtract 3x from both sides:
6 = x
So the average number of flips you need to get two consecutive heads is 6. Now off to the bar with you: there’s money to be won.

Saturday, July 12, 2014

Magic Words


Hocus pocus.
Alakazam!
Open sesame.
Abracadraba.

The world of literature is full of magic words. When we see them, we recognize them for what they are: words of mystery and power. Power to turn a dove into a mouse or move mountains.

The real world is full of magic words too, with power to make blood run cold. Words like “calculus,” “algebra,” and “division.”

I’ve seen the power of these words myself. If I mention “algebra” to certain members of my family, their minds shut down. They don’t want to hear that word. It’s a scary, scary word. They don’t know that they already know a little algebra, but they just don’t call it that.

This is a common pattern. When I was in high school, I was in a program where I’d go to a grade school and teach some of the advanced students extra math. That’s how I ended up teaching division to third graders. When I said we were going to learn division, their eyes filled with fear. “Division,” one of them said, “I’ve heard that’s really hard.”

I told her to picture having eight apples, and two people, and asked how many apples each person would get if you wanted to split the apples evenly. She knew it was four. She was floored when I told her that was division.

No, that’s not all of division and yes, it gets harder. She wouldn’t have been able to tell me how many apples each person should get when there were 43,417 apples and 23 people at that point. But she knew the basics, and we could work from there.

The basic idea of algebra is we’re going to give a name to a number. This is a thing that you already do. You might not know algebra, but you can talk about spending “all the money you have” or “all the money that’s in your pocket.” You can check the weather for today’s high temperature. Basically, algebra is that. Algebra likes to give things short names instead of long names, though: super-short names, actually. One letter long.

So we could say “Let’s call the number of dollars you had in your pocket this morning ‘m’. “ and a simple problem would be “You started with some amount of money this morning, and you spent $10 at lunch, and you have $15 left.” You could write that as
                m - 10 = 15
and find that you started the day with $25.

That’s the basic idea of algebra. There’s more to it, just like there was more to division. In this case, you learn some rules to move numbers around and to solve things that are more complex than this.

Calculus builds on algebra to talk about things that change. One of the things you do in calculus is find out how quickly a function is changing. This is handy in a bunch of situations. For instance, “speed” is how fast position is changing, and “acceleration” is how fast speed is changing.

That’s the basic idea, and it’s not so scary. If you want to, we can do a little math to go with it. If you don’t want to play along with the math, go ahead and skip to the last paragraph.

When you have a function that’s a line, the rate of change is a number that we call the slope. (“Rise over run, graphing is fun.”) So for
                y  = 5x + 3
the slope is 5. Every time you go one unit right, you go five units up. Lines and constant numbers aren’t super-interesting here, so let’s look at a different function:
                y = x
2 Some of the values that will be on this function are:

x
y
-1
1
0
0
1
1
2
4
3
9

 

You can see that the rate of change isn’t always the same: when x goes from 0 to 1, y goes up by 1. When x goes from 2 to 3, y goes up by 5.

So if the rate of change isn’t just a number, what is it? Well, it’s still the slope. Rise/run. So we can find the rate of change if we know two points. But the rate of change isn’t the same at all the points. Hm.

Well, any point we pick will have an x value, and we know what the y value is because we know the formula for the curve. So we can say that one point is (x, x2).  And another point is ( (x+h), (x+h) 2). Let’s see what that looks like. Let’s take our first point to be (0,0). If we pick h = 3, then the other point is (3,9) and our guess for the slope at (0,0) is 9/3 = 3. Well, what if we pick a different value for h?

If we pick h = 2, then the other point is (2, 4) and the slope is 4/2 = 2. Um.

If we pick h = 1, then the other point is (1,1) and the slope is 1/1 = 1. We can see that the slope changes depending on what value we pick for h. But if we want the value that’s most accurate, we should get as close to the curve as we can.

Back to the values we know. Before we guess any values for h, we have these points: (x, x2) and ( (x+h), (x+h) 2). What if we try to figure out the slope from there?

(x+h) 2 = x2 + 2xh + h2, so we can rewrite the points as (x, x2) and (x+h, x2 + 2xh + h2). We can take the difference in y values and the difference in x values from there:

Rise/run = ((x2 + 2xh + h2) - x2) / ((x + h) - x), which is the same as (2xh + h2)/h, or 2x + h. That matches what we saw before: when we picked x = 0 and h =3, we got a slope of (2x+h) = 2*0 + 3 = 3.

Now we’re back where we were before, but with a formula in hand: the slope is 2x + h. We said we want to get as close to the curve as we can, which means we’re going to make h really small: it’s going to approach 0. When h gets really close to 0, we see that the formula for the slope gets really close to 2x + 0, or just 2x. So when x = 0, the slope is 0. When x = 10, the slope is 20.

As with the other things, there’s more to it than that, but that’s the basic idea of the first semester of calculus, coming at you a little fast.

The important thing is to know that there are going to be words you’ve heard of, words that you’ve heard represent really hard things. You should be ready to look at them, stare them down, and say “you have no power here.”