O'Reilly logo

Digital Dice by Paul J. Nahin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

image

image

16. The Appeals Court Paradox

The code jury.m simulates our five-judge appeals court. Line 01 sets the value of p(k) equal to the probability the k th judge makes a correct decision, where A is judge 1, B is judge 2, and so on. Line 02 sets the variable mistakes equal to zero; at the end of ten million simulated deliberations its value will be the number of incorrect court decisions. Lines 03 and 16 define the for/end loop that executes the ten million deliberations. At the start of each deliberation line 04 sets the variable majority to zero; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required