I wonder if anyone know what residual variance is

6 views (last 30 days)
I now have a nitrate time series and I detrend it by fitting into a quadratic line.I have read a paper which has a table about "percentage of the original variance still present in the residuals after detrending" with better fit of smaller numbers and all values of below 100. I wonder if it is true that residual variance could be calculated through v ar(d)/var(b) or 1 - corr(b,c) . Actually, I am not so sure about what residual variance here means

Accepted Answer

Star Strider
Star Strider on 24 Jul 2015
The only context I’m familiar with is the variance of the residuals in a regression. If ‘x’ is the independent variable, ‘y(x)’ is the empirical value of the dependent variable at ‘x’, and the value of the regression at ‘x’ is ‘yfit(x)’, the residual at that point is y(x)-yfit(x). Taken together in that context, the residual variance is the variance of the residuals, or var(y-yfit). You would expect the variance of the residuals of a regression to be less than the variance of the original data.
Does that make sense in the context of the paper you’re referring to?
  2 Comments
xiaoli su
xiaoli su on 28 Jul 2015
Edited: xiaoli su on 28 Jul 2015
Thanks! Star Strider. However, the answer to the var may sometimes exceed 1. I got a variance of more than 3 when fitting ar(1)
I have now come up with a new problem. Actually, I am dealing with the AR model. I have derived a function using ar(Y,n), so y(x) will be my raw data and yfit(x) will be values I got after fitting the first n data into function ar(Y,n). However, the intercept is always 1 in ar(Y,n) , so the yfit(x) I got may not be so good.
So, I wonder if there is a function in MATLAB that can help me find the residual variances.
Star Strider
Star Strider on 28 Jul 2015
My pleasure.
The only limits on variances that I’m aware of is that by definition they’re always non-negative. Their magnitude otherwise depends only on the data.
I haven’t worked with the System Identification Toolbox in a while. However I’m not aware of any particular restrictions on the magnitude of ar results.
I did a search and found only this (possibly relevant) Newsreader thread. It may be what you’re looking for. Otherwise, the definitions I found essentially repeat my description of ‘residual variance’.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!