the @whitehouse listens to people #healthcare @blurb : the true power of #twitter
Image you're a president leading a couple of million people, all with a voice of their own, and want to boldly go where no president has gone before: reform the Healthcare system of the United States. Of course you have a Twitter account @whitehouse and occasionally tweet about what #obama is doing, who he is meeting, and post pictures of his dog Bo.
Well, that is all normal, though somewhat modern. Nice with over a million followers. But the Obama administration really gets the Internet, and understands the true power of Twitter. A lot of my friends have the same problem understanding what twitter is about... they claim
What's the fuzz all about, with Twitter... it's just about burping out irrelevant 140 character marketing messages?
Well, you get it wrong! Do not underestimate the power of the @ sign... if you have enabled it, you get on your page all mentions of your account by other people. If you want to follow RT/retweets or questions or just mentioning, that is incredibly valuable.
This just happened to @blurb, or Jon Armstrong, the husband of @dooce, one of the most famous webloggers in the world, who I follow for years now.
This is what happened:
This is what the true power of Twitter is about! An openly accessible channel of interacting with your followers. I am impressed by how the Obama administration is using the Internet in a modern way and hope they succeed in getting this bill passed the old fashioned reaganomic senators.
Here is an article in the NY Times about an American expat living in The Netherlands giving a truthful account of the benefits and drawbacks of how we in Holland organize taxes and healthcare
Well, that is all normal, though somewhat modern. Nice with over a million followers. But the Obama administration really gets the Internet, and understands the true power of Twitter. A lot of my friends have the same problem understanding what twitter is about... they claimWhat's the fuzz all about, with Twitter... it's just about burping out irrelevant 140 character marketing messages?
Well, you get it wrong! Do not underestimate the power of the @ sign... if you have enabled it, you get on your page all mentions of your account by other people. If you want to follow RT/retweets or questions or just mentioning, that is incredibly valuable.
This just happened to @blurb, or Jon Armstrong, the husband of @dooce, one of the most famous webloggers in the world, who I follow for years now.
This is what happened:
- the @whitehouse asked its 1M followers what they would like to hear more on Twitter
- among others @blurb comments:
@whitehouse it is time for the President to bust out some charts and graphs showing where US is in the world on healthcare.
- the people from the Obama administration, who are dealing with advocating their healthcare renewal to the people, and having a hard time explaining the benefits to people, reply to him:
@blurb says “bust out some charts and graphs” Busted: Hidden costs http://bit.ly/yfBJB Coverage denied http://bit.ly/mFtJoThey actually do what Jon has asked: link to some interesting facts and figures about the benefits of the new healthcare bills, and hidden problems in the current system.
This is what the true power of Twitter is about! An openly accessible channel of interacting with your followers. I am impressed by how the Obama administration is using the Internet in a modern way and hope they succeed in getting this bill passed the old fashioned reaganomic senators.
Here is an article in the NY Times about an American expat living in The Netherlands giving a truthful account of the benefits and drawbacks of how we in Holland organize taxes and healthcare
Is the Lottery tax on the Stupid?
Often we get calls by people trying to sell lottery tickets. These call agents are often students who follow a pre defined script to lure people into their business by relating to their fear of loosing. The students themselves (and most people) have no idea on statistics, and (like all people) have no good understanding of low probabilities. This is why we feel afraid to get on airplanes, while the chance of dying on the way to the airfield by car, is much higher.
By government regulation, all official lotteries should return a minimum of 60% of their earnings. A really nice number to throw back at these call agents. I wanted to understand the dynamics of this a little bit better, so I did some probability analysis.
We'll create a very simple lottery: people by a ticket, and all prize money is given out to only one winner each time.
Let's define
The Grand Prize is thus 0.6 * N * p
Your chance of winning (if you buy one ticket) is 1 / N
Initially this looks like a bank account with -40% interest. But treating a lottery like this is not really fair, right? Even if your chance of winning is very low, just the suspension of maybe-winning, and dreaming about the Porsche you are going to buy, is worth something. That is why reasonable people still may join the lottery. I was wondering: just how much is that suspension worth? Let's see if we can derive that.
You have a chance of 1/N of winning a Grand Prize of 0.6*N*p, and you have a chance of (N-1)/N of not winning anything and simply loosing your ticket: ie. winning -p.
The estimated value therefore is simply the sum of both products: 0.6*N*p/N + (N-1)/N*-p = 0.6*p - p = -0.4p
This makes sense: On the long run you are going to loose your money, but win 60% back, so you will loose 40% of the ticket price.
Let's say that you have a choice of participating in a lottery. You have some money p and you can choose to buy a ticket with it, or not.
This is interesting because
The other person is not very happy, he lost E100. Well, not happy: he got some suspension, and it was worth E140 to him, otherwise he would not have bought the ticket.
This N=2 lottery is quite likely to not lure any people into buying it (if you feel different, please contact me and I'm happy to take your money). The feeling is, that whether or not you are likely to buy a lottery ticket, does depend on N (or better: on the Grand Prize 0.6Np): if the prize gets bigger, the suspension grows, and thus its value, and its value will be larger than 1.4p sooner.
But: as N grows, not only does the Grand Prize grow, also your chance of winning it will decrease, which is a negative effect. I would assume that the perceived value of the lottery suspension would grow as N grows larger than 2, but after N grows very very large, it would drop again. Maybe it would not drop all too soon, because we have a hard time understanding just how small small chances are (e.g. the suspension value grows with N, but drops with log N or something). So, the suspension value of a lottery ticket will depend on N (the number of tickets) like this:

(for smart people that is). This means that it makes sense for smart people to buy a lottery ticket between Na and Nb (if for them, the graph actually has a top higher than 1.4p; for very smart people this does not happen for any p, it simply grows a bit. Very smart people find their suspension in other ways).
I think it is likely that 'dumb people' simply do not get this decrease of the perceived value of lottery suspension, and their graph simply grows indefinately, maybe to an asymptote. This is why when N or 0.6Np becomes very large (for instance for some European lotteries occasionally when the Jackpot is about to hit), a lot of dumb people buy this ticket, and not less (as you would expect if there are a lot of smart people).
Fortunately for lottery companies, there are a lot of dumb people in the world. They do not understand mathematics or probability theory, and defininately have not read this boring weblog post all the way up to here. The fact that you read this means you are either a Smart Person, or a Very Smart Person. Your choice.
In case you're wondering: I am very smart ;-). I do not buy lottery tickets, even if N grows large. Ah, that is not entirely true; I may buy one if I have so much money that I feel I do not care about loosing p. That means that for some lottery ticket prices, I may think that my money p is worth nothing to me if I do not buy the ticket (ie. I do not care if I loose it). Let's say the ticket price is E1, then maybe sometimes I like the suspension more than the 0.4p (not 1.4p!) and buy a ticket (for N=Nx)
How do you explain to your mathematical conscience that you're buying lottery tickets?
By government regulation, all official lotteries should return a minimum of 60% of their earnings. A really nice number to throw back at these call agents. I wanted to understand the dynamics of this a little bit better, so I did some probability analysis.
We'll create a very simple lottery: people by a ticket, and all prize money is given out to only one winner each time.
Let's define
- p as the price of one ticket
- N the number of people actually buying the ticket
The Grand Prize is thus 0.6 * N * p
Your chance of winning (if you buy one ticket) is 1 / N
Initially this looks like a bank account with -40% interest. But treating a lottery like this is not really fair, right? Even if your chance of winning is very low, just the suspension of maybe-winning, and dreaming about the Porsche you are going to buy, is worth something. That is why reasonable people still may join the lottery. I was wondering: just how much is that suspension worth? Let's see if we can derive that.
You have a chance of 1/N of winning a Grand Prize of 0.6*N*p, and you have a chance of (N-1)/N of not winning anything and simply loosing your ticket: ie. winning -p.
The estimated value therefore is simply the sum of both products: 0.6*N*p/N + (N-1)/N*-p = 0.6*p - p = -0.4p
This makes sense: On the long run you are going to loose your money, but win 60% back, so you will loose 40% of the ticket price.
Let's say that you have a choice of participating in a lottery. You have some money p and you can choose to buy a ticket with it, or not.
- If you do not buy a ticket, by the time the lottery is ready, you will still have the money, right? Well, actually it may be worth a little bit less by inflation, but that should be covered by putting it on a bank with interest. Let's be conservative and simply say that if you do not buy the ticket, you will end up with p (0% profit).
- If you do buy the ticket, you will end up with -0.4p
This is interesting because
- the Lottery is a bank account not with -40% interest, but with -140% interest. Right?
- if you buy a lottery ticket, you should do only iff you like the (low) chance of winning more than 1.4p
- this price of suspension, is not depending on N here!
The other person is not very happy, he lost E100. Well, not happy: he got some suspension, and it was worth E140 to him, otherwise he would not have bought the ticket.
This N=2 lottery is quite likely to not lure any people into buying it (if you feel different, please contact me and I'm happy to take your money). The feeling is, that whether or not you are likely to buy a lottery ticket, does depend on N (or better: on the Grand Prize 0.6Np): if the prize gets bigger, the suspension grows, and thus its value, and its value will be larger than 1.4p sooner.
But: as N grows, not only does the Grand Prize grow, also your chance of winning it will decrease, which is a negative effect. I would assume that the perceived value of the lottery suspension would grow as N grows larger than 2, but after N grows very very large, it would drop again. Maybe it would not drop all too soon, because we have a hard time understanding just how small small chances are (e.g. the suspension value grows with N, but drops with log N or something). So, the suspension value of a lottery ticket will depend on N (the number of tickets) like this:

(for smart people that is). This means that it makes sense for smart people to buy a lottery ticket between Na and Nb (if for them, the graph actually has a top higher than 1.4p; for very smart people this does not happen for any p, it simply grows a bit. Very smart people find their suspension in other ways).
I think it is likely that 'dumb people' simply do not get this decrease of the perceived value of lottery suspension, and their graph simply grows indefinately, maybe to an asymptote. This is why when N or 0.6Np becomes very large (for instance for some European lotteries occasionally when the Jackpot is about to hit), a lot of dumb people buy this ticket, and not less (as you would expect if there are a lot of smart people).
Fortunately for lottery companies, there are a lot of dumb people in the world. They do not understand mathematics or probability theory, and defininately have not read this boring weblog post all the way up to here. The fact that you read this means you are either a Smart Person, or a Very Smart Person. Your choice.
In case you're wondering: I am very smart ;-). I do not buy lottery tickets, even if N grows large. Ah, that is not entirely true; I may buy one if I have so much money that I feel I do not care about loosing p. That means that for some lottery ticket prices, I may think that my money p is worth nothing to me if I do not buy the ticket (ie. I do not care if I loose it). Let's say the ticket price is E1, then maybe sometimes I like the suspension more than the 0.4p (not 1.4p!) and buy a ticket (for N=Nx)
How do you explain to your mathematical conscience that you're buying lottery tickets?
Augmented Reality is Real
The new hype of 2009 is augmented reality: live video enhancing; see Layar. If you've never seen it work on your computer, do the following
this will open up a whole new world of opportunities. I want it on my glasses to automatically track the people, cars and places I see with information from web services.
- print out this PDF star
- go to http://sodiuminteractive.com/dropbox/flar/
- allow Flash to open your webcam
- hold the printed paper in front of the camera and move it
this will open up a whole new world of opportunities. I want it on my glasses to automatically track the people, cars and places I see with information from web services.
Error messages
Back from vacation and back to work. Today has been a day of error messages. Well, a day in which I was reminded that having good error messages and safeguarding mechanisms in your code is imperative.
I was installing a latest Shindig release on Tomcat. Followed instructions, the service was starting up correctly, but I got 404 errors on the sample URL. On any sample URL from the shindig web-app, that is.
Because I know Tomcat a little bit, I found the error in the log file:
Aug 18, 2009 1:55:56 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.apache.shindig.common.servlet.GuiceServletContextListener
com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: java.lang.NoClassDefFoundError: javax/el/ELResolver
at com.google.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
Hmm, very helpful right? Why can't it find javax.el.ELResolver?
Well, Googling it did not help that much; references to other people getting this error because of different servlet.jar files in their classpath?
Then I looked up what the ELResolver is about actually, and noticed it was new in JSP 2.1, which is fairly new. Maybe the servlet container is the wrong version? And yes it was. Tomcat 5.5 does not support JSP2.1, Tomcat 6 does.
So I installed Tomcat 6, and it worked.
What is my point here? Well, why didn't the Shindig installation page indicate the minimum requirements for the servlet container? And why doesn't the web application give an error like "Expected version 2.1+ of JSP, found version 2.0?
Well, I made the same mistake myself too. Today fixed a little problem in my highly succesfull FlickrWallpaper program, crashing with a stupid error message if no images were found for a tag. Seems even I can make mistakes ;-)
And I learned again an important programming rule:
Prepare for the worst, Expect the unexpected, and give intelligible error messages as early as possible
Update: ah of course it did not work just yet... it just looked like that. Shindig starts up, but there is a JavaScript error that is very hard to see (only in IE?):
'gadgets' is null or not an object
How's that for an error message, right? Well, it turns out, Shindig (outside of Jelly) requires to run as the ROOT context, and has an incredible number of hard coded paths in the web-app! Even includes references to port 8080 in its configuration. Read more about a poor guy's trouble with Shindig on this helpful weblog.
Well, I renamed the WAR to ROOT.war and removed default ROOT in Tomcat, and now it seems to work. Well, let's see.
I was installing a latest Shindig release on Tomcat. Followed instructions, the service was starting up correctly, but I got 404 errors on the sample URL. On any sample URL from the shindig web-app, that is.
Because I know Tomcat a little bit, I found the error in the log file:
Aug 18, 2009 1:55:56 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.apache.shindig.common.servlet.GuiceServletContextListener
com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: java.lang.NoClassDefFoundError: javax/el/ELResolver
at com.google.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
Hmm, very helpful right? Why can't it find javax.el.ELResolver?
Well, Googling it did not help that much; references to other people getting this error because of different servlet.jar files in their classpath?
Then I looked up what the ELResolver is about actually, and noticed it was new in JSP 2.1, which is fairly new. Maybe the servlet container is the wrong version? And yes it was. Tomcat 5.5 does not support JSP2.1, Tomcat 6 does.
So I installed Tomcat 6, and it worked.
What is my point here? Well, why didn't the Shindig installation page indicate the minimum requirements for the servlet container? And why doesn't the web application give an error like "Expected version 2.1+ of JSP, found version 2.0?
Well, I made the same mistake myself too. Today fixed a little problem in my highly succesfull FlickrWallpaper program, crashing with a stupid error message if no images were found for a tag. Seems even I can make mistakes ;-)
And I learned again an important programming rule:
Prepare for the worst, Expect the unexpected, and give intelligible error messages as early as possible
Update: ah of course it did not work just yet... it just looked like that. Shindig starts up, but there is a JavaScript error that is very hard to see (only in IE?):
'gadgets' is null or not an object
How's that for an error message, right? Well, it turns out, Shindig (outside of Jelly) requires to run as the ROOT context, and has an incredible number of hard coded paths in the web-app! Even includes references to port 8080 in its configuration. Read more about a poor guy's trouble with Shindig on this helpful weblog.
Well, I renamed the WAR to ROOT.war and removed default ROOT in Tomcat, and now it seems to work. Well, let's see.
