Line\303\246r regression med Maple.Der skal kun indtastes data i henholdsvis xdata og ydata, dern\303\246st justeres n, og tilsidst justeres plot2.restart:with(stats):with(stats[statplots]):with(plots):Punkterne indtastes som henholdsvis x- og y-v\303\246rdier i to listerxdata:=[1,2,3,4,5,21];ydata:=[4,5,9,10,12,38];Antal datapunkter n angivesn:=6;punkter:=[seq([xdata[i],ydata[i]], i=1...n)];linear_regression:=fit[leastsquare[[x, y], y = a*x + b, {a, b}]]([xdata, ydata]);Korrelations koefficienten r beregnes:r:=evalf(describe[linearcorrelation](xdata, ydata));og LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYlLUklbXN1cEdGJDYlLUkjbWlHRiQ2JlEickYnLyUlc2l6ZUdRIzEwRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUYjNiYtSSNtbkdGJDYlUSIyRidGMi9GOVEnbm9ybWFsRidGMkY1RjgvJTFzdXBlcnNjcmlwdHNoaWZ0R1EiMEYnRjJGQQ==r2:=r^2;Af korrelations koefficienten afl\303\246ses at der .............Modelfunktionen Mdfkt laves, s\303\245 eventuelle funktions v\303\246rdier kan beregnes.Mdfkt:=unapply(rhs(linear_regression), x);plot1:=plots[display](scatterplot(xdata, ydata, color=black)):I plot 2 skal intervallet justeres s\303\245 det indeholder xdata.plot2:=plot(Mdfkt,-1..25):display(plot1, plot2);Modellens forudsigelse til x=20 beregnesevalf(Mdfkt(20));x-v\303\246rdien der svarer til y-v\303\246rdien 14 beregnesevalf(solve(Mdfkt(x)=14,x));