From: Erik on
Hi,

I have some data that looks like it follows a geometric distribution. I am attempting to best estimate the parameter, p, of the distribution but there doesn't appear to be any matlab command that does this directly; I would have thought it would be under geofit or something, but no such function exists. This is easy with the poisson distribution, where I can just use the command poissfit(X) to get the best estimate of lambda for my data X.

Is there a command that best estimates the parameter of a geometric distribution given the data?

Thanks
From: Frederic Moisy on
Hi,
you can use the Ezyfit toolbox:
http://www.mathworks.com/matlabcentral/fileexchange/10176
The geometric distribution can be fitted using the function
showfit('(1-p)^x*p; p=0.5');
or f = ezfit('(1-p)^x*p; p=0.5');
I hope this helps,
Fred


"Erik" <emiehling(a)gmail.com> wrote in message <hprbs8$5qf$1(a)fred.mathworks.com>...
> Hi,
>
> I have some data that looks like it follows a geometric distribution. I am attempting to best estimate the parameter, p, of the distribution but there doesn't appear to be any matlab command that does this directly; I would have thought it would be under geofit or something, but no such function exists. This is easy with the poisson distribution, where I can just use the command poissfit(X) to get the best estimate of lambda for my data X.
>
> Is there a command that best estimates the parameter of a geometric distribution given the data?
>
> Thanks