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:
Histogram and Normality test

Subject: Histogram and Normality test

From: Mastaneh

Date: 6 Aug, 2008 17:18:02

Message: 1 of 3

Dear all,

I have a 2^18-length data, sampled at 48 kHz with a 16-bit
ADC. The histogram is very close to the normal
distribution, but the data always fails the normality
hypothesis tests.
When plotting the histogram with 1000 bins, there are
various spikes in the figure. I know reducing the number of
bins help get a smoother curve, but am I correct in
assuming that these spikes are the reason the tests fail? I
mean, the test needs to average the spike amplitudes to get
the estimated distribution, so the result doesn't have the
same moments as the original sample.

Thanks for any explanation,
Mastaneh

Subject: Histogram and Normality test

From: Paul

Date: 6 Aug, 2008 23:41:02

Message: 2 of 3

"Mastaneh " <mtorkama@iupui.edu> wrote in message
<g7cmca$a2c$1@fred.mathworks.com>...
> Dear all,
>
> I have a 2^18-length data, sampled at 48 kHz with a 16-bit
> ADC. The histogram is very close to the normal
> distribution, but the data always fails the normality
> hypothesis tests.
> When plotting the histogram with 1000 bins, there are
> various spikes in the figure. I know reducing the number of
> bins help get a smoother curve, but am I correct in
> assuming that these spikes are the reason the tests fail? I
> mean, the test needs to average the spike amplitudes to get
> the estimated distribution, so the result doesn't have the
> same moments as the original sample.


I would investigate the source of the spikes in the original
data and not in the histogram bins. There are some scripts
to remove outliers and this may be all you need.
>
> Thanks for any explanation,
> Mastaneh

Subject: Histogram and Normality test

From: Sajjad Taghvaee

Date: 5 Jul, 2011 15:45:24

Message: 3 of 3

"Mastaneh " <mtorkama@iupui.edu> wrote in message <g7cmca$a2c$1@fred.mathworks.com>...
> Dear all,
>
> I have a 2^18-length data, sampled at 48 kHz with a 16-bit
> ADC. The histogram is very close to the normal
> distribution, but the data always fails the normality
> hypothesis tests.
> When plotting the histogram with 1000 bins, there are
> various spikes in the figure. I know reducing the number of
> bins help get a smoother curve, but am I correct in
> assuming that these spikes are the reason the tests fail? I
> mean, the test needs to average the spike amplitudes to get
> the estimated distribution, so the result doesn't have the
> same moments as the original sample.
>
> Thanks for any explanation,
> Mastaneh
 
Testing the normality of data through the histogram shape would not be enough. You need to run more tests. Here is some of them you can apply using Matlab Statistics Toolbox:

QQ-Plot (qqplot(x))
Skewness and Kurtosis
Kolmogorov-Smirnov Test(kstest)
Chi Square Test
Lilliefors test for goodness of fit (lilitest)
Jarque–Bera test(jbtest)

Sajjad

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