
Journal pudge's Journal: Sox Win, As Formula Predicted 3
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>
uh huh (Score:2)
Re: (Score:2)
Basically, it just means that two years after you beat St. Louis for a championship -- after having never won a championship before, or after not winning in a long time -- you will win again. Unless the last time you won and the year you beat StL are in different millennia, in which case we add a year for each millennium!
Re: (Score:2)