Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.8K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Standard deviation of residuals different from manual calculation

Posted 2 years ago

Please can someone explain why pmSD1 and pmSD2 are different?

p = Predict[{1.2, 2, 3.5, 4, 5.2} -> {2.3, 1.2, 5.5, 7.7, 9.9}];
pm = PredictorMeasurements[p, {1.4 -> 2.5, 4.5 -> 8.6, 5.4 -> 10.2, 3.3 -> 3}];
pmSD1 = pm["StandardDeviation"]
pmSD2 = Sqrt[Total[pm["Residuals"]^2]/2]
Information[p, "Method"]
POSTED BY: Pablo Gil
3 Replies
Posted 2 years ago
POSTED BY: Jim Baldwin
Posted 2 years ago

Many Thanks Jim, also can you tell how the baseline is computed?

POSTED BY: Pablo Gil
Posted 2 years ago

pm["StandardDeviation"] uses the following formula:

Sqrt[Total[pm["Residuals"]^2]/Length[pm["Residuals"]]]

Here is a second example:

p = Predict[{1 -> 2, 3 -> 4.5, 5 -> 6, 7 -> 8.5}];
pm = PredictorMeasurements[p, {1.5 -> 2, 4 -> 5, 6 -> 5.5}];
pm["StandardDeviation"]
(* 1.12284 *)
Sqrt[Total[pm["Residuals"]^2]/Length[pm["Residuals"]]]
(* 1.12284 *)
POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard