commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [Math] [MATH-1260] SimpleRegression add new method: getPredictionStdErr(double x)
Date Fri, 21 Aug 2015 13:47:51 GMT
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.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message