Hard Tweets Explained: Correlation Coefficient

I honestly didn’t think this was a hard tweet, but someone asked me to explain it, so here we go!

I assume the text content of the tweet is not the tricky part. Music impacts mood, and mood impacts driving. Whether I meander along at just the speed limit, or go faster than that is driven primarily by what music is playing. But you got that part already.

The joke here lies in the (r=0.867, σ=2.6). If you’ve ever read a research paper, you might have seen a notation like that. r is the letter we use for something called “correlation coefficient” and σ (that’s a Greek lowercase s, or “sigma”) is what statisticians use for standard deviation.

There is a message here, but I can't quite put my finger on it

There is a message here, but I can’t quite put my finger on it

Imagine that you have a bunch of data points on a graph, and they seem to be falling along a line. For example, suppose on one axis we plot time spent on twitter, and on the other axis we plot the number of times your spouse sighs audibly or rolls their eyes. And suppose that we have a lot of samples, and we plot them on a graph. And we notice that people who spend only a little time on twitter get few sighs and eye rolls, but people who spend a lot of time on twitter get a lot of sighs and eye rolls.

So these dots on the graph kind of form a line. But data samples are noisy, so we want to know how well these two things correlate. That’s what the correlation coefficient tells us. I’ll spare you the method of computation, but it boils line-ish-ness down to a single number. 1 means all the points are exactly on a line (perfect correlation), and 0 means they aren’t on a line at all (no correlation). The coefficient can also go negative which means that as one thing increase the other decreases. -1 means perfectly correlated, just in the opposite direction.

Correlation coefficients are useful for letting you know whether one thing can be used to predict something else. For example, my father once did a study where he compared the SAT scores of black student athletes against how well those kids did in college. The correlation coefficient was negative: the worse you did on the SAT, the better you would do in college. The College Board was not a fan of my father’s work.

In real scientific studies, correlation coefficients are typically pretty small. Correlations as low as r=0.2 might be considered significant, depending on the number of samples.

Correlation doesn’t tell you about causation. It just tells you if two things are moving in lock step. Either might be causing the other, or some other thing might be causing both, or it could just be a complete coincidence.

So that’s r in the tweet. I’m saying that the music and drive time are highly correlated. Putting σ in there was just to make sure the people who read research papers would understand what I meant by r. It really makes no sense at all in this context.

Homework: Use your newfound knowledge of statistics to mock people on Facebook. Here’s an example:

Advertisements

Hard Tweets Explained: Contraposition

Contraposition is a logic term that I’m guessing most people don’t know. Here is a simple example.

Me: Did you brush your teeth?

7: Yes!

Me: (checks toothbrush, it is dry)

7: Oh! You mean today?

We start with a conditional implication that if she brushed her teeth, then the toothbrush would be wet.

Brushed —implies—> Wet

We don’t know whether she brushed her teeth, but we do know that the toothbrush is not wet. The logical principle of contraposition (also called modus ponens) says that if you are certain that P->Q, then you can be certain that (not Q)->(not P). If brushed implies wet, then not-wet implies not-brushed.

Note that wet does not imply brushed. Now that 7 is 8, I suspect that she may choose to wet her toothbrush instead of brushing her teeth. So you can’t just flip an implication around. That’s called confirmation of the consequent fallacy. (I’m not kidding, that’s really what that’s called.) But if you flip it around and also invert the two statements, then that is guaranteed to still be true.

OK, so now that we all understand contraposition, let’s go back to the tweet.

It says that nudity implies getting some. But that I found that through contraposition.

Observation: not getting some implies not nude.

Contraposition: nude implies getting some.

Hence the joke: I’m talking about getting some, but I know this through years of research on not getting some. This is funny because men tweeting that they are not having sex is funny. I’m actually not sure why that is. However, there are plenty of examples of men joking about how much sex they are having, and they are not at all funny. And I think we can get there through contraposition. Maybe.

Homework: Try getting some in a contraposition for a change. Just be careful not to pull a muscle.

Hard Tweets Explained: Hexadecimal


A very good friend had a birthday recently. She thinks she is 37, but I assured her that she is actually 25. In hexadecimal.

When you think of the number 37, those two digits mean 3 tens, plus 7 ones. But there are other ways to express numbers. Instead of having the first digit represent 10’s, you can have it represent any number you want. One that is particularly popular with computer geeks is 16.

When you use the first digit to say how many 16’s you have, that’s called “hexadecimal” (or “base 16”).

So if my friend is 25, that means she is 2 sixteens, and 5 ones.

This is a great way to represent ages as long as the ones place is less than 10. I’m 46 in the usual base 10. So that means I’m 2 sixteens and 14 ones. But we don’t have a digit for 14. So computer folks use letters. A for 10, B for 11, and so on. That means I’m 2E. Next year, I’ll be 2F, and then I’ll finally turn 30.

Homework: Compute your age in base 5 and feel a lot older. (Hint: My friend is 122.)

My Liebster Piece

A very good friend, whom I discovered on twitter, got to know through her blog4, and subsequently now chat with on a pretty regular basis did a horrible thing. She “tagged” me in one of those insipid chain letter things that infect social media like a flesh-eating virus. The conceit is that I am supposed to answer some questions she posed, and then I’m supposed to pose more questions to other bloggers. Well, I’m not playing.

OK, I am.

But only partly.

I refuse to carry on the chain letter, so fear not, I will not be tagging you. But I will, through the course of this piece, answer all of her silly questions. They are down at the end, and when I happen to answer one of them, I will footnote it, as I did in the first sentence.

As I have mentioned before, I have been blogging for a very long time, but only recently started again in this new world of anonymous(ish) blogs and twitter, and whatnot. It ties into my first year on twitter2, which I have chronicled already, and in fact, answers one of the questions asked here1. So I won’t rehash that.

That post about my first year on twitter got me into some trouble with my wife3. In it, I waxed poetic about women sending me pictures of their bare bosoms, which she found both disturbing and distasteful. I’ve edited that bit out, so you won’t see it there any more. It really wasn’t particularly relevant to the story, and was mostly intended to bring some levity. It was an easy cut.

Since then, she and I have reached an uneasy truce on this blog. I consider her feelings about what I write, and do what I can to detour around things that will really bother her. And she mostly doesn’t acknowledge that I’m doing this writing. And I get to keep wearing my wedding ring5, of which I am quite fond, particularly considering what it represents.

We have a similar truce about twitter. And it seems to be holding.

Recently I’ve been thinking about whether I might tell my mother about this blog. My mother has always loved my writing. Back when I was in college, she had a subscription to the college paper so she could read my columns. Last summer I wrote a series of status updates on Facebook that I thought were hilarious, and my wife found so annoying she unfriended me so she wouldn’t have to see them anymore. Anyway, my mother loved them, and actually used them as samples in one of her classes (she is retired, but still teaches, because apparently, she doesn’t understand what the word retired means).

I had cross-posted those to twitter, and my wife suggested that perhaps since my mother liked them so much, perhaps she would like my twitter as well. At the time, my wife had never seen my twitter, so she had no idea what an absurd suggestion that was. I demurred. Said, “I say fuck a lot,” and left it at that.

There is certainly some content here on the blog that mom might find disturbing, like the stuff about what I was doing in high school, but since she loves my writing, I feel a tad bit guilty that there is all this stuff that she would love so much and cannot see. She is a writer herself, as was my father6. They wrote academic works about classroom management, child management, and human behavior. I have read some of it, but not all, and certainly not lately. I should probably go read it all again sometime.

The trick with my mother is that I’d have to get her to not share my blog. Because I’m not really in this to gain new readers. And I certainly don’t want my extended family reading this, as they are for the most part, pretty judgmental folks. What I really am trying to do here is scratch the itch of certain friends who very much enjoy my writing on twitter, and whom I think I make happy7 by writing in a longer form here.

This is entirely accurate

This is entirely accurate

One of those friends in particular, seems to understand me a whole lot better than any other. She wrote a completely ridiculous list, which also happens to be completely accurate10. If you get into my inner circle, and find yourself chatting with me on a regular basis, you would do well to heed her advice. (I redacted #5 because it is an inside joke.)

Point 2 in particular is me in a nutshell. I’ve already written about my propensity for accuracy, so I won’t dwell on that. But I recently learned that something I had thought was true for a very long time, actually wasn’t exactly. It was after I read the blog post on Gunmetal Geisha in which I had been tagged for this silly exercise. I was mulling over the questions, most of which I knew the answers to, but I got stuck on one of them.

I really love math and numbers and logic and stuff. They fit my brain nicely. And while I’ve never considered any number my favorite, I certainly have favorite conceptual frameworks, and certainly some favorite math trivial facts.

For example, I could say my favorite number is e+1. That would be a joke that I can guarantee that none of my readers will understand. Much less find funny.

But after careful consideration, I recalled that there is a number for which I actually have an affinity. That is φ, the golden ratio9. About 1.618.

If you aren’t familiar with this ratio, it’s the number where you can invert it (1 divided by it) and you end up with another number that’s exactly one away. That is 1/1.618 = 0.618. So if you have a box with sides, say 1618 x 1000, and you cut off a square 1000×1000 box, you are left with a box that is 1000×618, which is the same proportion as your original box.

I first learned about the golden ratio back in high school, when I was tasked with writing a term paper for a math class. This was a downright peculiar assignment, since math classes never require writing. I enjoyed it very much. I settled on a topic and dove in. My topic was the Fibonacci sequence and the Golden Ratio, and all of that related stuff. In my research, I kept finding more and more connections, many of which seemed quite magical at the time.

For example, I learned that the number of petals on most flowers tend to be Fibonacci numbers (1, 2, 3, 5, 8, 13, …). And I learned that if you take any two large adjacent Fibonacci numbers, they will have a ratio darn close to the golden ratio. (This latter fact, I recently learned isn’t really so magical at all, but closely related to the definition of the Golden Ratio. But it seemed magic at the time.)

I also learned that if you take that box I described a minute ago, and keep chopping it up like that, you can trace a logarithmic spiral in the various boxes, which looks just like a nautilus shell. However, what I recently learned when checking the facts of this piece, is that an actual nautilus shell isn’t shaped anything like that8. If you take a real shell and measure it carefully, it turns out that you won’t get anything like a “Golden Spiral.” Oh well. If I’m going to be wrong, best that it’s about something trivial.

The other stuff is still true, and I thought it was all pretty cool, and so I guess if I was going to pick one number that was my favorite, it would have to be φ.

And so, without further ado, here are the questions:

1. What inspired you to start your blog?
2. What do you consider the best post you ever wrote (link)?
3. What do you love most in this world?
4. What was the first blog you found and fell in love with?
5. What is your favorite item of clothing (that you personally own)?
6. Which author or artist has influenced you the most?
7. How do you define blogging success?
8. What have you learned recently that you might share?
9. What’s your favorite number and why?
10. Describe a happy memory to us.

Hard Tweets Explained: It’s Your Birthday

In response to:


I wrote:


And he replied “LOL. Really?” Indeed.

The chance that one of your followers has a birthday today is just 1 in 365. So the chance that they do not is 364/365.

The chance that two followers do not is the chance that one does not, and the other does not, so 364/365 x 364/365. You can write that (364/365)². The chance of three followers not having a birthday today is (364/365)³ and so on.

Since you have 2000 followers, the chance of them all not having a birthday today is (364/365)²⁰⁰⁰. The chance of that not happening is 1-(364/365)²⁰⁰⁰.

We like to see chances expressed as percentages, so we’ll multiply that by 100:

100x[1-(364/365)²⁰⁰⁰] = 99.58596373215920241300%

Homework: Compute the probability that the follower with the birthday actually read your tweet.

Hard Tweets Explained: Barrels of Babies

This tweet isn’t really all that hard, but I thought it would be fun to document how I arrived at my number. I actually tweeted a different conclusion in an earlier tweet, but in writing this story, I noticed an oversight. So here we are.

In case you aren’t aware, a “barrel” is a precise unit of volume measurement. When they talk about Venezuela producing 2.5 million barrels of oil a day, that’s about how much oil there is, not literally how many barrels they use, because I don’t think anybody puts oil in barrels any more.

A “barrel” is 119.2 liters.

I cannot fathom what made me curious about how many barrels of babies are produced each year. Clearly I need to adjust my medication. But to figure this out, we need to know how many babies are produced.

Surprisingly, google was pretty lame at answering that for me. However, I eventually stumbled upon the CIA web site (yes, that CIA) which revealed a birth rate of 18.9 births per 1000 population, and a world population of 7,095,217,980. So 18.9 times 7,095,217 = 134 million babies.

Next, we need to know how much volume a baby takes up, in liters. It turns out nobody has done an Archimedes-style experiment of putting a baby under water and seeing how much the water rises. Slackers.

Nirvana

Archimedes as a child

So I need to estimate. Using the Nirvana album cover as inspiration, I’m going to guess that babies have a similar density to water. So if I find out how much the average baby weighs, I can guess how much volume it takes up by guessing it takes the same amount as that weight of water. Google is helpful here: it offers that the average birthweight worldwide is 3.4 kg (7.5 lbs). A fun fact about the metric system is that 3.4 kg of water consumes 3.4 liters. So we are going to guess that each baby takes up 3.4 liters of volume.

So our 134 million babies take up 455.6 million liters. Divide that by 119.2 and we have 3.8 million barrels.

Homework: Borrow a 7.5 lb baby and do the Achimedes experiment to find out if my estimate is correct.

Hard Tweets Explained: Non-Euclidean Space

And here we have another example of me beating a twitter joke format horse to death. You can suffer through other examples of this in regard to Confections and Movies.

In this case, we are playing with the same pun about an opening line vs a geometric line that I used with Benjamin Button. Close your eyes, think back, and remember geometry from school: the shortest path between two points is a straight line; parallel lines never intersect; if you have a line and a point, there is only one line through that point that doesn’t intersect the line.

All that stuff, like so much of what you learned in school, is not exactly true.

There is a convention, when teaching, to fail to mention the context. For example, when they teach you Newtonian physics, they fail to mention that most of what you are learning does not apply at very high speed, or at very small scale. When you learn about music, they fail to mention that the convention of 12 notes is a Western construct, and there are other music systems that divide the frequencies of sounds in an octave differently. And when you learn about geometry, they fail to mention that you are learning about Euclidean geometry, but there are other geometries with different rules.

It’s a pet peeve of mine. It’s fine to teach one “truth,” but make it clear that this truth is contextual. There are other “truths” that seem to contradict this one, in other contexts.

So let’s focus on geometry. You learned about Euclidean geometry. That’s the geometry that Euclid defined about 2,300 years ago. He started with a small set of rules, and then derived a whole bunch of other rules from it. One of those rules says that if you have a line (think a road), and a point (think a sign next to the road), then there is only one line that goes through that point that doesn’t intersect the line (such as the sidewalk: it goes through the sign, and it never intersects the road). That line is parallel to the one it doesn’t intersect. Seems intuitive, and obviously correct, right?

OK, so suppose that I tell you that there is a different set of rules where every line through that point is going to intersect that  first line. That parallel lines do, in fact, intersect. That lines, in fact, always intersect themselves. And suppose, further, that you’ve worked with a geometric system like this your whole life. This other set of rules are different from Eulcid’s rules, so we call them Non-Euclidean. And your very existence seems to be in a Non-Euclidean space. As is mine. As is everyone else’s on the planet.

It’s like one of those Sphinx puzzles. You exist in a place where all lines intersect themselves. Where are you?

Answer: On a globe. Shoot a line in any direction, and eventually it comes around and hits you in the ass.

The surface of a sphere is a Non-Euclidean space. Every line through a point intersects every line you might draw. Lines intersect themselves. Parallel lines sometime intersect, such as the longitude markings on a globe meeting at the poles.

So the opening line of my life story would intersect itself because I exist in a Non-Euclidean space. (And I just checked: the spelling I used the in tweet is less common, but also considered correct. Whew!)

Homework: Define a new system of geometry in which the shortest distance between two points is plenty long enough, and really it’s how you use it that matters, and not how big it is, and who are you to judge anyway?

Hard Tweets Explained: Polar Keyboard

You are doubtless familiar with ordinary <x, y> coordinates that you would use to plot something on graph paper. That way of plotting thing was developed by René Descartes. So they call them Cartesian coordinates.

But that’s not the only way of plotting things. Another way is to describe the location of a point as a distance from the middle, and the direction to go (typically given as an angle). This system is called Polar coordinates. We traditionally use r as the distance (like radius) and θ as the direction. So instead of <x, y> we use <r, θ>.

Now look at your keyboard. The middle is right between G and H. So lets make that the origin of our polar system. If we start θ as going East at zero degrees, then H might be <1,0°>, J is <2,0°>, K is <3,0°>. We might find Y at <1,80°> or so. Got it?

OK, so what I’ve noticed is that my typos on my phone keyboard all have to do with not going far enough away from the center. I’ve got the right direction θ, but not the right distance r. My r is always too small, as though I multiplied it by a number less than 1.

Hence the r of my typo is some number (k) multiplied by the right r. And that number (k) is less than one.

Homework: plot the duration of each nap you took reading this incredibly boring blog entry, against the time that nap ensued, in polar coordinates.

Hard Tweets Explained: Benjamin Button

This is another tweet playing with the “opening line of my life story” tweet meme. In this case, we are describing a line using the function “sine.” That’s the wavy line that goes up and down around the horizontal axis. It starts at zero, goes up to one, goes back down through zero, all the way to negative one, and back up to zero. Then it repeats.

So that’s most of the joke. If you believe in reincarnation, then your life line would repeat. Like a sine wave.

While the sine wave starts at zero and goes up, there is a similar wave called the cosine wave, that starts at one and goes down. If you saw the movie, “The Curious Case of Benjamin Button” then you know the idea is that the main character starts old and gets younger. The cosine starts high and goes down, hence it is like old Ben getting younger as time goes on.

Homework: Go make a tweet about the homophones cosine and cosign. People will think you’re hilarious. (They won’t. They really won’t.)

Hard Tweets Explained: No Pie for You

This may be my favorite tweet I’ve ever written. If not, it’s definitely up there in the top 314. This is the second post in an infinite series of posts in which I’ll explain my most difficult tweets. I’ll stop making that infinite series joke after this post, I promise.

The first thing you need to know is that there was a tweet meme going around of the form “The opening line of my life story would be…” So this is a play on that joke format.

The next thing you need to know is that I’m writing “pie” but meaning π. You remember π – that is the ratio of the circumference of a circle to its diameter. If you take your waist measurement, and then divide it by π, you get the exact length of the knife you’d need to commit harakiri.

π is an irrational number. That means that when you write it out 3.1415926535 (that’s all I know off the top of my head), it never repeats and it never ends. You might remember 22/7 as an approximation of π, but that is not terribly accurate. You can get more accurate by writing equations with lots and lots of fractions. The most famous of these was discovered by a fellow named Leibniz. It goes like this:

1 – ⅓ + ⅕ – ⅐ + ⅑ …

That actually doesn’t get you π, it gets you π/4. So you multiply that by 4 and you get π.

The sign is flipping back and forth +/- and the denominators (bottoms) of the fractions are all the odd numbers. Another way to write this is:

4 ∑ [(-1)ⁿ/(2n+1)]

That means 4 times the sum ( ∑ or “add this stuff up” ) of all the fractions with odd bottoms and sign-flipping tops. (There is a joke here about a sign-spinner wearing funny pants, but that is left as an exercise for the reader.) Maybe you should just trust me on how that equation gives you those fractions, because it’d take a couple more paragraphs to explain why that works.

So that’s the opening line of your life story if you really like pie – Leibniz’s equation for π.

The tweet then goes on to tell you that you aren’t going to get any pie.

This second bit is a joke about the nature of an infinite series. You can keep adding (and subtracting) smaller and smaller fractions in that equation and you get closer and closer to π. But you never actually get to π. You get really close. But never there.

So you never get to π – you never get any pie.

Homework: Go have some pie. Pair it with a nice wine, and toast Leibniz, who also invented calculus independently of Newton, but didn’t have as good a publicist. Apparently.