# [Kc] review of Statistics Hacks by Bruce Frey

David Nicol davidnicol at gmail.com
Tue Jun 6 22:29:03 PDT 2006

```Review of Statistics Hacks by Bruce Frey

I leafed through Statistics Hacks immediately on receiving it and
found it to be an excellent and understandable presentation of applied
statistics, such as how to understand any system given a mean and a
standard deviation.  The discussion of the Monty Hall problem in
particular was enlightening.  I wrote the following computer program
to simulate the situation as described in the chapter on applying
statistics hackery to game show situations:

my @curtains;
sub PlaceBuick{
@curtains = qw/zonk zonk zonk/;
\$curtains[rand 3] = 'buick';
};

my \$choice1;
sub Choose{
\$choice1 = int rand 3;
};

my \$reveal;
sub Reveal{
my \$provisional_reveal = int rand 3;
\$provisional_reveal != \$choice1 and
\$curtains[\$provisional_reveal] ne 'buick' and
return \$reveal = \$provisional_reveal;
Reveal();
};

for(1..10000){
PlaceBuick();
Choose();
Reveal();
print "you chose \$choice1 and there is no car behind curtain \$reveal\n";

\$curtains[\$choice1] eq 'buick' and \$buicks++;
};

print "you won \$buicks buicks\n";
__END__

About halfway through writing the Reveal() function I realized that I
had been erroneous in my scepticism, as the revealing function, based
on the game show host's knowledge of the situation, really does not
affect the odds made in the first choice.

Thank you for the explanation, Bruce Frey.  You should always switch.
Unless of course the host does not always reveal an empty curtain, in
which case you're back to playing rock, paper, scissors under the fear
that the host may have revealed a curtain in order to convince you to

Written with the clear and friendly prose one expects from the faculty
of the University of Kansas, Frey presents his material as a series of
secrets that he reveals, enabling the reader to do tricks.  This is an
entertaining conceit, and the willing reader will be amused enough to
slog through the textbook-like material on the central limit theorem
and the other things that you have to know to get a college degree.

The book would make a very approachable textbook for anyone taking a