Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am fitting some time-series data to both a stable distribution and a normal distribution in order to assess the goodness of fit of each. Along the way I encountered the following confusing result. Could someone explain why this happens?

data1 ={0.0779615, 0.10661, -0.10661, -0.0253178, -0.0392207, 0.0892311, \
0.115069, 0.231802, 0.19517, 0.0279739, -0.0901511, -0.0784716, \
-0.0631789, -0.0572607, -0.0825012, 0.195567, 0.0505117, 0.183754, \
0.365871, 0.45219, 0.210721, -0.0396115, 0.0260313, 0.021456, \
-0.0318827, 0.0274891, -0.0239223, -0.00786374, 0.0194273, -0.030735, \
-0.0706707, 0.0745345, -0.0557558, 0.11472, 0.00521248, -0.0694686, \
0.0305097, 0.195748, 0.0830934, 0.205548, 0.0840846, -0.208923, \
-0.112126, 0.0727309, 0.0298448, 0.274583, 0.181881, -0.0555489, \
-0.350074, 0.0276329, 0.0780266, 0.0703987, 0.0228365}

(* First use the distribution fit test and then extract the fitted distribution *)
h1 = DistributionFitTest[data1, Automatic, "HypothesisTestData"];
h1["FittedDistribution"]
NormalDistribution[0.0443194, 0.1352]
(* EstimatedDistribution produces the same result when called with symbolic params*)
d1 = EstimatedDistribution[data1, NormalDistribution[μ1, σ1]]
Out=NormalDistribution[0.0443194, 0.1352]
(* Use DistributionFitTest on the estimated distribution *)
h2 = DistributionFitTest[data1, d1, "HypothesisTestData"];
h2["FittedDistribution"]
Out= NormalDistribution[0.0443194, 0.1352]
(* Output the TestDataTable and observe very different results *)
Grid[{{h1["TestDataTable", All]}, {h2["TestDataTable", All]}}\[Transpose], Frame -> All]

grid output

Looking inside these objects shows only one difference, which is the symbolic parameters in h1 and numeric parameters in h2, but I'm not sure why this should be, since the evaluation of the symbolic parameters should produce the same numeric results.

share|improve this question
    
You should find the answer to this in my response to this question. –  Andy Ross Jul 18 at 3:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.