vyr[x_]:=10+x+0.1(x^2);
data=Table[{x,vyr[x]},{x,-7,-2,0.1}];
pl1=ListPlot[data];

Take[data,5]

chyba[{1,2}]

nahrada[x_]:=a+b*x+c*(x^2);
chyba[{x_,y_}]:=(((y-nahrada[x]))^2);
celkemEror=Simplify[Plus@@(chyba/@data)];
{D[celkemEror,a]==0,D[celkemEror,b]==0,D[celkemEror,c]==0}//Simplify;
Solve[%]
Fit[data,{1,x,(x^2)},x]