Archive for the ‘Statistics’ Category

I’ve got the Power!

Wednesday, March 24th, 2010

We all know that I’ve got a bit of a toy habit, or at least we do now, so it is a little disingenuous for me to describe a PowerTap as my “Christmas Gift” to me, but that’s approximately what the rationalization was. What’s a PowerTap? We’ll get to that in a minute. First, we have the Song of the Blog:

Snap! – The Power

Like the crack of the whip, I snap attack,
Front to back, in this thing called rap.
Dig it like a shovel rhyme devil,
On a heavenly level,
Bang the bass, turn up the treble.
Radical mind, day and night, all the time
Seven to fourteen wise divine
Maniac brainiac winning the game
I’m the lyrical Jesse James

Back in December, Bob and Mom gave me a measurement package from Third Coast Training. While that was great to give me baseline numbers for how my metabolism worked in conjunction with my ability to pedal, I also wanted to have better data as I was riding to understand how I was progressing and what kind of calorie expenditure I was producing. For that, I needed a way to measure my power output, and that’s where the PowerTap comes into play. Beware, extreme cycling geekery begins here…

For those of you who have managed to put freshman physics behind you (did I mention that one of my riding buddies is Dr. Duck’s son-in-law?), here’s a quick refresher:
Force equals mass times acceleration

Work equals force times distance
Power equals work divided by time

When one pedals, the circular motion of the crank arms is turned into linear motion of the chain, which is then converted into circular motion by the rear (drive) wheel. As a result, force is applied in a constrained, pivoting plane, aka torque:

Are your eyeballs bleeding yet?

Once you get back from running away from your computer, screaming, we can get back to the narrative.

So, why all the technical stuff, and by “technical stuff”, I mean physics I’m embarrassed to admit to having had to do a bit of re-reading to refresh my understanding? Well, it turns out that the body is actually a machine! Yep, 100% full-blooded Cylon, that’s me. I guess I just didn’t know it at the time!

It turns out that the human body is somewhere between 20% – 25% efficient in converting stored energy into physical work. In other words, since one calorie is 4.184 joules, and one joule is the base unit of work, you can approximate how many calories you burned doing exercise by looking at your total work output and changing the unit of measure. Don’t forget, though, that metabolically we deal in “C”alories (aka kilocalories), so you are really comparing kilojoules (kJ) to Calories. So, if you want to know how many calories you really expended on a treadmill, see if the machine will tell you your total work output in kJ or Watts (Watt is the measure of Power, which is Work over Time, but it gets confused because the letter “W” often represents total Work in classical mechanics problems). If it tells you Calories, you don’t necessarily know what conversion process the machine is using to get to that number. Here’s one way to tell: if your Calorie expenditure seems sensitive to your weight, then chances are that the machine is computing Calories somewhat or completely independently of its power sensor. This is called foreshadowing.

So, back to this PowerTap thing. The PowerTap is essentially a torque sensor (strain gauge) built into the rear hub that transmits data wirelessly to my Garmin cycling computer. So, whenever I pedal, it sends a signal to my computer with how hard I’m pedaling for how long. The computer then aggregates the data for viewing and later analysis (I love the download capabilities of my Garmin). This then leads to some interesting possible scenarios between what the sensor says versus what some of the embedded physiological models in the computer say about how much work I’m doing at any given time.

Tri-County Hill Hopper – 2/21/2010
Back in February, I did a ride that began in Round Top, about 20 miles outside of Brenham, and that covered a bit over 60 miles of fairly rolling terrain. According to my Garmin, the 67.74 miles covered 3,165 feet of climbing and caused me to burn 6,338 Calories.
Google Maps for the 2010 Tri-County Hill Hopper

However, when I pulled the workout file into a software package that is dedicated to analyzing files from power meters, it said that I had “only” expended 3,557kJ, or approximately 3,600 Calories. Why the discrepancy? Simple, really. The calorie expenditure in the Garmin has embedded in it an assumption that all of the motion on the bike is caused by the rider (true) constantly putting power to the pedals (definitely not true — thank whatever deity you want that for very uphill there’s a down!). So, we go from “crunch all you want” to “good ride, but let’s stick to only one dessert.” Poo.

Effort vs. Ability

Wednesday, May 20th, 2009

The original thought behind a “web log” was to highlight interesting things on the web that you found and to bring it to the attention of the people who read your blog. Sort of like your own personal Yahoo! One of my clipping services brought me a story from The New Yorker that I feel compelled to share.

The article is about a girls’ basketball team in California that went to the national championship tournament basically by playing a full-time press. Anyone who knows anything about basketball knows that a press defense is HARD. It is a tremendous amount of work physically to pull off, and if you let-up, then a skilled team will demolish you easily. You get tired quickly. They score points. You go home. They laugh at your silly attempt to beat them. When it works, though, it works very well.

“My girls were all blond-haired white girls,” Ranadivé said. “My daughter is the closest we have to a black girl, because she’s half-Indian. One time, we were playing this all-black team from East San Jose. They had been playing for years. These were born-with-a-basketball girls. We were just crushing them. We were up something like twenty to zero. We wouldn’t even let them inbound the ball, and the coach got so mad that he took a chair and threw it. He started screaming at his girls, and of course the more you scream at girls that age the more nervous they get.” Ranadivé shook his head: never, ever raise your voice. “Finally, the ref physically threw him out of the building. I was afraid. I think he couldn’t stand it because here were all these blond-haired girls who were clearly inferior players, and we were killing them.”

There are a few references to Thomas Edward Lawrence, friend of the show, in the article, as well as references to some studies that look interesting but beg scrutiny for selection and measurement biases. The main idea, though, is one familiar to anyone who took one of Cliff Morgan’s classes at Rice. The simple idea is that effort (or “will” as Cliff used to talk about it) trumps raw ability and resources, and that if you really, really want to win, and are willing to work unconventionally to achieve it, then you end up winning an extraordinary percentage of the time. Conversely, if you are a member of the elite and can get your opponents to play you by conventional rules, then the expected outcome happens a significant portion of the time. Something to think about when looking overseas and contemplating such minor things as China’s role in funding the US stimulus package.

Anyway, give it a read.

Houston Area Survey on who supports transit

Saturday, April 25th, 2009

Rice professor Stephen Klineberg released the 2009 findings from the Houston Area Survey this week. I heard him address the Texas Economic and Demographic Association (TEDA) on Thursday.

Klineberg presents Houston Area Survey results

Klineberg has conducted this unique longitudinal survey of attitudes among Harris County voters every year since 1982. I’m especially interested in the questions related to transportation, planning, and urban/suburban issues. For example, when asked:

Which of these proposals would be the best long-term solution to the traffic problems in the Houston area: building bigger and better roads and highways, making improvements in public transportation, such as trains, buses, and light rail, or developing communities where people can live closer to where they work and shop? (TRAFFIC1)

50% of respondents said “transit” would be best, up this year from 41.6% in 2007. Further, more Houstonians aspire to use transit. When asked:

Agree/Disagree: Even if public transportation were much more efficient than it is today, I would still drive my car to work. (CARBEST)

45% of respondents disagreed, seeking an alternative to their car commute, up from 38% in 2007. Even Houstonians are coming to appreciate mass transit. That’s pretty damned cool.

One of Klineberg’s students — Trevor Gill — took the analysis further, data diving to see what transit supporters have in common. Gill used regression analysis to determine which other questions were most correlated with transit support. Here’s where things get interesting:

Do you believe that homosexuality is morally wrong or is it morally acceptable? (GAYWRONG)

People who believe homosexuality is morally wrong are significantly less likely to support transit: 43.5% vs 56.2%

For/Against: What about a true life sentence without the possibility of parole, as an alternative to the death penalty? (LIFESENT)

People who advocate the death penalty rather than life sentences are less likely to support transit: 42.6% vs 55.4%

Does the increasing immigration into this country today [rotate]: Mostly strengthen American culture; or: Mostly threaten American culture? (IMMEFFS)

People who believe immigration threatens American culture are less likely to support transit: 45.4% vs 54.7%

These three questions were more predictive than any others. Klineberg observed that what they have in common is comfort — or lack of comfort — with people who are different from oneself. People who are comfortable with diversity are much more likely to support public mass transit.

It’s tantalizing to assume the opposite, that transit opponents are all pro-death, gay-hating, bigots. But they taught us in statistics class that asserting the contrapositive is an error. But then continuing to oppose transit in an age of rising energy costs and dependence on foreign oil is an error, too. :-)

downtown Houston
Downtown Houston seen from the top of the parking garage at the Federal Reserve office on Allen Parkway, where Klineberg’s talked.

Fun with Stats

Saturday, October 11th, 2008

Years ago, when I registered the domain datapopulli.com, I dreamed of creating a site that was focused on highlighting key pieces of data that I thought people should know (e.g., the difference between a deficit and total debt, changes in the growth rate of the economy vs. the change in the economy itself). To that end, the guys at www.FiveThirtyEight.com have done that ambition one better as it relates to the Presidential election. Borrowing from my good friend, the Central Limit Theorem, they are trying to track the reliability of political polls at a fairly granular level.

I haven’t vetted them for bias, but I originally caught them on Dan Rather’s show on HDnet. It’s a great premise, and one for the stat geek poll watcher in all of us.

Hyperbole Season update

Monday, September 1st, 2008

For those keeping track, Gustav made landfall as a Category 2 hurricane. While my sympathies go out to those affected, I fear a backlash from those who bought into the hype generated by talk like the “storm of the century” for the next time when something else worrisome comes along.

Keep your gas tanks full, it’s hyperbole season

Sunday, August 31st, 2008

I’m not sure what happened, but somehow I got to be very sensitive to gross exaggeration and hyperbole along the way, especially when it comes to the use of history and statistics. Or at least I hope that it is really just me.  Today’s example comes from Ray Nagin, Mayor of New Orleans, as brought to us by the Chronicle:

“You need to be scared and you need to be concerned and you need to get your butts moving out of New Orleans right now — this is the storm of the century.”

Depending upon whether you are a traditionalist or not, the current century is either in its seventh or eighth year, and already we have had many strong hurricanes, Gustav merely being the latest. While I commend Mayor Nagin’s desire to convince people to evacuate, over-sensationalizing the danger isn’t necessary, but it just seems irresistible. For example, this should be warning enough for people who survived Katrina:

“For everyone out there that thinks they can ride this storm out, I have news for you, that will be one of the biggest mistakes you can make in your life.”

Mortal and imminent peril? You’ve got my attention. Mandatory evacuation? I’m packing. Free bus ride if I can’t afford it? I’m out the door. Person who is telling me all of this is blowing stuff out of proportion? Well, maybe I’ll stay. Exaggeration tends to blunt the message as it starts calling into question the messenger’s credibility, and this isn’t something where you need to overplay the danger. I don’t need it to be the biggest great white shark in the ocean for it to be a Bad Idea for me to go swimming right now.

Pop Quiz: Which was the “crime of the century” in the 20th century?
a) Lindbergh kidnapping b) Rosenberg conspiracy c) Tate/La Bianca murders d) Nicole Brown Simpson’s murder

That being said, these are some the less damaging examples. More pernicious, perhaps, is when a bureaucrat’s best intentions cause collateral damage. I have a love-hate relationship with government bureaucracy. On the one hand, as a consumer, I hate having to wait in lines and wish that things would be faster and more efficient so I could go about my day. On the other hand, I respect the wisdom of Frank Herbert’s Bureau of Sabotage. Bureaucrats’ most sublime purpose in life ought to be to blunt the ill-thought out, ill-defined, ill-targeted and ill-funded policies that come from the under-informed and over-zealous politicians who happen to make the mistake of getting enough other under-informed and over-zealous politicians to agree with him or her to make their will law.

Where was I? Oh, yeah, flood plain maps. After all, it is hurricane season. In case folks haven’t looked at the flood contours near where they live, I highly recommend wandering over to FEMA’s website, and taking a look at the relevant flood map for your area. The Harris County Watershed Maps from the Tropical Storm Allison Recovery Project (TSARP) are also fun.

What’s interesting about these maps is not so much what they are, but it is what they are not. What they purport to be is a topographical contour map that shows flood probabilities. The biggest problem is that they use a short-hand notation for probability (e.g., “100 year” and “500 year” flood plain) that is incredibly misleading. If I remember my Texas History from back in finger-painting school, Texas was inhabited by people like the Comanche, Apache and Karankawa tribes who, I believe, deleted all of their climatological databases from their hard drives when the neighborhood got so bad from “those people” moving in that they decided to move out. Or something like that.

Since climatology is, inherently, highly dependent upon empiricism and inductive methods, it seems odd to me that we would express probabilities (0.2% chance in a given year) in ways that were overly-reassuring given the nascent nature of the underlying science. In the back-half of the 1990s, I seem to recall half-a-dozen or so “100 year floods”. Not to open up a discussion on a Gambler’s Fallacy, or anything, but it seems like either God hates us or the models are bad.

This is before we understand that, necessarily, these models are done ex post facto, and don’t necessarily account for the continual re-shaping of the watersheds and the climate. The more of the Katy Prairie that gets paved over, the more downtown Houston is going to flood, no matter what the maps say. The more it rains in a given year, the more likely you are to get flooding (both from an independent and dependent probability perspective – ground saturates, after all). Analytical conveniences are convenient for the lay person who will struggle to grasp the basic concept, but they also often hide important information.

The big finish: we’re in the 500-year flood plain, but we’ve lost a car in the past to sheet flooding, so we carry flood insurance. I’m not saying you should, too, but just remember, if the water looks like it may be troubling, pay attention to it. And that’s not hyperbole, it’s just common sense, no matter how improbable you think it might be.