• StatsInTheWild MLB rankings as of May 7, 2012 at 8am.

    Team Rank Change Record ESPN TeamRankings.com
    Baltimore 1 ↑5 19-9 6 1
    Texas 2 ↓1 18-10 2 2
    St. Louis 3 ↓1 17-11 5 6
    Atlanta 4 ↓1 18-11 7 5
    Tampa Bay 5 ↑3 19-10 1 3
    Washington 6 ↓1 18-10 4 4
    Toronto 7 ↑2 16-13 8 7
    LA Dodgers 8 ↓4 18-10 3 8
    NY Yankees 9 ↓2 15-13 9 9
    Miami 10 ↑10 14-14 22 17
    Houston 11 ↑12 13-15 23 15
    Cincinnati 12 ↑3 14-13 12 11
    Philadelphia 13 ↑3 14-15 14 20
    Arizona 14 ↓1 14-15 11 18
    Cleveland 15 ↑2 15-11 13 10
    San Francisco 16 ↓6 14-14 16 21
    NY Mets 17 ↓5 15-13 15 12
    Chicago WSox 18 ↓4 13-15 19 14
    Detroit 19 ↑2 14-13 10 13
    Oakland 20 ↑2 15-14 21 16
    Boston 21 ↓10 11-16 24 22
    Seattle 22 ↓4 13-17 26 19
    LA Angels 23 ↑3 12-17 18 27
    Colorado 24 ↓5 12-15 17 25
    Pittsburgh 25 ↓1 12-16 25 23
    Milwaukee 26 ↓1 12-16 20 26
    Chicago Cubs 27 – 11-17 27 24
    San Diego 28 – 9-20 29 29
    Kansas City 29 – 9-18 28 28
    Minnesota 30 – 7-20 30 30

    Past Rankings:

    4/30/2012

    4/23/2012

    4/16/2012

    4/13/2012

    Cheers.

  • nsaunders's avatarWhat You're Doing Is Rather Desperate

    At any R Q&A site, you’ll frequently see an exchange like this one:

    Q: How can I use a loop to […insert task here…] ?
    A: Don’t. Use one of the apply functions.

    So, what are these wondrous apply functions and how do they work? I think the best way to figure out anything in R is to learn by experimentation, using embarrassingly trivial data and functions.

    If you fire up your R console, type “??apply” and scroll down to the functions in the base package, you’ll see something like this:

    Let’s examine each of those.

    1. apply
    Description: “Returns a vector or array or list of values obtained by applying a function to margins of an array or matrix.”

    OK – we know about vectors/arrays and functions, but what are these “margins”? Simple: either the rows (1), the columns (2) or both (1:2). By “both”, we mean “apply the…

    View original post 1,006 more words

  • Michael Lugo's avatarGod plays dice

    People who want to learn the very basics of R may find these videos made by some Berkeley grad students useful.

    View original post

  • StatsInTheWild MLB rankings as of April 30, 2012 at 8am.

    Team Rank Change Record ESPN TeamRankings.com
    Texas 1 – 16-6 1 1
    St. Louis 2 ↑2 14-8 2 5
    Atlanta 3 – 14-8 7 3
    LA Dodgers 4 ↑1 16-6 4 2
    Washington 5 ↓3 14-8 5 6
    Baltimore 6 ↑7 14-8 12 9
    NY Yankees 7 ↓1 12-9 6 7
    Tampa Bay 8 ↑3 14-8 3 4
    Toronto 9 ↓2 12-10 9 14
    San Francisco 10 ↑5 12-10 13 15
    Boston 11 ↑16 10-11 10 10
    NY Mets 12 – 13-9 16 11
    Arizona 13 ↑4 11-11 15 19
    Chicago WSox 14 ↓6 11-11 19 12
    Cincinnati 15 ↑9 11-11 17 16
    Philadelphia 16 ↑2 10-12 11 22
    Cleveland 17 ↓3 11-9 14 23
    Seattle 18 ↑4 11-12 21 13
    Colorado 19 ↓3 10-11 18 18
    Miami 20 ↓10 8-13 23 25
    Detroit 21 ↓12 11-11 8 8
    Oakland 22 ↓2 11-12 22 21
    Houston 23 ↓4 8-14 26 24
    Pittsburgh 24 ↑1 9-12 25 17
    Milwaukee 25 ↓2 10-12 20 20
    LA Angels 26 ↓5 7-15 24 28
    Chicago Cubs 27 ↑2 8-14 28 27
    San Diego 28 ↓2 7-16 29 26
    Kansas City 29 ↓1 6-15 27 30
    Minnesota 30 – 6-15 30 29

    Past Rankings:

    4/30/2012

    4/23/2012

    4/16/2012

    4/13/2012

    Cheers.

  • Tyler Williams's avatarCausal Sports Fan

    Here’s a fun fact. NHL first round winners were 45-54 in shootouts in the regular season. First round losers were 63-43.  Here are the match ups (higher regular season point total first, shootout record in parentheses, winner in bold):

    • Rangers (4-5)  vs. Ottawa (6-4)
    • Bruins (9-3) vs. Capitals (4-4)
    • Devils (12-4) vs. Panthers (6-11)
    • Penguins (9-3) vs. Flyers (4-7)
    • Canucks (8-7) vs. Kings (6-9)
    • Blues (4-10) vs. Sharks (9-5)
    • Blackhawks (7-7) vs. Coyotes (6-10)
    • Predators (5-5) vs. Red Wings (9-3)

    So, the team with the lower shootout win percentage won seven out of eight series. The team with the higher point total only won four out of eight (Rangers, Blues, and Predators), in part because good shootout records inflated some teams’ point totals. Why do we still have shootouts again?

    View original post

  • Last week Phillip Humber became the 21st pitcher to pitch a perfect game in major league baseball. Right now as I write this, he has been ousted from his next start after allowing 9 earned runs in five innings. This got me wondering how other pitchers have performed in their next start after their perfect game. Obviously, thing have to get worse in the next start, but things seem to get much worse. Using baseball-reference.com, I looked up game logs for the next start after the perfect game.

    Here are the results (in a google doc).

    For the 17 games I could find box scores for, including Humber’s next start, these pitchers have a combined record of 5-8 (originally said 4-9) with 4 no decisions, an ERA of 5.67 and a WHIP of 1.466. That’s certainly not perfect.  Terrible might be a better word for it.  I guess it’s hard to even be average once you’ve experienced perfection.

    Cheers.

  • Last week Phillip Humber became the 21st pitcher to pitch a perfect game in major league baseball. Right now as I write this, he has been ousted from his next start after allowing 9 earned runs in five innings. This got me wondering how other pitchers have performed in their next start after their perfect game. Obviously, thing have to get worse in the next start, but things seem to get much worse. Using baseball-reference.com, I looked up game logs for the next start after the perfect game.

    Here are the results (in a google doc).

    For the 17 games I could find box scores for, including Humber’s next start, these pitchers have a combined record of 5-8 (originally said 4-9) with 4 no decisions, an ERA of 5.67 and a WHIP of 1.466. That’s certainly not perfect.  Terrible might be a better word for it.  I guess it’s hard to even be average once you’ve experienced perfection.

    Cheers.