suggest writing script to produce testsuite of more cases to paste into cody
Yes, I am enlarging the test suite. Thanks for the input!
Test  Status  Code Input and Output 

1  Pass 
%%
a = 3;
d = 0;
y_correct = 1.000;
assert(abs(risk_prob(a, d)  y_correct) <= 0.01)

2  Pass 
%%
a = 1;
d = 5;
y_correct = 0.000;
assert(abs(risk_prob(a, d)  y_correct) <= 0.01)

3  Fail 
%%
a = 5;
d = 3;
y_correct = 0.642;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

4  Fail 
%%
a = 4;
d = 6;
y_correct = 0.134;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

5  Fail 
%%
a = 10;
d = 10;
y_correct = 0.480;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

6  Fail 
%%
a = 7;
d = 8;
y_correct = 0.329;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

7  Fail 
%%
a = 8;
d = 7;
y_correct = 0.5355;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

8  Fail 
%%
a = 20;
d = 10;
y_correct = 0.965;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

9  Fail 
%%
a = 4;
d = 2;
y_correct = 0.656;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

10  Fail 
%%
a = 6;
d = 4;
y_correct = 0.638;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

11  Fail 
%%
a = 2;
d = 1;
y_correct = 0.417;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

12  Fail 
%%
a = 2;
d = 2;
y_correct = 0.104;
assert(abs(risk_prob(a, d)  y_correct) <= 0.02)
Error: Assertion failed.

Make the vector [1 2 3 4 5 6 7 8 9 10]
27773 Solvers
Sum all integers from 1 to 2^n
5887 Solvers
45 Solvers
311 Solvers
777 Solvers