Tuesday, November 6, 2012

Linear Regression Calculation

Model : CASIO  fx-991MS, CASIO fx-570MS, CASIO  fx-100MS

Regression is an important part in statistical calculation. Here we develop relationship between two variables on the basis of observed data assuming the relationship to be linear, parabolic,quadratic etc.


Example: On the basis of following data establish regression equation between x and y assuming the relation to be linear.( Let y=A+Bx and Find out A,B,correlation coefficient r). Also calculate  Σx, Σx2, Σy, Σy2, Σxy, x̅, xσn, xσn-1,(standard variation), x̅, y bar,n, yσn-1, estimated value of y for x=18, estimated value of  x for y=20. (Answers: Σx=100, Σx2=2250, Σy=5043, Σy2=5086451, Σxy=101000, x̅=20, xσn=7.071,
n-1=7.9056, y bar=1008.6,n=4.029,n-1=4.029, A=997.4, B=0.56, correlation coefficient r=0.9826, estimated value of y for x=18 is 1007.48, estimated value of  x for y=1000is 4.6428)
x y
101003
151005
201010
251011
301014


Solution:

(Mode initialization)
MODE >> MODE >> 2(REG) >> 1(Lin)

(Memory clear Important
SHIFT >> MODE >> 1(Scl) >> = (Stat clear)

(Input data)
1 >> 0 >> , (Comma) >> 1 >> 0 >> 0 >> 3 >> M+(n=1) >> 1 >> 5 >> , >> 1 >> 0 >> 0 >> 5 >> M+(n=2) >> 2 >> 0 >> , >> 1 >> 0 >> 1 >> 0 >> M+(n=3) >> 2 >> 5 >> , >> 1 >> 0 >> 1 >> 1 >> M+(n=4) >> 3 >> 0 >> , >> 1 >> 0 >> 1 >> 4 >> M+(n=5)


(Calculation of Σx, Σx2)
SHIFT >> 1 >> 1(Σx2) >> =

SHIFT >> 1 >> 2(Σx) >> =

(Calculation of Σy, Σy2xy)
SHIFT >> 1 >> Right button of replay >> 1(Σy2) >> =

SHIFT >> 1 >> Right button of replay >> 2(Σy) >> =

SHIFT >> 1 >> Right button of replay >> 3(Σxy) >> =

 

(Calculation of n, xσn-1, x̅)
SHIFT >> 2 >> 1(x̅) >> =

SHIFT >> 2 >> 2(n) >> =

SHIFT >> 2 >> 3(n-1) >> =


(Calculation of n, yσn-1, y bar)
SHIFT >> 2 >> Right button of replay >> 1(y bar) >> =

SHIFT >> 2 >> Right button of replay >> 2(n) >> =

SHIFT >> 2 >> Right button of replay >> 3(n-1) >> =

(Calculation of A,B,r)
SHIFT >> 2 >> Right button of replay >> Right button of replay >> 1(A) >> =

SHIFT >> 2 >> Right button of replay >> Right button of replay >> 2(B) >> =

SHIFT >> 2 >> Right button of replay >> Right button of replay >> 3(r) >> =


 
( Calculation of estimated value of y for x=18)
1 >> 8 >> SHIFT >> 2 >> Right button of replay >> Right button of replay >> Right button of replay >> 2 >> =

( Calculation of estimated value of y for x=18)
1 >> 0 >> 0 >> 0 >> SHIFT >> 2 >> Right button of replay >> Right button of replay >> Right button of replay >> 1 >> =


Use the same key operations as linear to recall results for following type of regression,
 
Type Equation calculator follows
Logarithmic y =A+B.lnx
Exponential y =A*eB*x (lny=lnA+Bx)
Power y =A*xB (lny=lnA+Blnx)
Inverse y =A+B*1/x