Multiple Linear Regression

X={0.60,1.30,3.50,1.90,2.30};
Y= {0.33,1.35,2.30,0.95,1.25};
Data=Transpose[{X,Y}];
y=Transpose[Data][[2]]
x=Transpose[Table[Function[x,(x^k)]/@Transpose[Data][[1]],{k,0,2}]]
{MatrixForm[x],MatrixForm[y]}

b=Inverse[Transpose[x].x].Transpose[x].y;
MatrixForm[b]

modelQuadratic=LinearModelFit[{x,y}]

modelQuadratic["RSquared"]
modelQuadratic["EstimatedVariance"]

Hand Calclulations

SST = Total[(Y-Mean[Y])^2]
SSE = Total[modelQuadratic["FitResiduals"]^2]
SSR = SST - SSE
Rsquare = SSR/SST

CI for Parameters

modelQuadratic["ParameterConfidenceIntervalTable",ConfidenceLevel->0.90]

CI for mean and PI for Y

xpredict=0;
yhat=Normal[modelQuadratic]/.{#1->1,#2->xpredict,#3->(xpredict^2)}
CI=modelQuadratic["MeanPredictionBands",ConfidenceLevel->0.95]/.{#1->1,#2->xpredict,#3->(xpredict^2)}
PI=modelQuadratic["SinglePredictionBands",ConfidenceLevel->0.90]/.{#1->1,#2->xpredict,#3->(xpredict^2)}

Significance of Regression

p = 2;
Fpn = ((Length[Data]-p-1)/p) ((modelQuadratic["RSquared"])/(1-modelQuadratic["RSquared"]))
FStat=Mean[modelQuadratic["ANOVATableFStatistics"]]
InverseCDF[FRatioDistribution[p, Length[Data]-p-1],0.95]

T-Test for Model Sufficiency

modelQuadratic["ParameterTable"]

Partial F-Test for Model Sufficiency

linear=LinearModelFit[Data,i,i]
SSEreduced=Total[linear["FitResiduals"]^2]
SSEfull=Total[modelQuadratic["FitResiduals"]^2]
n=Length[Data];
p=2;m=1;
FTestStat=((n-p-1)/(p-m)) ((SSEreduced-SSEfull)/SSEfull)
InverseCDF[FRatioDistribution[p-m,n-p-1],0.95]