Search This Blog

Tuesday, March 26, 2019

Small Data (really small) and Expectation Management

Years ago, my wife and I went to see the movie Romancing the Stone. We were visiting a small town and it was the only movie playing. It was new in theaters and we didn't know anything about it.

We loved it. We told lots of people how good it was.

We loved it so much that we went to see it again about a month later. It was still good, but it wasn't great. We realized that we had zero expectations the first time - we were just looking for something to do - and high expectations the second time.

Years later, our friends were raving about My Big Fat Greek Wedding. They insisted that we see it. Really insisted. We were told that we needed to see it.

We finally went and it was a disappointment. It wasn't a bad movie, but no movie could live up the hyped reviews we heard.

Over the years we've referred back to those movies when we find ourselves reacting differently than expected. We recently went to a restaurant that someone close to us insisted that we try. It was disappointing. Then one of us said "I guess this was a Big Fat Greek Wedding instead of Romancing The Stone". It was actually a nice restaurant but it couldn't possibly live up to the expectations we were given

In related news, I just finished reading The Undoing Project by Michael Lewis. I learned some of this material in graduate school but, as usual, Lewis does a great job telling the story. The discoveries of Kahneman and Tversky explain our experience with the movies and the restaurant.

Small data, such as word-of-mouth reviews from a few friends, are poor statistical samples but people still give it significant weight in forming judgments. With social media, small data can get repeated and amplified so that it looks like much larger data and, again, people will give it significant weight in forming judgments.

We all want good reviews for our endeavors, but we should also want accurate reviews. What if I do good work, but my good work merely meets your expectations (or even falls slightly short). I'd rather be judged against an accurate expectation than an inflated one. However, in the world of small data where people aren't completely rational, I'm not sure how to make that happen.

Tuesday, March 12, 2019

Using Excel's Filters (Spring 2019)

I just posted a new video for my students on YouTube.




Tuesday, December 11, 2018

Are Bikes Legally Faster or Just Faster (and What Difference Does it Make)?

As a bicyclist who rides for both recreation and commuting, articles about bike-vs-car speeds catch my attention. Here's one backed up by data! Yes, actual data (because, you know, data matters).

However, I have questions about the data. From my own bike commuting experience, I fully accept that a bike can be as fast as a car. However, there are only two ways that a bicycle can actually be faster than a car.

  1. The bike has access to different routes than cars. There could be bike paths that cut through parks, across rivers, etc. that cars can't drive on. This allows bikes to bypass congested streets and intersections. There could also be dedicated bike lanes along the roads that give bicycles different legal rights. I experienced this on a recent visit to Washington DC. There was a path near our hotel that went past the airport, through a park, and over the river with no stop signs. It was a shorter and faster trip to the National Mall than the best car route.
  2. The bike uses the same routes as cars but passes on the right at every traffic signal. In heavily congested traffic, this allows bikes to get ahead of the cars. When traffic is stopping every few blocks, this can create a significant time advantage for bikes over cars. I've also experienced this in a variety of cities.
So here's the problem.

Under #1 above, too many cyclists think that sidewalks are legitimate routes for bikes. In most cities, that's illegal. It's also dangerous when there's pedestrian traffic. To clarify, I'm talking about actual sidewalks, not multi-user paths. Legally, those are two different things.

Under #2, in the absence of dedicated bike lanes, passing on the right is usually illegal and dangerous.

So when "Data From Millions of Smartphone Journeys Proves Cyclist Faster" I'd like to know what percent of those "millions" of journeys were completely legal. Based on my personal experience biking and talking to other bikers, I'm suspicious but I don't have data. Even if I had their data, I doubt that it would show whether or not the biker or cars broke any laws.

That leaves me at an impasse. Without data, I can't find evidence to support or contradict my suspicion.

That brings me to the second part of my title: does it matter?

Let's assume that I'm right and a large proportion of the "bikes are faster" data is from illegal riding. If the law is rarely, or never, enforced then is it really a law? The last time I saw an officer stop a bicycle for riding on a sidewalk was when Barney Fife stopped the spoiled kid in downtown Mayberry. I've never seen a bike stopped for passing on the right. If our culture accepts this sort of biking, then maybe it doesn't matter if it's technically illegal and it's fair to simply say "bikes are faster".

On the other hand, what if you're the insurance company that provides workman's compensation or liability coverage for Deliveroo? If a delivery rider gets injured or causes injury, then your company's financial responsibility could change if the rider was breaking the law. Even if "bikes are faster", you might want to encourage the use of cars if bikes are more likely to break the law.

I would argue that the legality issue does matter. Now how do we get the data?


Friday, December 7, 2018

Data Access Versus Data Privacy: US Census

I came across an interesting TheUpShot article in a post from FlowingData. It seems that analysts have found ways to pull individual data records out of aggregated Census data that is supposed to protect our privacy.

This problem shouldn't be a surprise to anyone who has spent time working with Census data. We use census data extensively in my introductory statistics class. One semester the class spotted a divorced 13-year-old female in our sample. The sample included her county and state.

Another time, we uncovered a 42-year-old female lawyer whose fourth marriage was within the last year. Again, we had county and state information.

We didn't try to figure out who they were but we talked about whether or not we could figure it out. it depends on where they lived. Had both of them lived in Los Angeles County California (population 10.2 million) it would have been difficult. Had they lived in Langlade County Wisconsin (population 19,000) it wouldn't have been very hard to go through public marriage and divorce records to find them.

On the negative side, it's amazing how little statistical ability someone needed to spot these opportunities for bypassing privacy.

On the positive side, these two had to stand out from the rest of the data in order to get noticed and most of us don't stand out.

However, just a little more statistical ability and a few more variables would change what it takes to "stand out". Maybe you and I are more unusual than we think we are and, therefore, we're easier to identify. That's what the researchers in the linked article claim.

Before you panic and refuse to participate in any future Census, read the article. The Census Bureau is aware of the problem and they're working on it. That's both good and bad. It's good that the Census Bureau takes our individual privacy seriously, but it's bad that the solution might be intentionally screwing up the data.

One solution is virtually moving people (which is a nice way of saying "falsify the data"). Maybe the 42-year-old lawyer doesn't actually live where the data says she lives. Is it OK to swap her with another woman in a different census block (the smallest geographic unit)?  If that's OK, is it OK to swap her county? How about her state?

It depends on your level of geographic analysis. Counties and states are often poor units (see MAUP). Census tracts or blocks are more useful.

As a researcher, I want the best data I can get and Census data is considered the gold standard of publically available data (trust me, private companies know a lot more about you). On the other hand, I value data privacy.

I'm glad that the Census Bureau has to solve this instead of me.