2008-05-06

The Problem with Voting, Part II



More friends privately emailed me about my last blog post (The Problem with Voting) than any post before it, although no blog comments. :(

A few people made a counter argument along the following lines:

One vote doesn't count, but people who think about voting the same way as me likely would think similarly to me on other issues, such as choosing the next president. If lots of people like me decide not to vote the same way I've done, that would be very bad for my interests. If instead we all voted, it would be very good for my interests.

This is a true statement, but it doesn't change the outcome. My voting or not voting has no affect on those other people out there. In statistical terms, each person's decision to vote or not is an independent decision. In economic terms, we see the tragedy of the commons.

The extension is a stronger argument: perhaps my decision is independent, but telling other people my decision and the logic behind it could affect their decision as well. This is certainly possible. If my comments reached alot of people it would have a real effect. You could do even the math: estimate how many people you could reach by discussing my decision, estimate how many might change their mind, and then do the math in my previous post using a larger range of values for the binomial probability density function.

For me, on a very good day, my blog gets about 75 visits. Only about 10% hit my front page, so I may have a 5-person/day reach or so for this post. Between now and November, maybe I'll hit 500 people. Even if all of those people were already going to vote the same way as I would have, and even if I caused them all not to vote, the probability of affecting the election is still tiny. Without doing the full calculation, I could grossly overestimate the probability at 0.000013% x 500 = .0065%, the actual number being much much smaller. If I were a talk show host or a sports star, my chance of having an effect might be more likely, but I'm making very generous assumptions anyway.

The Important Part:

I should have elaborated more on my conclusions before. Voting is participatory, symbolic, and has alot of personal meaning. In the same way that me driving a Prius won't make a dent in climate change, it means something to me to do my little bit. Prius vs. voting isn't that great of a comparison - one vote will have zero affect on the election, one prius will have a tiny but non-zero affect on climate change. I may indeed vote when it comes down to it, but if I end up voting it won't be because I expect to change the outcome, but rather because I want to "feel" that I'm part of the process.

My biggest gripe though is that this is where many people stop (I'm not referring to anyone who emailed me). They vote, and only once every 4 years. They feel that making change is someone else's job, yet they have strong opinions on what that change should be. The real truth is that voting is a pretty ineffective way for anyone to affect change, but there are other very effective ways out there. Not that I couldn't do more myself - I'm certainly black as the kettle, but many kettles are pretending they aren't not black by making *only* symbolic efforts.

My parents are role models in this regard. In 1976, they got involved in the Sierra club in South Carolina, wrote letters and organized and were able to keep Congaree Swamp from being logged, declaring it a National Monument. Later, it became America's 57th National Park. Imagine if all they did was vote for their favorite president and stick a Sierra Club bumper sticker on their car. Things would have been different.

2008-04-23

The problem with voting

A friend recently chided me for stating that I don't plan on voting in the general election come November. It is "my duty as an American citizen". I probably won't vote for the next President of the USA. It isn't as though I don't have my preferences though. It is basic mathematics.

Lets say CA(where I live) was a swing state (it isn't) and very close, so close in fact that the odds of any given person voting Republican vs. Democratic are exactly 50%/50% (It won't be). Lets further say that the same number of people will vote as in 2008, 12,255,311 people (likely to be far more if CA actually was a swing state) - reference wikipedia. Consider each person's vote a binomial random variable with p = 0.5 (50%) of voting either way and n = 12,255,310 people (I reduced by one to make this even). What is the probability that excluding my vote, the final vote will be exactly half of the people in each direction? Note, this is the only case where my vote will "count". This is easy to calculate. The probability of getting exactly k successes in n trials is given by the probability mass function:



Which is a pain to evaluate, even MatLab kinda bombs (I get an answer, but has very obvious error). If you approximate this as a normal distribution, which is fine given the large N, then you get good results in MatLab (octave):


octave:29> n=12255310
n = 12255310
octave:36> normpdf(n/2, n/2, n/4)
ans = 1.3021e-07


So, thats our answer. The probability of my vote affecting CA's outcome given our very generous inputs is .000013%. I think even this number is probably way high due to precision errors.

There is a philosophical approach to this as well that involves no math and is much shorter. Lets say that my vote is the deciding vote. If this were true, I sure as hell don't want to be that guy. What if I'm wrong? I am not going to spend the due diligence required to select the next leader of the free world. For one, none of the candidates are going to bother granting me an exclusive interview.

The obvious conclusion is that voting for Presidents is symbolic, not statistically meaningful. This is accurate in my humble opinion. However, you knew that. Yet you, like me, are still outraged about politics - either climate change (my favorite issue) or some other. Forget trying to elect a president. Your influence is much bigger in smaller ways. Work with local leaders: at your company, your neighborhood, your city, even maybe at a state level. Donate money to charities that are making a real difference (not lobbyists). Get involved. Changes can be made, but don't rely on a vote for a new president to make them happen.

2008-04-20

If you enjoy art

Urban Organic II
Cristin and I just got around to hanging "Urban Organic II", a piece my sister made, in our living room. Click on the image on the right to go to her website's gallery and see a much higher res version of the piece and some others. I think she is really quite talented, don't you?

2008-04-07

Deaths from Climate Change



I like this particular blog post (click on the image) alot. The graphic here is very descriptive of the affect of climate change. I think that alot of people see this issue as one that will make the temperature a little hotter and may kill some polar bears. It isn't clear how this is affecting humans yet, but this graphic helps bring it home. Remember also that things probably get exponentially worse over time.

2008-03-29

Earth Hour

I just found out about this, a little late. Go to google.com, the front page is black in honor of earth hour. In my little world, that means this is a big thing: Google virtually never pimps out their front page.

sudo crontab -e
00 20 29 03 * /sbin/poweroff

2008-03-08

NOAA Greenhouse Gas trends over time

These trends are fairly well known and understood by now, but I hadn't seen this particular link before. My father, Brian Grothaus, sent this to me a few weeks ago:




Click on the link for more video images. You can watch CO2 concentrations rise and fall over time over different latitudes. The higher latitudes have more landmasses hence more humans and plants. Humans add CO2 and plants reduce it. The reason for the seasonal up and down is that plants work harder in some seasons than others whereas humans pump out CO2 at a relatively smoother rate.

The CO2C13 graph (you'll need to click through to see this one) is particularly interesting. C13 is a rarish (1%) isotope of carbon that has an extra neutron, so I assume CO2C13 is the amount of CO2 with C13 isotype atoms. Here is my guess on the relevance of this graph: One of the interesting properties of C13 is that virtually no plants can absorb it. Corn is the big exception(possibly also sugarcane, not sure), but corn is only extensively present in recent history with farming. So, if most prehistoric plants don't have C13 in them, then most prehistoric animals won't either and hence nearly no fossil fuels will have C13 in them. So, if CO2 is rising but CO2C13 isn't, then you can attribute the increase solely to fossil fuels or massive burning of non-corn plant matter.

Either way, I like data and graphs, this was a fun one. Thanks Dad!

2008-03-03

Posting from Google Docs

That last post was all written using Google Docs. I'm doing that from now on. Blogger's composing interface is comparatively rudimentary - so much so that I usually find myself just writing raw HTML. Not so with docs, that was smooth.

Life is NP-Hard

I think that this is going to be one of my more interesting blog posts. It is philosophical in nature though and a bit long, so maybe it's boring, I don't know. Let me know in the comments if you like it or hate it. Lets get to it shall we?

NP-Hard Problems

In Software there is a set of Problems called NP-Hard problems. I think my audience would run screaming if I explained this in technical detail (either they already know it and would be bored or would find it boring in general). I'll give two examples though:

  1. Subset Sum: Given a list of N integers, determine whether or not any non-empty subset of these integers sums up to zero (or any other number).
  2. Traveling Salesman: Given a map of the world and a list of N cities find the shortest path for a traveling salesman to visit all of these cities.

The story as I understand it (and I may have this off) was that there were a bunch of really smart algorithms folks working on problems like these two over at Bell Labs(?) back in "the day". They were trying to find algorithms for solving these problems. The problem is that the only algorithms they could come up with took exponential time to solve as N grew. So, if they could solve the traveling salesman problem with 3 cities in 1 second, it might take 2 seconds to solve with 4 cities, 4 seconds to solve with 5 cities, 8 seconds with 6 citites and so on. By the time you hit 30 cities it takes you over 4 years to solve the problem. Well before you hit 1,000 cities no computer known to man can solve the problem before the sun explodes.

Thats a problem. It's also embarrasing if it is your problem and you can't solve it. Some folks tried the reverse approach. After getting tired of trying to find a faster solution, they tried to prove that there was no faster solution. This is a common approach for this kind of problem, it is good to know that you aren't stupid and you can prove it. Unfortunately they couldn't prove that there wasn't a faster solution either.

So, all of these smart folks started talking to each other. Someone then figured out that their problem was actually equivalent to someone else's - that is if you could solve one you could solve the other. They started asking around and determined that there were many of these problems and that in fact they were all working on the exact same problem, described in different ways. For example, the two problems I stated above, the Subset Sum problem and the Traveling Salesman problem, are the same exact problem.

Life is NP-Hard

Other than being mathematically the same problem, I see that most NP-Hard problems have some common characterstics:
  1. There are partial solution, such as a path between all of the citites which may not be the path.
  2. If you have two partial solutions, you can somewhat easily compare them and determine which one is better.

Many things in life have similar properties: If I look back at my life 1 year ago I can evaluate several things about my life now and my life then and directly compare them. Wealth is one thing, happiness (to a point) is another that I can do this with. The only problem is that I can't evaluate what the best possible state could have been today - what would have happened if I did X in the last year instead of the Y that I did. So, in a sense it is NP-Hard because the number of possible combinations of things in my life make it impossible for me to predict which combination will be the best, but I am somewhat (not completely) able to predict the outcome of a few different options. If I choose to go spend $100k on a new car, I have a good idea of how much that choice will affect my financially and a good idea of how much it will affect me in happiness. I don't know exactly, but I have a good idea (hence I don't buy said overpriced car).

Another example is the economy. I am not making a political statement, although it might sound a little like that right now. An economy is a state that can be directly evaluated and compared (the GDP of is $X today and $Y tomorrow), but the complexity of the state that made the economy the way it is makes it impossible to guarantee that it couldn't have been better (or worse). However, one can with some reasonable accuracy make some predictions about the path. For example, one might predict that lowering the Federal Interest rate will improve the economy and if that person was an expert, they could have high confidence in the effect of the choice.

OK, so I can't prove that the economy is mathematically equivalent to the traveling salesmen problem. I can't even prove that the sum subset problem is equivalent to traveling salesman. Still, I have a suspicion that they are equivalent or at least close
Solving NP-Hard Problems in Polynomial Time

Back to Software for a moment. It turns out that there is a common strategy for solving these NP-Hard problems. The strategy doesn't guarantee that you will find the best anwer, or even that you will find a good answer. But it guarantees to try and in practice usually it works very well. The strategy has a few different names, but a common name that is pretty layperson descriptive is "hill climbing". I'm going to steal some of the graphics from that wikipedia article and modify them, because I'm lazy and drawing 3d objects by mouse is kinda hard, so I'd better reference wikipedia.

Here is my best attempt at a non-technical explanation of hill climbing. Its actually pretty easy, so don't run away. Imagine you have one goal in life: namely to get as high (altitude not narcotic) as possible. Flying is out and to make things hard you are blind. But you do have a perfect GPS device that you can press a button on and it will tell you the exact height of the point you are standing on now.How would you try to get high? The simplest answer is hill climbing. Imagine that this image on the right (image here) is your world. You start out somewhere on this world. You take a step in any direction and see if you have gotten higher or not. If not, you step back and try a new direction. If so, you repeat the process. So, with every step you get progressively a little bit higher. If this image is your world, you would eventually get to the top, and it wouldn't take all that long either. That is hill climbing, and it solves NP-Hard Problems in Polynomial time. With travelling salesman, for another example, you would start with a random path through all cities, then try swapping the order of two cities in your original path. If the change gives you a shorter path, keep it, otherwise reverse it and try something else. It works pretty well.

The problem with hill climbing is that it doesn't always work perfectly. Imagine if instead our blind friend lived in the world on the left. There are two hills here, one being higher than the other. If our blind friend were to start climbing the left hill, he may very well get to the top of it, declare himself the highest man in the world since he can't climb any further, and he might be very wrong. How sad. This phenomenon in hill climbing is called "local maxima".

These "hills" are present in any problem. The height of the hill is it's utility: time to travel to all cities, wealth, etc. The x, y location are the parameters required to achieve that utility, although it is often far more than 2 dimensions that are at play.

The reason it works is that things are rarely completely random. Most of the time small changes in a situation have small effects on your utility function and large changes have large affects. Whether I choose to eat an apple or a banana has little affect on my happiness, but whether I choose to eat ice cream every day for the next month or excercise every day for the next month could have a large affect. The problem with large changes is that the larger they are, the less I can tell in advance what the outcome will be (remember, I'm blind on this hill). The ice cream tonight is stepping uphill - I know it will make me happier right now. Excercise is stepping downhill - I know it will cause pain and make me less happy right now, but it might be stepping downhill for the sake of eventually stepping up onto a much higher hill. On the other hand, it might not be because the downhill part is so long that I'll give up and walk back up my shorter hill by eating ice cream again.

Economics are another interesting example. A free economy, Adam Smith's laws of supply and demand, are a great way to allow hill climbing to work. If there is more demand for bread than apples, the price of bread increases until farmers decide to plant more wheat and less apples to increase their farm's revenue. The system prevents itself from going overboard - if the farmer produces too much wheat, it will suddenly become more valuable for him to produce more apples. Eventually the hill will be climbed when the perfect balance between apples and wheat is reached - and nobody needs to know what that balance is in advance (the "invisible hand" of economics). The problem with this is that there are local maxima at play in an economy. What if instead of growing wheat, the farmer could start researching a new apple that tasted twice as good. For many years, the farmer may be losing money (walking downhill) on this research until that better apple began to materialize. The longer the downhill stint, the harder it will be to get to a new hill. What if there exists a cheap way of producing limitless clean energy without coal or oil, but it takes billions of dollars of research money and a decade of research to discover it. Adam Smith would be hard pressed to get us there.

Self Help

So, now I'm given a mathematical basis for self-help material, yay. Climb Hills, but occassionally look for new ones. Makes alot of sense, but I find it comforting and useful to think of the world in this way.


PS: If you know the difference between NP-Hard and NP-Complete and caught me mixing them somewhere in there, don't complain in the comments, send me your resume, Google is interested. My rot13'ed email address is ttebgunh@tznvy.pbz .

2008-02-28

Whale Watching in Point Reyes

Point Reyes National Seashore is a national park about 1.5 hours north of the bay area peninsula. Its is a massive park, definitely my favorite that is this close. It is billed as the westermost point of continental land anywhere nearby and hence has certain wildlife that can't really be found elsewhere as readily, mainly birds.

This time of year (in general) is the Gray Whale migration. There are several places where one can see the whales from the CA shore (ie: without getting in a boat), but one of the best is probably the Point Reyes lighthouse. Cristin and I stumbled up to Point Reyes one weekend 2 years ago not knowing about the whales and got lucky: the lighthouse had already had dozens of sightings and were seeing another whale every 10-15 minutes. We probable watched whales go by for about an hour if not more. Not close enough to take photos, but definitely close enough to see them. Probably not worth the drive for itself, but Point Reyes is beautiful in it's own right.

I was up there about a month ago looking for whales, but the whales were a little late (or I was early, not sure). I snapped the above photo from the visitor center so I could remember when the peak season was. If anyone is interested in heading up there in about a month at the real peak season, let me know - I'll probably be up there some coming weekend.

2008-02-10

Building a site from scratch

I've been working on a website for my sister lately instead of writing blog posts. This was the source of inspiration for my last post Why Language Wars. I thought I'd blog a little bit with an update.

My sister is an aspiring artist in Tulsa, OK having graduated from Art School last year in Kansas City, MO where she was also running her own gallery. She no longer has the gallery but recently did a new show with new work in Tulsa at the TAC Gallery. She also recently changed her name from Sarah to Grace. All of these changes mean that her website needed some significant changes as well.

When I originally put together GraceGrothaus.com, It was SarahGrothaus.com. There were some interesting constraints:


  • Grace is not an expert in HTML, although she is also far from computer illiterate.

  • I am an expert, but I don't have alot of free time on demand nor knowledge of her business.



To satisfy these constraints, I decided that everything that I could make editable by Grace I would:

There is a "news" section on the site which gives readers information about upcoming shows, what Grace is working on, etc. While nowhere does the website say "blog", I used Movable Type for this news section and then customized the templates to get away from the idea that the site is a blog. In fact, the front page only has short snippets from the 3 most recent blog posts, not at all like this blog. The front page is primarily used to showcase the style of the current artwork.

More constraints:

  • We need non-blog pages: contact page, about the artist, the front page even.



Since we were using movable type, I went ahead and just used the templating system for all of the "static" pages like the "contact" page or the "artist" page. This way Grace can edit the static pages directly - while she isn't an HTML expert, it isn't too tough for her to change colors, text, and links within an already designed page.

More constraints:

  • Needed a photo gallery that allowed for the audience to see full-size versions of the art

  • A significant chunk of her audience is still using low-speed internet connections

  • The photo gallery needed to be a customizable template, to look professional, a link to flickr or picasaweb would unfortunately not suffice.

  • Grace is not an expert in web technologies - it needed to be reasonably non-technical for her to make changes



Any artist website worth it's salt has to have a gallery of art. I originally set this up using Gallery. I hacked around with Movable Type a bit so that the Gallery templates could be controlled directly through Movable Type just like the static pages - again making everything as customizable for Grace as reasonably possible. Gallery itself has a separate login for uploading photos, but beggers can't be choosers. I played with SmugMug as a solution here for awhile, but while it was more customizable, Grace didn't find it much easier to use and it was expensive (Gallery=free).


  • Lots of websites. Over a few years, we had registered SarahGrothaus.com (Grace's old name), GrothausPearl.com (Her physical gallery's website) and GraceGrothaus.com



This constraint was nicely solved by the fact that I lease a physical server in a datacenter which I use for projects like these - I can host as many domains as I want, the limit is hardware (cpu, bandwidth) not distinct urls/domains/etc. I just set all of these domains to 301 to GraceGrothaus.com.

The only other thing needing doing was Analytics. Grace already uses gmail, so she has a Google login - it was a no brainer to drop in Google Analytics.

It is interesting how much you can do for nearly free (sweat equity) if you have a box somewhere that you can host stuff on. Go check out the site at GraceGrothaus.com and let me know what you think.