I defined a security bound for a random walk (cube with 15 length) and I have this code to obtain a sample of the random times at which the random walk crosses the boundary for the first time:
w = Do[i = 0; NestWhile[(i++; # + RandomReal[{-1, 1}, 3]) &, {0, 0, 0}, Norm[#] < 15 &];
Sow[i], {1000}] // Reap
(code taken from Sample of the random times at which the random walk crosses the boundary)
And I constructed a histogram with w
:
And now I want to know the distribution of this data. I thought that it was a gamma because of the histogram, but I ran some tests in Excel and I concluded that it isn't, but I would like to confirm that with Mathematica. Is that possible?
And when I do this:
\[ScriptCapitalH] = DistributionFitTest[w[[2, 1]], Automatic, "HypothesisTestData"];
\[ScriptCapitalH]["FittedDistribution"]
I have for output: NormalDistribution[233.588, 150.231]
, but skewness[w] = 1.83
(if it was normally distributed, it should be approximately zero).
Would like some help please :)
DistributionFitTest
to determine whether or not my data fit a gamma distribution?"? If so, then mma.se may be more appropriate than math. $\endgroup$Automatic
as the second argument does at all what you think. It seems to just assume a normal dist and theAutomatic
argument specifies the test type. (Can anyone cook up an example whereAutomatic
returns anything other thanNormalDistribution
) ? $\endgroup$DistributionFitTest
defaults to a test for normality. The fitted distribution is NOT the best fitting distribution. It is the best fitting distribution in the family you are testing. When setting the distribution family toAutomatic
you are using the normal family of distributions. $\endgroup$