summaryrefslogtreecommitdiff
path: root/291/CH4/EX4.7a
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /291/CH4/EX4.7a
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '291/CH4/EX4.7a')
-rwxr-xr-x291/CH4/EX4.7a/eg4_7a.sce10
1 files changed, 10 insertions, 0 deletions
diff --git a/291/CH4/EX4.7a/eg4_7a.sce b/291/CH4/EX4.7a/eg4_7a.sce
new file mode 100755
index 000000000..98f73141a
--- /dev/null
+++ b/291/CH4/EX4.7a/eg4_7a.sce
@@ -0,0 +1,10 @@
+probXequalsi = 1/6;
+expecXsquared = 0;
+for n=1:6
+ expecXsquared = expecXsquared + (n*n*probXequalsi)
+end
+
+expecX= 3.5 // from eg 4.4a
+var = expecXsquared - (expecX^2);
+var10 = var*10;
+disp(var10, "The variance is") \ No newline at end of file