summaryrefslogtreecommitdiff
path: root/291/CH5/EX5.2d/eg5_2d.sce
diff options
context:
space:
mode:
Diffstat (limited to '291/CH5/EX5.2d/eg5_2d.sce')
-rwxr-xr-x291/CH5/EX5.2d/eg5_2d.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/291/CH5/EX5.2d/eg5_2d.sce b/291/CH5/EX5.2d/eg5_2d.sce
new file mode 100755
index 000000000..4246773f1
--- /dev/null
+++ b/291/CH5/EX5.2d/eg5_2d.sce
@@ -0,0 +1,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 ") \ No newline at end of file