summaryrefslogtreecommitdiff
path: root/331/CH10/EX10.11
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /331/CH10/EX10.11
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 '331/CH10/EX10.11')
-rwxr-xr-x331/CH10/EX10.11/Example_10_11.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/331/CH10/EX10.11/Example_10_11.sce b/331/CH10/EX10.11/Example_10_11.sce
new file mode 100755
index 000000000..cb75f880b
--- /dev/null
+++ b/331/CH10/EX10.11/Example_10_11.sce
@@ -0,0 +1,27 @@
+//Caption: Linear regression and Time series
+//Simple regression
+//Example10.11
+//Page393
+clear;
+clc;
+MeanX = 25;
+Meany = 150;
+StdX = 2;
+StdY = 8;
+r = 0.9;
+//Estimation of the value of Y when X =10
+X = 10;
+Y = Meany+r*(StdY/StdX)*(X-MeanX);
+disp(Y,'Estimated value of Y when X =10, Y=')
+//Estimation of the value of X when Y = 96
+Y = 96;
+X = MeanX+r*(StdX/StdY)*(Y-Meany);
+disp(X,'Estimated value of X when Y =96, X=')
+//Result
+//Estimated value of Y when X =10, Y=
+//
+// 96.
+//
+// Estimated value of X when Y =96, X=
+//
+// 12.85 \ No newline at end of file