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:
test if a vector of values is sampled from a Rayleigh distribution

Subject: test if a vector of values is sampled from a Rayleigh distribution

From: Eli

Date: 9 Feb, 2010 06:43:06

Message: 1 of 2

Matlab users,
I have 2 questions:
1)
I have a vector of values 'Noise' that should have a Rayleigh distribution.
I would like to preform a test to determine the how probable it is that this vector was in fact sampled from a Rayleigh distribution. the vector is 50176 elements in length.
What is the best way to do this?
2)
I have another vector 'Gnoise' that should have a gaussian distribution, but not centred at zero. I would like to preform a test to determine the how probable it is that this vector was in fact sampled from a Rayleigh distribution. This vector is 10201 elements in length.
What is the best way to do this?

Thanks,
-Eli

Subject: test if a vector of values is sampled from a Rayleigh distribution

From: Peter Perkins

Date: 9 Feb, 2010 13:41:45

Message: 2 of 2

On 2/9/2010 1:43 AM, Eli wrote:

> 1)
> I have a vector of values 'Noise' that should have a Rayleigh distribution.
> I would like to preform a test to determine the how probable it is that
> this vector was in fact sampled from a Rayleigh distribution. the vector
> is 50176 elements in length.
> What is the best way to do this?

The KSTEST function in the Statistics Toolbox might be one way to do that. But the K-S test assumes that the distribution you're testing against is fully known in advance. The p-value will be incorrect if you estimate the parameters of a Rayleigh distribution from your data, and then do a K-S test on those same data, using the estimated distribution as your null hypothesis. Such a test would typically be conservative, meaning it would tend to reject less than it should.

> 2)
> I have another vector 'Gnoise' that should have a gaussian distribution,
> but not centred at zero. I would like to preform a test to determine the
> how probable it is that this vector was in fact sampled from a Rayleigh
> distribution. This vector is 10201 elements in length.
> What is the best way to do this?

I assume you mean, "was in fact sampled from a Gaussian distribution". The LILLIETEST function in the Statistics Toolbox is one possibility. This test has a built-in compensation for the problem mentioned above, so you use to test against "unspecified normality".

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