On 8/20/15 6:12 AM, Patrick Drury wrote: > I have a requirement to be able to get the standard error for a predicted y > value for a given x value. I believe that adding a generalisation of > getInterceptStdErr() to SimpleRegression as detailed in the feature > description of [MATH-1260] would do the trick. Ad hoc experimentation with > exposing xbar via reflection and performing this calculation seemed to > produce good results. I am not a mathematician though, so would be keen to > know if this the correct approach? > This looks like a good enhancement request. Thanks for opening the ticket. The formula in the ticket is for standard error in mean response (the mean value of y values for a given x). What you probably want is standard error for predicted values, which requires that you add 1 to the quantity under the radical. See, e.g, [1], [2] for a description of the difference. Basically, the standard error of the predicted value takes into account the variation in yhat around its predicted mean.
Phil [1] http://www.stat.wisc.edu/courses/st572-larget/Spring2007/handouts03-1.pdf [2] http://www.ncssm.edu/courses/math/Talks/PDFS/Standard%20Errors%20for%20Regression%20Equations.pdf --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org