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 /1475/CH2/EX2.15 | |
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 '1475/CH2/EX2.15')
-rwxr-xr-x | 1475/CH2/EX2.15/Example_2_15.sce | 19 | ||||
-rwxr-xr-x | 1475/CH2/EX2.15/Output_2_15.PNG | bin | 0 -> 10894 bytes |
2 files changed, 19 insertions, 0 deletions
diff --git a/1475/CH2/EX2.15/Example_2_15.sce b/1475/CH2/EX2.15/Example_2_15.sce new file mode 100755 index 000000000..d4f84ca14 --- /dev/null +++ b/1475/CH2/EX2.15/Example_2_15.sce @@ -0,0 +1,19 @@ +// Example 2.15 A random variable x follow Poisson distribution
+clc;
+clear;
+m=3;
+disp(m,"Parameter =");
+function value = poisson(m, x)
+value = (exp(-m)*(m^x))/(factorial(x));
+endfunction
+X_0=poisson(m,0);
+X_1=poisson(m,1);
+X_2=poisson(m,2);
+X_3=poisson(m,3);
+
+disp(X_0,"Probability when x=0 is ");
+disp(X_1,"Probability when x=1 is ");
+disp(X_2,"Probability when x=2 is ");
+disp(X_3,"Probability when x=3 is ");
+disp(X_0+X_1+X_2,"Probability when the variable assumes the value less than 3 is ");
+disp(1-(X_0+X_1),"Probability when the variable assumes the value at least 2 is ");
diff --git a/1475/CH2/EX2.15/Output_2_15.PNG b/1475/CH2/EX2.15/Output_2_15.PNG Binary files differnew file mode 100755 index 000000000..88dd40f5d --- /dev/null +++ b/1475/CH2/EX2.15/Output_2_15.PNG |