Sox Win, As Formula Predicted

| | Comments (0)
So in 2004 I predicted the Red Sox would win in 2006, using a mathematical formula. I was wrong. So I realized that my formula was off. Because the length of difference between last year won and the pivotal year of beating St. Louis crossed millennia, we had to add an extra year.

#!/usr/bin/perl
use warnings;
use strict;
 
# script to predict when the next Boston team championship
# will occur after either:
#
# * winning first championship in team history, against St. Louis
#
# OR
#
# * winning first championship since St. Louis existed as a team
 
my %boston_team = (
    # team        last year won,  year beat St. Louis
    Celtics   => [1957,           1957],
    Bruins      => [1941,           1970],
    Patriots  => [2002,           2002],
    'Red Sox' => [1918,           2004],
);
 
for my $team (sort { $boston_team{$a}[1] <=> $boston_team{$b}[1] } keys %boston_team) {
    printf "%s: %d\n", $team,
        predict_year(@{$boston_team{$team}});
 
}
 
sub predict_year {
    my($last_won, $beat_stl) = @_;
    my $base_year = $beat_stl + 2;
    $base_year += int($beat_stl/1000) - int($last_won/1000); # adjust for difference
    return $base_year;
}
 
__END__

This formula correctly "predicts" the next championship of each team:

Celtics: 1959
Bruins: 1972
Patriots: 2004
Red Sox: 2007

I CALLED IT!!!!!</colbert> slashdot.org

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on October 28, 2007 10:43 PM.

Tainting was the previous entry in this site.

1986, 2004, ... 2007? is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.