Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Fitting samples to Cauchy Distribution to obtain scale and mode parameters.

Subject: Fitting samples to Cauchy Distribution to obtain scale and mode parameters.

From: Ulrik Nash

Date: 27 Nov, 2010 16:58:03

Message: 1 of 2

Hi Everyone,

Suppose I have a matrix where columns contain data from different samples. I know that the samples are well described by the Cauchy Distribution and all I wish to do is calculate the mode and scale parameters by fitting each sample (the columns) to a Cauchy Distribution, creating a table of mode values and a table of scale values.

Firstly, how would I do this? Do I need the statistics toolbox and if so, how simple is it?

Regards,

Ulrik.

Subject: Fitting samples to Cauchy Distribution to obtain scale and mode

From: Peter Perkins

Date: 29 Nov, 2010 14:26:41

Message: 2 of 2

On 11/27/2010 11:58 AM, Ulrik Nash wrote:
> Hi Everyone,
>
> Suppose I have a matrix where columns contain data from different
> samples. I know that the samples are well described by the Cauchy
> Distribution and all I wish to do is calculate the mode and scale
> parameters by fitting each sample (the columns) to a Cauchy
> Distribution, creating a table of mode values and a table of scale values.
>
> Firstly, how would I do this? Do I need the statistics toolbox and if
> so, how simple is it?

Ulrik, the Cauchy dist'n is a Student's t with one degree of freedom.
If you have the Statistics Toolbox, you can fit what's called a t
location-scale distribution to data, which is to say it is a t
distribution that can be scaled and shifted. You can fit this to data
in one of two ways:

 >> fitdist(x,'tlocationscale')
ans =
tlocationscale distribution
     mu = -0.030333
     sigma = 0.660217
     nu = 0.696624
 >> mle(x,'distribution','tlocationscale')
ans =
     -0.030333 0.66022 0.69662

Now, this _estimates_ the degrees of freedom parameter rather than
fixing it at 1, so it isn't exactly what you asked for. But it may be
what you want.

Hope this helps.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us