summaryrefslogtreecommitdiff
path: root/331/CH10/EX10.11
diff options
context:
space:
mode:
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