Of course I could not resist and write a perl program to compute the probability distribution, here it is:
Somewhat surprisingly, contributor 29 was eventually picked although he only had a probability of 0.28% a tenth of the average 1/36.
And here is the program:
#!/usr/bin/perl
%h = (0 => 1);
for $t(1..6){
%h = nocheinwurf(%h);
print "$t:\n";
foreach $s(sort {$a <=> $b} keys %h){
print "$s:".$h{$s}/6**$t." ";
$total[$s] += $h{$s}/6**($t+1);
}
print "\n\n";
}
print "total:\n";
foreach $s(1..36){
print "$s $total[$s]\n";
}
sub nocheinwurf{
my %bisher = @_;
my %dann;
for $w(1..6){
foreach $s(keys %bisher){
$dann{$s+$w} += $bisher{$s};
}
}
return(%dann);
}
1 comment:
It is funny, the distribution resembles the placzek function in neutron transport theory. The function represents the sum of the convoluted iterates of the box spline function.
Igor.
http://nuit-blanche.blogspot.com
Post a Comment