# LinearModelFit: Standard error or Standard error of the mean on the slope [closed]

UPDATED 02/14/16

Let me make this question clearer. Suppose each measurement that I make consists of three points, each with its own error governed by a normal distribution, on an XY plot. Obviously I can get a slope with just one measurement. I can use LinearModelFit to calculate the slope of such one measurement.

Now imagine if I do the same measurements ten times. I can fit for ten slopes. Each LinearModelFit will give me one slope with its error. If I take the mean and SD of the ten slopes, then I only have one averaged slope and one averaged SD.

My question about Mathematica is this. Is the error attributed to the slope the error of one measurement, or is it the error of the averaged slope? Or is it neither of these?

Question as originally posted

I have generated some data points for y = 2x equation. Both x and y have SD of 1 using normal distribution. Now, I can fit the result with LinearModelFit.

 data = {{15.4239559911589, 26.1913865426696}, {1.19200455227252, 1.57147919995481}, {0.760043460978471, -1.85757720391831}, {16.9897724167226, 31.4874783582698}, {11.0624581731998, 21.4927615949096}, {12.4329330755438, 27.1788226475715}, {8.02404253535088, 14.2996782674318}, {17.6582880470789, 32.3219364958568}, {7.5087634129172, 16.067137595272}, {19.1043041675387, 34.5777608701006}, {15.877354843904, 33.6898071105012}, {15.568644370401, 26.6368002511935}, {20.1439513327225, 39.175260292529}, {9.37214779884298, 16.6930629512215}, {14.8229986631303, 27.5584680484107}, {9.56505408355559, 19.8308073325376}, {15.1618882940615, 35.2641818884374}, {3.56408341892867, 6.04027362213018}, {8.09634158598029, 15.8824802631668}, {3.87278838752738, 9.29890330741694}, {20.2006381926558, 41.0156521737783}};
model = LinearModelFit[data, x, x];
model["ParameterTable"]


This yields .

My question: The standard error reported by the fit. Is it the standard error of ONE measurement, or is it the standard error of the mean?

That is, if I do the same "measurements" again and try to find the slope, would one measurement gives me an SD error of 0.0913537 (and the mean error is smaller by a factor of $1/\sqrt{n}$), or would the MEAN of many measurements gives me an SD error of 0.0913537?

I'm not very solid on Statistics. This question might be more appropriate on other StackExchange forums. But since it involves how Mathematica implements linear fit, I hope I might be able to get some help here.

Data points can be found in CSV format here

## closed as off-topic by MarcoB, Kuba♦, Yves Klett, m_goldberg, JensFeb 14 '16 at 18:42

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

• imagine you run your experiment a large number of times and do a regression on each data set. The "Parameter Table" values are an estimate of the mean and variability of each of the fit parameters. – george2079 Feb 12 '16 at 21:01
• note LinearModelFit always has a constant parameter in the fit. That may be confusing since the arg is just x, the fit expression is effctively m x + b. If you want to fit the form y=mx  use FindFit[data, m x , m , x] (but then you don't get the nice parameter table output.) – george2079 Feb 12 '16 at 21:19
• Your question is not clear in part due to your terminology as there is no such thing as a "standard error of the mean on the slope". You also mention "ONE measurement" so I'm wondering if you want the standard error of a single new observation vs. the standard error for the prediction of the mean rather than a standard error for the estimated slope. – JimB Feb 12 '16 at 21:31
• @george2079 . Good point about fitting y=mx. You can still get the nice tables with LinearModelFit by using the IncludeConstantBasis -> False option. – JimB Feb 12 '16 at 21:35
• I'm voting to close this question as off-topic because the problem stems from an incomplete grasp of the underlying statistics rather than from the Mathematica code. – MarcoB Feb 14 '16 at 4:51