
Math Toolkit pdf-file, and also at http://www.boost.org/doc/libs/1_40_0/libs/math/doc/sf_and_dist/html/math_too... it is written:
"Probability of getting exactly 11 answers right by chance is 2.32831e-010"
I think this is wrong. It rather should be one of these below:
"Probability of getting exactly 11 answers right by chance is 0.000247132" or "Probability of getting exactly 16 answers right by chance is 2.32831e-010"
I have'n checked the underlying source code of this yet; ie. maybe it is only a doc error...
And this code there seems IMHO to be problematic too: " int questions = 16; // All the questions in the quiz. int answers = 4; // Possible answers to each question. double success_fraction = (double)answers / (double)questions; // If a random guess. // Caution: = answers / questions would be zero (because they are integers)! binomial quiz(questions, success_fraction); "
Shouldn't the second param not simply be the constant p of each item, ie. here 0.25, even if # of questions is set to a different value, for example 32 ? Because 32 / 4, as done above, wouldn't be 0.25 anymore...
I'll investigate as soon as I can, but I'm going to be offline now for a while... Paul Bristow might be able to answer this one though... Paul? HTH, John.