diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2294/CH12/EX12.5/EX12_5.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2294/CH12/EX12.5/EX12_5.sce')
-rwxr-xr-x | 2294/CH12/EX12.5/EX12_5.sce | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/2294/CH12/EX12.5/EX12_5.sce b/2294/CH12/EX12.5/EX12_5.sce new file mode 100755 index 000000000..3d2bed3a4 --- /dev/null +++ b/2294/CH12/EX12.5/EX12_5.sce @@ -0,0 +1,13 @@ +//Example 12.5
+//Probability to find the first white ball on the 3rd draw.
+disp('Let A be the event of drawing the first white ball at the third draw from 15 balls ')
+disp('Let W be the event of drawing a 10 white balls')
+disp('Let B be the event of drawing a 5 black balls')
+disp('Hence we have 1st draw :B 2nd Draw :B 3rd Draw :W');
+funcprot(0)
+function c = combination ( n , r )
+c = prod ( n : -1 : n-r+1 )/ prod (1:r)
+endfunction
+disp('P(A)={(5 C 1)*(5 C 1)*(10 C 1)}/{(15 C 1)*(15 C 1)*(15 C 1)}=')
+p=(combination(5,1)*combination(5,1)*combination(10,1))/(combination(15,1)*combination(15,1)*combination(15,1))
+disp(p)
|