blob: 4246773f1f10c89025248fb2ad07a9935f50263a (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
function result= bino(n, k, p)
result = factorial(n)*(p^k)*((1-p)^(n-k))/(factorial(k)*factorial(n-k))
endfunction
avg = 5;
i=3;
prob = cdfpoi("PQ", 2, avg);
disp(prob, "Proportion of days that have less than 3 claims is")
probX4 = cdfpoi("PQ",i+1, avg) - cdfpoi("PQ", i, avg);
reqdprob = bino(5,3 , probX4);
disp(reqdprob, "Probability that 3 of the next 5 days will have exactly 4 claims is ")
|