Example 10: Regression
by Zavan Karian
> restart: with(plots, display): libname:="C:/mylib/statistics",libname: with(stat):
Warning, the name randomize has been redefined
> X := [1,2,3,4,5];
> Y := [2,3,1,5,4];
> r:= Correlation(X,Y);
> A := BivariateNormalS(100, 225, 400, 625, 0.9, 200):
> A[1..5];
> r := Correlation(A);
> y := LinReg(A, x);
> Y := PolyReg(A, 3, x);
> ScatPlot(A);
> ScatPlotLine(A);
>