CORRELATION AND REGRESSION PROGRAM By Daniel Wedge For Casio fx-9700 calculators *** MORE GAMES AND PROGRAMS FOR CASIO CALCULATORS AT *** ******** http://www.student.uwa.edu.au/~wedgey ********* This program will determine the correlation coefficient, the covariance and the line of best fit, given: sum of x sum of x^2 sum of y sum of y^2 sum of xy number of stats You will need to put your calculator into regression mode before entering this program (shift+menu, F4) SYMBOLS USED $x sum of x $x2 sum of x^2 $y sum of y $y2 sum of y^2 $xy sum of xy ^2 squared (the button) @ display => and/then -> assign key != not equal to <= less than or equal to >= greater than or equal to * multiply / divide size: 263 bytes 'CORR+REG 0->A~Z "$x"? -> A "$x2"? -> B "$y"? -> C "$y2"? -> D "$xy"? -> E Lbl 0 "n"? -> F F!=Int F => Goto 0 F<=0 => Goto 0 A/F -> X C/F -> Y "COVARIANCE=Sxy:" E/F-XY -> S@ "VAR X:" B/F-X^2 -> U@ "ST DEV X:" sqrt U -> U@ sqrt means square root "VAR Y:" D/F-Y^2 -> V@ "ST DEV Y:" root V -> V@ "CORR COEFF=r:" S/(UV)@ "EQN OF LINE=A+BX:" "A=":Y-Z(S/U^2)@ "B=":S/U^2@ 'FINISHED"