Test  Status  Code Input and Output 

1  Pass 
R=4; B=8;
N=6; K=2;
p = 0.4545;
assert( abs(probability(R,B,N,K)p)<1e04 );
pEachPermutation =
0.0303
numberOfPermutations =
15
p =
0.4545

2  Pass 
R=22; B=6;
N=14; K=12;
p = 0.2418;
assert( abs(probability(R,B,N,K)p)<1e04 );
pEachPermutation =
0.0027
numberOfPermutations =
91
p =
0.2418

3  Pass 
R=22; B=60;
N=5; K=0;
p = 0.2002;
assert( abs(probability(R,B,N,K)p)<1e04 );
[Warning: Result may not be exact. Coefficient is greater than 9.007199e+15 and is only accurate to 15 digits]
[> In nchoosek (line 92)
In probability (line 10)
In ScoringEngineTestPoint3 (line 4)
In solutionTest (line 7)]
[Warning: Result may not be exact. Coefficient is greater than 9.007199e+15 and is only accurate to 15 digits]
[> In nchoosek (line 92)
In probability (line 10)
In ScoringEngineTestPoint3 (line 4)
In solutionTest (line 7)]
pEachPermutation =
0.2002
numberOfPermutations =
1
p =
0.2002

4  Pass 
R=9; B=0;
N=4; K=4;
assert( isequal(probability(R,B,N,K),1) );
pEachPermutation =
1
numberOfPermutations =
1
p =
1

5  Pass 
R=1; B=78;
N=78; K=1;
p = 0.9873;
assert( abs(probability(R,B,N,K)p)<1e04 );
pEachPermutation =
0.0127
numberOfPermutations =
78
p =
0.9873

Find all elements less than 0 or greater than 10 and replace them with NaN
15368 Solvers
Count from 0 to N^M in base N.
207 Solvers
Find a subset that divides the vector into equal halves
307 Solvers
429 Solvers
246 Solvers