# Why does FindDistribution give nonrepeatable results for fit parameters?

When this cell is executed:

data = {1.67655096, 1.73234376, 1.8965016, 2.06723664,
2.19692088, 2.20885056, 2.21420304, 2.2199184, 2.25389304,
2.26954224, 2.42848368, 2.62902024, 2.6572795,
2.76596208, 2.95570296, 3.15574056, 3.25290168,
3.5498736, 3.81037608, 3.88707984, 4.00737456,
4.1241312, 4.34081592, 4.56303456, 4.57950024};
FindDistribution[data, TargetFunctions -> {LogNormalDistribution}]
FindDistribution[data, TargetFunctions -> {LogNormalDistribution}]
FindDistribution[data, TargetFunctions -> {LogNormalDistribution}]


the fitted values for mu and sigma are different for each FindDistribution. Why? Can one get the estimated uncertainties of the fitted values from a large number of these different fitted values?

• use the option RandomSeeding->1 to get the same results in all three runs.
– kglr
Jan 22, 2018 at 23:42
• On Mathematica 11.1.1 (Windows 7) I get the same results for each.
– JimB
Jan 23, 2018 at 0:26
• I'm running Mathematica 11.2.0 on mac. Jan 23, 2018 at 1:24
• Does anyone know exactly how FindDistribution works? Jan 23, 2018 at 1:28
• Giving the different fitted values might be helpful. (If this is a bug, then when reporting that to Wolfram, you'll certainly be more convincing with those values.)
– JimB
Jan 23, 2018 at 2:03

I don't know what FindDistribution is doing because it doesn't produce estimates that match any of those produced by FindDistributionParameters. I avoid FindDistribution because it is much more of a black box with minimal documentation. (A Bayesian prior is involved. From the documentation: The internal information criterion uses a Bayesian information criterion together with priors over TargetFunctions. There's nothing wrong with assuming some Bayesian prior but the documentation is lacking in any details about that. I'm more of a conservative statistician so I think its options are more along the line of "wishful thinking" given that it allows a hodgepodge of fits, finds the best fit among the candidate models but then does not account for or warn about the fishing expedition it has done.)

FindDistributionParameters will get you the maximum likelihood estimates but not measures of precision:

mle = FindDistributionParameters[data, LogNormalDistribution[μ, σ]]
(* {μ -> 1.0309, σ -> 0.30526} *)


One can use the LogLikelihood function to get estimates of the standard errors:

logL = LogLikelihood[LogNormalDistribution[μ, σ], data];
cov = -Inverse[(D[logL, {{μ, σ}, 2}]) /. mle];
seμ = cov[[1, 1]]^0.5
(* 0.0610519 *)
seσ = cov[[2, 2]]^0.5
(* 0.0431702 *)

• Did you mean to say "FindDistribution" instead of "FittedDistribution?" Jan 23, 2018 at 2:32
• Oops! Thanks for catching that. I'll change it.
– JimB
Jan 23, 2018 at 3:29