I have data and I need to do a linear regression on the data to obtain
y=Alpha*x+Beta
Alpha and Beta are estimators given by the regression, polyfit can give me those with no problem but this is a physical science report and I need to give error estimators on those values
I know from statistics that standard deviation exists for simple linear regression coefficients.
How can I calculate then in Matlab
Thank you
The second output of the
regresscommand will give you 95% confidence intervals for the regression coefficients. Here’s an example:Here alpha has been estimated 2.9712, with 95% confidence interval of between 2.5851 and 3.3573, and beta has been estimated as 1.9998, with 95% confidence interval between 1.9932 and 2.0064.