Hi there,

Stats are really not my cup of tea. I have a problem with “4-Ultimate test” (and also test 5 but I would at least understand what is wrong with this one)

I tried to stick as much as possible to the concept of taking balls out of the bag.

I think I got a decent algorithm but I might be totally wrong.

Test 4-Ultimate test

inputs:

n=30 total nb of balls

w=10 nb of white balls

s=10 total nb of balls extracted

k=5 nb of white balls to be extracted

I get the following result

P(A)= 10 / 30 (white ball)

x 9 / 29 (white ball)

x 8 / 28 (white ball)

x 7 / 27 (white ball)

x 6 / 26 (white ball)

x 20 / 25 (black ball)

x 19 / 24 (black ball)

x 18 / 23 (black ball)

x 17 / 22 (black ball)

x 16 / 21 (black ball)

P(A)= 5168 / 10015005

P(!A)= 10009837 / 10015005

result: 5168:10009837

expected: 62016:414889

I don’t see what is wrong: is it my fraction simplification or the way I compute the stats ?

Any help will be greatly appreciated !