When using (Non)LinearModelFit you can get estimates for all parameters and for the variance of the fit and confidence intervals for parameters, but what about a confidence interval for the variance?
Y = vout; (*vin, vout properly defined earlier*)
listn = Table[1, {i, 1, Length[Y]}];
A = Transpose[{listn, vin}]; (*design matrix*)
gammacap = Inverse[Transpose[A] . A] . Transpose[A] . Y
DF = Length[Y] - Length[gammacap]
vcap = Norm[Y - A . gammacap]^2/DF
a = 0.05; (*level of significance*)
qp = Quantile[ChiSquareDistribution[DF], 1 - a/2]
qm = InverseCDF[ChiSquareDistribution[DF], a/2]
t = Quantile[StudentTDistribution[DF], 1 - a/2]
da = t Sqrt[
Transpose[{1, 0}] . Inverse[Transpose[A] . A] . {1, 0}* vcap];
db = t Sqrt[
Transpose[{0, 1}] . Inverse[Transpose[A] . A] . {0, 1}* vcap];
intconfv = {DF vcap/qp, DF vcap/qm}
intconfa = {gammacap[[1]] - da, gammacap[[1]] + da}
intconfb = {gammacap[[2]] - db, gammacap[[2]] + db}
This is what I've been doing (formulas are taken from "Introduction to Probability and Statistics" of Georgii). I'm trying to not blindly use Mathematica's result, instead I wanted to understand the calculations behind those and indeed confidence intervals for parameters coincide with the ones obtained from
fit["ParameterConfidenceIntervalTable", ConfidenceLevel -> 0.95]
Is there an option for the confidence interval of variance (for the moment I'm studying the linear case) ?