Friday, November 23, 2012

Newcomb's Decision

This post is partially a continuation of my previous posts on utilitarianism, and partially on philosophy in general; mostly, it's my two cents on one of the odder parts of consequentialist debate: decision theories.

Newcomb's Paradox

You, a mere mortal, encounter P, some super smart alien.  Or maybe it's a supercomputer, or maybe a god; versions of the paradox differ on this.  P comes up to you and says: "I have a deal for you.  I'm going to give you two boxes--box A, and box B.  Box B is transparent, and you can see $1,000 in it.  You can't see what's in box A.  I'm going to give you two choices.  The first is to take box A--you get whatever is in it.  The other choice is to take both boxes--you get box A, plus the $1,000 from box B."

So, you ask, why don't you take both boxes, getting the free $1,000?  Well, says P, there's a catch: "I have predicted whether you will take one box or two boxes."  (Or maybe I've simulated all of the atoms in the universe, or maybe studied your psychology, or maybe something else--versions of the paradox differ in how P knows how many boxes you're going to take.  But however he knows it, you believe him; maybe he has, in the past, predicted everyone who's taken this challenge successfully.)  "So I know what you're going to do", says P, "and before you arrived I decided how much money to put in box A.  If I predicted that you were going to take only box A, I put $1,000,000 in it.  Otherwise--if I predicted that you were going to take both boxes--I left box A empty."



"So", says P, "How many boxes do you want to take?"

Sunday, November 11, 2012

Elections and the Future

The Democrats' victory in the 2012 elections--primarily President Obama's reelection but also the Democratic caucus in the senate growing by three senators*--has caused a fair amount of hand wringing among conservative circles about the future of the Republican party--the new fashion in political circles seems to be guessing which of opposition to comprehensive immigration reform, opposition to gay rights, and opposition to tax hikes for the wealthy will have been felled by the 2012 election.  I agree in large part with the long term trend of American politics, but I think it's important to keep it in perspective.


Tuesday, November 6, 2012

Election 2012 liveblog

Welcome to the Measuring Shadows 2012 election liveblog!  We'll be live chatting on the widget to the right, and writing longer comments on this page.





Monday, November 5, 2012

Lame38, and liveblogging the election

I will be liveblogging the election tomorrow night on this blog, starting with some posts early in the day but picking up around 7pm.  But why should you follow this blog?

Because there is a crisis waiting to unfold tomorrow night: what if polls close have just closed in Virginia but Nate Silver hasn't updated fivethirtyeight yet?  How will you know if Obama's chances of winning the election have jumped to 92.5% or plummeted to 91.5%?

It is in the hopes that this catastrophe may be averted that I unveil Lame38: a shitty version of 538 that I promise to update frequently.  What is Lame38?  Well, I took all of the projections from fivethirtyeight, created a simplified model, and will run it with updated results--giving a real time projection of what Obama's chances of winning are, incorperating both states that have been called and the actual votes from noncompetitive states.




Q: Why is this better that 538?
A: Well maybe 538 will take like 15 minutes to update but Lame38 will only take 5 minutes.  That'd be pretty cool, right?

Q: So it's just a shittier version of 538?
A: That's kind of a rude question.

Q: What information does your model incorporate as the night goes on?
A: I incorporate not just what states have been called, but also popular vote results from each state to try to estimate biases in the projections.


Q: So how does Lame38 work?
A: I took the projected vote differences and errors for each state from fivethirtyeight, as well as the standard deviation of the national popular vote.  For each simulation I will sample a national popular vote, bias each state by its difference from the projected national popular vote (to estimate national bias), and then sample each state's vote.  I then run about 1,000,000 simulations.

Q: So, what are the odds Obama wins the election?
A: Well, 538 says 92.2*%, and Lame38 says 93.5%, so I'd say the answer is about 92.2%.

Q: What else will you be blogging about?
A: Senate races, the race for California's 15th congressional district, and whatever else is on my mind.

Q: Will this be a great liveblogging, or the greatest liveblogging?
A: I'm shooting for "worth reading".

I hope to see you there!



*When I ran the simulations; 538 has since updated to 92.0%.

Thursday, August 16, 2012

Checking in on Tim Lincecum

A month ago I wrote an article looking at changes in San Francisco Giants' starting pitcher Tim Lincecum's pitch command and velocity this season.  In particular, I found that the velocity on his fastball and slider had decreased by about a mile per hour, and that the average distance of his pitches from the edge of the strikezone had increased--assuming that, generally, pitches near the edge of the strikezone are better than those in the middle or nowhere near it.

Since the all-star break, though, Lincecum's ERA, at least, has been a respectable 3.66.  Have his command and speed improved as well?

It turns out that his speed is the same as earlier this year, with a fastball averaging around 90.4 mph, and about a mile per hour slower than last year.  So, no improvement on that front.

His average distance from the edge of the strikezone, on the other hand, has gotten a bit better--it's been at .940*, as compared to .923 last year and .961 for the first half of 2012**.

So, long story short, there are some signs that his pitching might be picking up but nothing conclusive.


By the way, I'll be announcing results from the second contest and introducing the third one in the next day or two.

_________________________________________________________________________________
The value for the second half of this year is only statistically significantly different from the value from last year, and from the value for the first half of this year, at the p= .30 level--so the jury's out on this one.

Monday, August 13, 2012

Checking in on the Giants' lineup

Earlier a wrote a few posts on what the SF Giants' optimal starting lineup should be using Basim, a baseball simulator I wrote.  A lot has changed since then, though--Posey has become much better, Blanco and Pagan have cooled off, and Hunter Pence and Marco Scutaro have joined the club.  So, what should the Giants' lineup look like now?  What lineup do I hope they start tonight?

First off, here was my guess at their best lineup (once again assumin Zito is the pitcher):

1.  Buster Posey
2.  Brandon Belt
3. Melky Cabrera
4. Pablo Sandoval
5. Hunter Pence
6. Marco Scutaro
7. Angel Pagan
8. Brandon Crawford
9. Barry Zito

Running this lineup through the simulator*, it scored an average of 4.03 runs per game.

I then found that a random lineup (i.e. random ordering of the nine players) scored about 3.89 runs per game.  The lineups that the simulator liked the best generally had Posey, Belt, Cabrera, or Pence batting leadoff, which is unsurprising--each has either a high OBP or a high ground into double play rate that would be very painful in the heart of the order.  The single lineup that the simulator liked best** was the following:

1. Buster Posey
2. Angel Pagan
3. Hunter Pence
4. Brandon Belt
5. Melky Cabrera
6. Marco Scutaro
7. Pablo Sandoval
8. Brandon Crawford
9. Barry Zito

It scored an average of about 4.035 runs per game***.


I then looked at two lineups that were close to what I predict the Giants will run; they differ only in whether the Giants play Theriot or Crawford; the lineup Pagan, Scutaro, Cabrera, Posey Sandoval, Pence, Belt Theriot, Zito scored an average of 3.96 runs per game, while the same lineup but with Crawford batting for Theriot scored 4.00 runs per game on average.  So, it seems like about half the difference between my lineup and the one with Theriot just comes fromt the fact that Craword is better than Theriot.

Anyway, here's to hoping the Giants will do something smart.

_________________________________________________________________________________
*: For Pence and Scutaro I used their pre-Giants numbers.

**: This should be taken with a grain of salt--to actually find the best would take days of simulation; treat this as a lineup that is pretty close to the best.

***: FWIW, the ten best starting lineups, according to the simulatr (with the same caveat as **), in the form (lineup, average runs scored by lineup per game): [(['Buster Posey', 'Melky Cabrera', 'Brandon Belt', 'Marco Scutaro', 'Hunter Pence', 'Pablo Sandoval', 'Angel Pagan', 'Brandon Crawford', 'Barry Zito'], 4.0152400000000004), (['Brandon Belt', 'Buster Posey', 'Pablo Sandoval', 'Melky Cabrera', 'Hunter Pence', 'Angel Pagan', 'Brandon Crawford', 'Barry Zito', 'Marco Scutaro'], 4.0168675), (['Melky Cabrera', 'Buster Posey', 'Brandon Belt', 'Marco Scutaro', 'Pablo Sandoval', 'Brandon Crawford', 'Angel Pagan', 'Hunter Pence', 'Barry Zito'], 4.0179150000000003), (['Brandon Belt', 'Buster Posey', 'Pablo Sandoval', 'Melky Cabrera', 'Hunter Pence', 'Brandon Crawford', 'Angel Pagan', 'Marco Scutaro', 'Barry Zito'], 4.0218325000000004), (['Melky Cabrera', 'Brandon Belt', 'Marco Scutaro', 'Pablo Sandoval', 'Angel Pagan', 'Hunter Pence', 'Buster Posey', 'Brandon Crawford', 'Barry Zito'], 4.0219899999999997), (['Hunter Pence', 'Marco Scutaro', 'Buster Posey', 'Pablo Sandoval', 'Brandon Belt', 'Melky Cabrera', 'Angel Pagan', 'Brandon Crawford', 'Barry Zito'], 4.0253224999999997), (['Brandon Belt', 'Hunter Pence', 'Pablo Sandoval', 'Angel Pagan', 'Melky Cabrera', 'Brandon Crawford', 'Marco Scutaro', 'Buster Posey', 'Barry Zito'], 4.0315525000000001), (['Hunter Pence', 'Angel Pagan', 'Brandon Belt', 'Melky Cabrera', 'Buster Posey', 'Pablo Sandoval', 'Marco Scutaro', 'Brandon Crawford', 'Barry Zito'], 4.0322525000000002), (['Marco Scutaro', 'Pablo Sandoval', 'Brandon Belt', 'Melky Cabrera', 'Buster Posey', 'Hunter Pence', 'Brandon Crawford', 'Angel Pagan', 'Barry Zito'], 4.0353874999999997), (['Buster Posey', 'Angel Pagan', 'Hunter Pence', 'Brandon Belt', 'Melky Cabrera', 'Marco Scutaro', 'Pablo Sandoval', 'Brandon Crawford', 'Barry Zito'], 4.0365225000000002)]

Second contest ends tonight (Monday night)

Last week I announced the second contest, to solve this intimidating puzzle:




Details are at the first link.  So far no one has fully solved it, so send in your partial solutions--they'll probably make it to the top three.

The contest ends tonight (Monday night) at 11:59 pm.  I'll announce the third contest sometime Tuesday.

Contributors