Saturday, January 31, 2009

Name the Justice League


quiz_head_justiceleague.jpg

I started this quiz before I realized they were asking for the original Justice League from the comics in 1960. Thus my recollections of the Justice League from the Super Friends in the early 80's with the Wonder Twins was not helpful. A hint: Zan, Jayna & their monkey Gleek were NOT in the original Justice League from 1960. (Feel free to make that sound that Gleek made as you read this, my twin and I still do that.)

I got all seven in one minute and 39 seconds. I am sure there are some older comics buffs out there that could do better. How about you?

Avoid being the truck in the ditch

This truck being pulled from a ditch slowed my travels up Interstate 95 today. One of my goals in driving is to avoid being the truck in the ditch. I don't drive a truck so I have it half covered. I also try to keep my vehicle on the road.

It appears that this truck went in before the guard rail began rather than over it, but for some reason they were pulling it out this way. It is sometimes hard to figure out what happened in an accident when you only get to see the aftermath.

Superbowl Pool Playoff sheets

You may have heard of those playoff pools where you can try to guess the outcome of a number of events during the game like who will win the coin toss (random) or what player will be named the MVP (usually the quarterback). Last year, I gathered the data from 41 Superbowls and generated some graphs and statistics to help me fill mine out. That data analysis is available here.

For some extra help relevant to this year's contest between Pittsburgh and Arizona, I found that the odds makers have Pittsburgh winning by a touchdown and the over/under is 46.5 points. I am a Steelers fan so I like those odds! I also like the AccuScore forecasts in which they simulate the game 10000 times to generate model results of all kinds of things. It appeals to my mathematical mindset. They have Pittsburgh winning in 68% of their simulations.

Go Steelers!

Tuesday, January 27, 2009

Prius arbitrary milestone 7000

I missed odometer reading 5555, 6000, and 6666 but did catch 7000. This milestone is one thousand times luckier than 7. The prius still runs well, but I notice lower gas mileage in the cold weather, around 35 to 40 mpg. This is still better than my last car or most cars.

I do miss my heated seats when it is cold however.

Ceaser Rodney in the snow

I think Ceaser Rodney is going to get more snow covering as the day goes on.

Sunday, January 25, 2009

Hawks for the birds at the bird feeder

This hawk suddenly lighted on a tree on the creek yesterday. The hawk in flight was much more dramatic than its brooding roost.


I would guess this is a Broad-Winged hawk and not a Red Tailed hawk, but I couldn't see the tail that well. It is not the first one I have seen in my yard or in the area.


I suspects it was there because of all of the dainty morsels of smaller birds that have been attracted to the bird feeders lately. This little blue bird (a White-Breasted Nuthatch) throws out food onto the ground below the feeder that the dark-eyed juncos go after.


The dark-eyed juncos flit from the brush of the fallen tree in the creek to the ground below the feeder and back. You can see one hiding in the middle of the picture below.

The house sparrows feed at the feeder and off of the ground. I think that the sparrow below is a more drab colored female. I might be incorrect in the identification and would appreciate an experts advice.

Friday, January 23, 2009

The Unexpected cost of genetic algorithms in computing

This xkcd.com comic on the correct costs and perils of using a genetic algorithm is timely, given my desire to use a genetic algorithm to find the best fantasy football playoff pool. In all of my discussions of how to approach the problem (simulating the playoffs, games the teams play), I have still neglected to take into account the effect of my excell spreadsheets achieving sentience and trying to take over the world. Let me get right on that.

Monday, January 19, 2009

Snow on Holly Berries

With the snow falling and a camera that does better closeups than regular pictures I couldn't resist these pictures of snow on the holly bushes outside, with some holly berry red for some flash.


The pictures don't do justice to how prickly these holly bushes are. They will draw blood if you brush against them and the prick through leather gloves.

Beauty and peril in the same package.

January Snow on Shellpot Creek

When the creek is frozen the snow stays on the creek and on the rocks.

Except in some spots. I wonder what the hot spot under the bank at this spot is.

The tree is still in the creek.

The birds love the proximity of this tree to the seed thrown on the ground by other birds at the bird feeder. Like a brush pile, it gives them a close hiding place. I still would like it if the tree were gone. It's not my tree, it started on the other side of the creek and fell down.

Saturday, January 17, 2009

Extracting a screw - successfully!

As I was putting together the crib, my wife's crib from when she was a baby, that her father built for her, I realized that I shouldn't break it as it might have some sentimental value and we are trying to reuse it to save some money. Of course as I was screwing in one of the screws I twisted its little head right off. This meant that the threaded end of the screw was lost deep in the wood exactly in the pot where a replacement screw would have to go.

I immediately eliminated the thought that one screw would be enough and luckily remembered that I had screw extractors that I had never used. Presumably left over from a tool impulse purchase, I pulled them out and found some useful instructions online (wikihow stripped screw, wikihow screw extractor, and the best, a screw extractor step by step slideshow on about.com).


Miracle of miracles, I was successful. You may never need to do this, I have had these tools for at least seven years and never used them, but it nice to know they work if you need them.


The picture above is a close up of the twisted off head and the screw bit on the extractor. You drill a hole in the screw you are trying to extract and then screw in the screw extractor. The trick is that it is threaded opposite of a screw. Turning it counterclockwise buries it in the screw to be extracted and grabs it even as it turns the screw counterclockwise to unscrew it. Genius.

Tuesday, January 13, 2009

Playoff Fantasy Football - Games people play

Previously I showed a playoff prediction model using the Sagarin points rating and a random factor to simulate the NFL playoffs. The model revealed two poles of expectations for the Superbowl this year: Without a home advantage, Philadelphia lost to Pittsburgh in the Superbowl. With a home advantage of 2.81, Tennessee beats the New York Giants in the Superbowl. The latest results of the playoffs seem to indicate we are closer to the first situation than the second.

In our earlier problem statement we noted that the key to winning the RKB fantasy football playoff pool is to pick the players which generate the most points. The problem really breaks down to two issues. One: Predicting which teams will play the most games in the playoffs. Two: Picking high scoring players on those teams for a multiplicative effect. Using the previously described model we can predict how many games each playoff team will play so that we can pick players that have the most number of opportunities to score points. The best player lists will have players on teams that play three or four games and not one or tow games.

The chart below (please click the picture or here for larger) shows the number of games each team plays as a fraction of 1000 simulations run at each pair of home advantage and random factor parameter values.

Moving from left to right, the home advantage increase from 0 to 2.81, the number given by the Sagarin ratings. Moving from top to bottom the random factor increase from 0 to 3 to 1000. With no random factor the results are just as the Sagarin ratings would predict (top line of charts). With no home advantage (top left corner) Philadelphia plays four games (blue), Pittsburgh, Atlanta and Baltimore play three games (green) and rest play two (orange) or one (red). With a 2.81 home advantage (top right corner), Tennessee, New York Giants and Minnesota play three games and the rest play two or one.

Adding in a random factor to the simulation now means that there is a distribution of the number of games played instead of one answer as the 1000 simulations end one way or the other. Increasing the random factor to a ridiculously large 1000 is equivalent to saying that the outcome of any game is a 50/50 tossup. The bottom line of charts shows that all home advantage values converge to the same random result. Any team has a 50% chance of playing only one game, and a 25% chance of play two games. Teams with a first round bye have a 25% chance of playing three games, while teams without a buy have a 1 in 8 chance of playing three games and another 1 in 8 chance of playing four games.

More interestingly is how robust are outcomes in which Philadelphia plays four games are to the parameters of the Monte Carlo simulations. Out to a home advantage of 1 (actually 1.2 according to our previous analysis) and up to a random factor of +/- 3, Philadelphia plays four games in more than half of the simulations. These parameters aren't unreasonable, the random factor represents a touchdown and the home advantage is an average over all teams and must have some error in it from team to team. Philadelphia players would have four chances to contribute to a fantasy playoff pool. Other teams that play four games in this parameter region are Baltimore and Atlanta. This analysis was put in place before the playoffs. Atlanta losing in the first round is a big upset according to this model.

With a larger home advantage factor of 2 or 2.81 a good playoff list might contain Tennessee or New York Giants players who will have three games in which to contribute to a playoff pool total score. Several entries into the fantasy pool covering these options would increase the chances of winning.

In a future post, we will determine and simulate which players yield the most points.

Monday, January 12, 2009

Playoff Fantasy Football - Simulating the playoffs

Each year, RKBfantasyfootball (My sister is a commissioner, so I must play.) has playoff fantasy football. Since you don't have to maintain your concentration for 17 weeks, it is a good way for non-football fanatics to play without a huge commitment of time. They run a points-only league so the rules are straightforward. Pick a kicker, quarterback, two running backs, a tight end, three wide receivers and a team defense from the list of players and teams in the playoffs. You get the sum of the points these players or defense, special teams included, score during the playoffs (the detailed, but simple rules are here).

The key to winning is to pick the players which generate the most points. The problem really breaks down to two issues. One: Predicting which teams will play the most games in the playoffs. Two: Picking high scoring players on those teams for a multiplicative effect. My first focus is on picking the teams.

It has been my goal to somehow simulate the football playoffs in order to help me make my picks for the RKB playoff fantasy football. I am not a football expert like many of the participants so I try to make do with statistics and data. I had proposed to use genetic algorithms to search for the best possible player picks for the playoffs but I had been stuck with how I might simulate the playoffs. I not so jokingly suggested using a video game like Madden2008 to play enough games to collect the data but that would not be practical from a time standpoint. I have also used the Sagarin ratings to good effect in previous football predictions so I decided to use it here.

The Sagarin ratings are essentially a least squares of the rankings of the teams in the NFL determined by the games they win or lose. I use the ratings from the end of the season, it appears that he updates with the playoff games after that. It is slightly more complicated than that but what he suggests is to use his pure points rating as the best way to predict the outcome of a game between two teams. He also calculates a home advantage factor, which tends to be about a field goal, this year it is 2.81 at the end of the regular season. The extra wrinkle I add in order to add the element of chance back into the simulation is to add a plus or minus random factor since we know that each game still has elements of chance. We can then look at the sensitivity of the outcome of the playoffs to both this random factor and to the home advantage.

I built up a simulation of each week of the playoffs through to the Superbowl which uses the pure points plus the home advantage plus the random factor. The winning team is determined by the difference between home team pure points score + home advantage - the away team pure points +/- the random factor. Positive means the home team wins, negative is the opposite. The winning team goes on. The simulation also keeps track of the teams rank so that the correct rank match-ups occur in each week no matter the pure points outcome. Finally, there is no home advantage for the Superbowl. I collected the outcome of 1000 simulations at each set of home advantage and random factor parameter values. The 3D chart below shows which team wins the Superbowl according to these simulations.


The left side of the chart shows the expected outcome with a 2.81 home advantage factor, Tennessee wins the Superbowl. They play the New York Giants, who you can see winning the Superbowl sometimes as the random factor is increased. On the other side of the spectrum, with no home advantage, the Pittsburgh Steelers win the Superbowl and they play the Philadelphia Eagles, who you can see winning the Superbowl sometimes as the random factor is increased on that side. Also notice that Baltimore starts to appear as a winnr as Pittsurgh diminishes. If the random factor is increased to large values, in effect the simulation is acting as if every game is a 50/50 shot. Both scenarios, home advantage 2.81 and 0 converge on each other as the advantage becomes swamped by the randomness. In that case teams with out a bye in the first round have a 1 on 16 chance of winning the Superbowl, and teams with a bye have a 1/8 chance, because they play one less game and have one less chance at losing.

Randomness aside, it is clear that the home advantage has an important effect on the playoff outcome in the simulation so it is necessary to look for tipping points in this factor. The chart below reveals the effect of the home advantage in the absence of the random factor and some tipping points where the AFC and NFC champs and thus the Superbowl winners change.

With no home advantage Philadelphia plays Pittsburgh in the Superbowl. As the factor increases to 1.08, Pittsburgh eventually loses to Tennessee, but they play Philadelphia. Increasing the factor to 1.3 and beyond has the New York Giants playing the Tennessee Titans in the Superbowl. Philadelphia is a wild card team, who will play four games if they reach the Superbowl, and this scenario is fairly robust across a range of the home advantage. It also seems to be the scenario playing out in the current playoff situation as 3 of four teams with home field advantage lost this weekend.

These simulations are important because we need to determine how many games each of the teams will play so that we can see how many times our player picks have to score. A great player that only plays in one game may not yield as many points as a fair player who gets three or even four game opportunities to contribute to the score. Next we will examine the distribution of the number of games each team plays and hose sensitive the results are to the home advantage and random factor.

Wednesday, January 07, 2009

Logic test for fun and profit

This logic test tests your ability to think logically. It is only 15 questions and you should be able to answer quickly. I got 100% (15 out of 15) and I would expect any logical reader of this blog to do the same. How well can you do?

Want a hint? Only use the available information while taking the test. I feel I was forewarned to be scrupulously logical by the description on Neatorama.

(via Neatorama, via the Presurfer)

Downstream view of tree blocking swollen creek

I took the picture looking downstream from the waterfall to the fallen tree across Shellpot creek. It is starting to collect stuff from the water, but so far the current isn't strong enough to shift the tree around.

Fallen tree meets swollen creek

I knew eventually it would rain, the creek would rise, and the fallen tree would clog the creek and sift brush from the rushing waters. I am not sure if the across-the-creek neighbors even know that it fell.

I heard there was a number for New Castle County to come and clear away trees that blocked creeks and waterways but I cannot find it. If there are any Delawareans out there that know it, please leave a comment.

Tuesday, January 06, 2009

How well do you know Time's Person of the Year

Mental Floss has a lunchtime quiz on Time's Person of the year. I got 67% (8 out of 12), and I was surprised I did that well. Some are obscure and some were hard to guess without external clues as to the year. How well can you do?

Saturday, January 03, 2009

Klaatu Barada Nikto

This giant paper mache Klaatu greeted movie goers at the IMAX theatre in King of Prussia, PA. I took my father to see "The Day the Earth Stood Still" in IMAX. It was very large. I thought the movie was just fair and I did not like the ending. As I critiqued the movie with my father he kept finding ways that the movie was not so bad. My dad is the mediocre movie apologist. He always tries to find some good part of the movie because he really likes science fiction and fantasy.

Turkey Vultures claim a house

The black birds roosting on every possible roof of this house are turkey vultures. We counted more than thirty. We heard that the owner bought this mansion in 2003 but no one has lived in it yet. I suppose that only some activity from someone living there will chase away the birds. Maybe someone is dead in there and the aroma through the roof is attracting carrion eaters.