searching around I've found that this is a common problem with fitting but I haven't found a work-able solution.
I have a symmetric data set that I've manipulated so that it is a probability distribution, ie. integral sums to 1, but the peak occurs between -0.002 and 0.002. Using FindDistributionParameters returns an error but I can fit it with a normal distribution using:
data = ToExpression@ImportString[Import["https://pastebin.com/raw/cVExSjYq"], "Text"]
{\[Mu], \[Sigma]} = (NonlinearModelFit[
data,
1/Sqrt[2*\[Pi]*\[Sigma]^2]*E^(-(x - \[Mu])^2/(
2*\[Sigma]^2)), {\[Mu], \[Sigma]}, x][
"BestFitParameters"][[All, 2]]) /. {x_, y_} -> {x, Abs[y]}
outputs:
{1.24156*10^-20, 0.000250996}
The distribution doesn't closely match, hence I'm trying to use other distributions but fitting it with
FindDistributionParameters[data,StudentTDistribution[0, \[Sigma], \[Nu]], {{\[Sigma], 0.00025}, {\[Nu], 0.5}}]
returns the error:
"One or more data points are not in support of the process or distribution StudentTDistribution[0,\[Sigma],\[Nu]]."
I get the same error using WeibullDistribution too and trying to manually find the NonlinearModelFit just returns {1,1,1} for {alpha,beta,mu}.
I've tried removing zero values using Select[data,#[[2]]!=0&] but that doesn't help.
Plotted data with StudentT[0,0.00025,0.5] in blue and NormalDistribution[0,0.00025] in red is shown here:
Any recommendations?
x=0
? Or that it's continuously differentiable? It looks to me to have the formAbs[a x^-b]
, or something similar, ie: undefined atx=0
. Maybe aGammaDistribution
(flipped over the vertical axis)? $\endgroup$