From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 331/CH10/EX10.11/Example_10_11.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 331/CH10/EX10.11/Example_10_11.sce (limited to '331/CH10/EX10.11') 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 -- cgit