# Does this code give the standard error or the standard deviation of a distribution?

Wikipedia says "the relationship between the standard error and the standard deviation is such that, for a given sample size, the standard error equals the standard deviation divided by the square root of the sample size." At Standard errors for maximum likelihood estimates in FindDistributionParameters, there is this code:

standarderrors[data_, dist_, paramlist_, mleRule_] :=
Block[{len, infmat, cov},
len = Length[data];
(* compute negative of expected Fisher information *)
infmat = -D[LogLikelihood[dist, data], {paramlist, 2}]/len /. mleRule;
(* invert to get asymptotic covariance for Sqrt[n](theta-theta0) *)
cov = Inverse[infmat];
(* standard errors are the Sqrt of diagonal elements divided by sample size *)
Sqrt[Diagonal[cov]/len]
]


which suggests it gives the Standard Error. But in the same link, the above code is later referred to as giving the Standard Deviation. Which is it?

• Maybe to add more confusion: standard errors are standard deviations. But to your question: that code produces the proper measure of precision for the parameter estimators. (Although the use of the term len in that code can be completely removed and you'll get the same results.) – JimB Jan 29 '18 at 18:20
• When you say "...the proper measure of precision for the parameter estimators," do you mean "the one sigma standard deviations for the fit values?" – Michael B. Heaney Jan 29 '18 at 18:39
• You get an estimate of the standard error for each parameter estimate. – JimB Jan 29 '18 at 19:13
• I am still confused. Wikipedia says standard errors are not standard deviations. Why do you say standard errors are standard deviations? – Michael B. Heaney Jan 29 '18 at 19:21
• I believe you. The first line in the Wikipedia for "standard error" is: "The standard error (SE) of a parameter is the standard deviation of its sampling distribution." – JimB Jan 29 '18 at 19:38