5 lines
189 B
Mathematica
5 lines
189 B
Mathematica
|
function P = CalculateProbEqual(partial, total, experiences)
|
||
|
results = rand(total, experiences) > 0.5;
|
||
|
successes = sum(results) == partial;
|
||
|
P = sum(successes) / experiences;
|
||
|
end
|