Tag baseballstats (5)

wheeee
Mood: buzzed
Posted on 2006-06-09 13:48:00
Tags: baseball baseballstats
Words: 244

I'm having one of those days (really, one of those "last few days") where things are going very well (codewise). I left work yesterday with a mysterious problem, and solved it quickly this morning (my idea of what the problem was was right on, just needed a little more tweaking), which is always a good feeling. Also, I had a large mocha this morning, so I've reached a state of higher consciousness.

Nachos for lunch (not just nachos, mind you, but suuuuper nachos!) is awesome. Nachos for dinner (as I did at the astros game last week) is also good.

Inspired by the baseball books I've been reading, I present the expected runs per inning finder. There isn't a whole lot of data, but it's rather interesting. For example, if you have a runner on first with no outs, you never want to sacrifice him to second - the probability of having a zero-run inning goes from 57.6% to 59.3%. Sacrifices in general usually aren't worth it on a runs scored per inning basis, although they can be if you really just need a run.

From a technical standpoint, I used XPath for the first time, and got it to work with IE and Firefox without too much trouble. I also added more Retrosheet data to both the expected runs per inning finder and the Win Expectancy Finder.

The Texas Pride Festival is tomorrow in Austin. I'll be there!

Thank you, namaste, and good luck.

8 comments

adrift
Mood: 4 8 15 16 23 42
Posted on 2006-06-05 14:48:00
Tags: baseball baseballstats
Words: 242

So djedi and I were home this last weekend to celebrate birthdays and other things. I had a good time - it was good to get to see my family again. The downside is that Carrie got me hooked on Lost, and I spent too much time this morning looking at lostpedia.com to find out more stuff I missed. Maybe I'll watch it next year...

I also got some new shoes, which are designed to help me not pronate (walk on the insides of my feet). My feet are mostly used to them now, and they do seem to feel better, so yay!

We also went to the Astros game Saturday night.
Since the game on Saturday was exciting, and the Astros almost came back in the 9th inning, I graphed the win expectancy throughout the game using my win expectancy grapher. The resulting image is below:

You can see the Astros got back up to a 20% chance of winning in the bottom of the ninth, which is pretty good.

I watched and listened to the end of the game on Sunday, which was exciting and went into extra innings - the win expectancy graph is below:

Whenever a game goes into extra innings, the win expectancy fluctuates wildly (since one run makes a huge differencE), and this game is no exception.


Tonight before and after game night, my goal is to get sound working on my computer. We'll see how that goes.

3 comments

good wicked weekend
Mood: refreshed
Posted on 2005-11-07 09:41:00
Tags: baseball baseballstats
Words: 680

So I had a good weekend. The plan for the weekend was to see "Wicked" in Houston on Friday, visit Vickie and Mae-Mae (sp?) (some kids that David homeschooled a while ago) on Saturday, and go to the Renaissance Festival on Sunday. Mission accomplished!

Friday - Unfortunately the show was at 8:00 so we decided to leave Austin by 3:30 to make sure we got there on time (and we could meet up with abstractseaweed and Leigh Ann and carpool). This meant I had to leave work at 3, which would have maybe been OK except that I was kinda in the middle of debugging something important with someone else and I had to 'fess up I was leaving early, at which he was not terribly pleased. (the good news is that the problem turned out to be nothing) Anyway, so djedi and wildrice13 and I drove down there, and all was going well until we stopped on 290 for an hour and 15 minutes (there was apparently an accident a few miles ahead). So we turned off the car, switched drivers, got out, etc. Which was OK, except now we were worried about making the show. After traffic started moving again, I was driving as fast as I could while still being safe. We stopped at Wendy's to grab dinner and eat it on the way. Note to self: if you have to eat in the car while driving, don't get a hamburger! Get chicken nuggets or something.

Anyway, we made it to the show skipping both of our planned stops (abstractseaweed ended up not coming) and made it with 10 minutes to spare. The show was quite good - djedi and I had only listened to the soundtrack, so we had a basic idea of the story, but we missed a lot of important points!

- Who Nessa was - she's referenced in a few songs, but she turns out to be pretty important.
- Elphaba's mother cheated on her father, not the other way around. In retrospect, this should have been painfully obvious.
- The bit in "Dancing Through Life" where Glinda tells Elphaba that she and this hat "deserve each other". Hah!
- Boq is pretty mean/evil, it turns out.
- Glinda and Elphaba are friends at the end.
- The ending is actually surprisingly happy from what I expected. It was a little too happy for me at first, but I guess it's OK.

Anyway, the singing was top-notch (although there was a time or two where there should have been a "moment" between the singers and the orchestra that was a little out of sync) - even the random chorus members had fabulous voices. I really liked the "As Long As You're Mine" song between Elphaba and Fiero...they both had especially nice voices. The lighting was very well done - lots of colors and patterns and whatnot to really set the mood of particular scenes.

Anyway, enough about that. It was very good, and I was reminded that I should get into more musicals (and thanks to onefishclappin for giving the "Wicked" soundtrack to djedi :-) )

Saturday - We slept late and watched "Eulogy", which was pretty good although a bit weird. We then met Vickie and Mae-Mae at the Cheesecake Factory in Sugarland - unfortunately I had eaten a lot at lunch so I wasn't too hungry, but still managed to split a piece of cheesecake with djedi. Mmm! Anyway, they're cute kids, and I got a couple pictures that I'll put up sometime this week.

Sunday - Went to church, picked up wildrice13 and headed out to the Renaissance Festival, which is a good hour and a half away from Houston. By the time we got there we were starving for lunch, so we ate, saw a few shows (including the Ded Bob Show, always a classic) and walked around a lot. Unfortunately, it was very warm, so we left a little early and headed back to Austin.

That's about it. I wrote a baseball Win Expectancy grapher that uses the probabilities from my Win Expectancy finder, so I'm probably about done with that project for now.

4 comments

Just another day...
Mood: confused (at work)
Music: Phil Collins - "Another Day In Paradise"
Posted on 2005-10-24 13:06:00
Tags: baseball astros baseballstats
Words: 146

Wow...the weekend did not treat the Astros well. Down 2-0 isn't horrible, though, especially because they're coming home. And Berkman has had two good games, which is promising. The walk-off home run last night hurt, but not nearly as bad as the Pujols one. I'm mostly just happy they made it here at this point. (although I do hope they win a few at home!)

I threw together a PHP script, so you can now calculate baseball Win Expectancy given a situation. I may work on it some more at some point...

The last week or so, I've had some trouble getting to sleep - nothing serious but it's been taking me at least half an hour to get to sleep. I'm gonna try avoiding caffeine this week and see if that helps.

Edit: meant to link to this article about win expectancy. So now I did!

5 comments

Yay Astros!
Mood: hopped up on baseball
Music: E. J. Jones -"Castle of Dromore"
Posted on 2005-10-20 09:21:00
Tags: baseball astros baseballstats
Words: 246

Hooray!

My nervous energy yesterday launched me into a new project. It started when I read the Crawfish Boxes (an Astros blog that is part of a network started by the founder of Daily Kos) after the 18 inning Game 4 of the Atlanta series. They talked about how amazing the game was, and talked about WPA, which after reading a link to the Hardball Times, discovered was the statistical relative frequency that a team will win in a given situation. They linked to the Win Expectancy Finder, which calculates WPA and is based on the data file that Phil Birnbaum put together that he made from Retrosheet game data. However, he only did games from 1979-1990, and Retrosheet has many more event logs for games.

So I decided to try to write a parser for them and create a data file like Birnbaum's, except with more games. It turns out the data file format is kinda hard to parse, but I have a script that mostly does it, so I'm somewhat close to my goal. I need to test it on more games - almost finished testing it on all 2004 games and tweaking it to make it work (luckily, there's redundant data in the files so I can fairly quickly tell when I did something wrong).

Anyway, that's my new project, and hopefully I'll put something up soon. I worked on it a lot last night before going to magic and while watching the game.

0 comments

This backup was done by LJBackup.