6
$\begingroup$

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?

$\endgroup$
5
  • 3
    $\begingroup$ use the option RandomSeeding->1 to get the same results in all three runs. $\endgroup$
    – kglr
    Commented Jan 22, 2018 at 23:42
  • 1
    $\begingroup$ On Mathematica 11.1.1 (Windows 7) I get the same results for each. $\endgroup$
    – JimB
    Commented Jan 23, 2018 at 0:26
  • $\begingroup$ I'm running Mathematica 11.2.0 on mac. $\endgroup$ Commented Jan 23, 2018 at 1:24
  • 1
    $\begingroup$ Does anyone know exactly how FindDistribution works? $\endgroup$ Commented Jan 23, 2018 at 1:28
  • 1
    $\begingroup$ 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.) $\endgroup$
    – JimB
    Commented Jan 23, 2018 at 2:03

1 Answer 1

13
$\begingroup$

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 *)
$\endgroup$
2
  • 1
    $\begingroup$ Did you mean to say "FindDistribution" instead of "FittedDistribution?" $\endgroup$ Commented Jan 23, 2018 at 2:32
  • $\begingroup$ Oops! Thanks for catching that. I'll change it. $\endgroup$
    – JimB
    Commented Jan 23, 2018 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.