Since a number of the most common statistical tests rely on the normality of a sample or population, it is often useful to test whether the underlying distribution is normal, or at least symmetric. This can be done via the following approaches:

- Review the distribution graphically (via histograms, boxplots, QQ plots)
- Analyze the skewness and kurtosis
- Employ statistical tests (esp. Chi-square, Kolmogorov-Smironov, Shapiro-Wilk, Jarque-Barre, D’Agostino-Pearson)

If data is not symmetric, sometimes it is useful to make a transformation whereby the transformed data is symmetric and so can be analyzed more easily.

Topics:

sir, can you answer questions on psychological courses, because am an undergraduate of psychology?

Jerome,

If you questions are about statistics.

Charles

sir, should I test for each of my independent variables, and how can I transform a non-normal variable to be normally distributed.

This depends on the test that you are trying to perform, but usually when normality is required you need to make sure that the data for each sample is normally distributed.

Regarding transformations, please see the webpage

Transformations for Symmetry

Charles

Dear Charles,

You have a very helpful website.

I have a question regarding the normality test. In particular, I would like to interpret the results out of the Shapiro-Wilk test.

Assume the following setup. Given N data points, let P_N be the empirical distribution

P_N ( P (true distribution is normal) >= 1 – epsilon) >= 1-beta

Here, epsilon is the probability that the data are normally distributed, and beta is the confidence level for which the previous statement holds (given the data).

Can I use the Shapiro-Wilk test to compute the values for epsilon and beta?

Alternatively, is there a function, say f, such that we can make the statement

P (true distribution is normal) >= 1 – epsilon,

and epsilon = f(x1,…,xN)?

Best wishes,

AG

It seems like you want to find a confidence interval for the W statistic in the Shapiro-Wilk test. Sorry, but I don’t know how to do this.

Charles

Sir, I am conducting a study. I have 28 participants. There are pre-test and post-test. One treatment group only. No control group. My plan is, step 1, use QQ plot test to check whether the differences between pre and post follow normal distribution. If yes, I will just use paired-t-test. If no, I will go to use non parametric method. I plan to use “Wilcoxon paired signed rank test”, but this test requires a symmetric distribution population. Is there any test I can use to detect whether the pre-data and post-data is from a same symmetric distribution population please?

Thanks, Lina

Lina,

To use the Wilcoxon paired signed ranks test you don’t need to detect whether the pre-data and post-data come from the same symmetric distribution population. You need to check whether the differences between the pairs z_i = x_i – y_i is symmetric. The best way to do this, is to calculate the differences and look at a box-chart or histogram to see whether the data is reasonably symmetric.

Charles

Thank you so much!

Charles,

I’m dealing with data very similar to Lina’s. If after calculating the differences the data is NOT reasonably symmetric, what should you do then? Do you transform the data set of calculated differences or do you transform both the pre- and post- data before running the Wilcoxon paired signed ranks test? If it is the former, I’ve run into a problem of having to transform a data set with negative, positive, and zero numbers. Andy advice would be very helpful!

Thanks, Ian

Ian,

You can use a (1) nonparametric test, e.g. Wilcoxon signed-ranks test, (2) resampling approach or (3) transformation.

You can transform both data sets or the differences between the data sets.

If the data set contains negative values and you want to use a square root or log transformation, then let a = the smallest value in the data set and then subtract a-1 from all the data elements in order to make all the data elements positive.

Charles

Salaam sir

My study concerns running correlation. To check the normality of distribution, checking the boxplot, skewness & kurtosis, and 1 sample ks would suffice?

Thanks for your time and concern to run such a useful website.

Sir,

I appreciate your time and effort for this useful website. I have a question on selecting a statistical test.

I am trying to assess changing abundance of microbes in oral cavity along time. There are two oral samples: samples with dietary treatment of interest and oral samples with no treatment. I measured the relative abundances of microbes in oral samples at multiple time points: 2,4,6,8 days for samples with treatment and 0, 8 days for samples with no treatment(control). 0 day samples are measured before treatment effect takes place, so it is basically the same for both treated groups and control groups. Each has 3 replicates, thus there are 3 replicates*(0 day for both groups+8day for control+2,4,6,8 day time points for treated groups)= 18 samples total.

Do you have any suggestion for analysing these data? I am thinking about calculating the difference of abundance between each time point and the 0 day samples and then doing statistical tests on these delta values. Samples from different time points are all independent because all samples are measured from different individuals. Thus I am planning to calculate delta between every possible combination of nonzero-day replicates and three different replicates of the 0 day samples. However, I am having difficulty choosing statistical tests.

Thanks!

E.W.,

If you have factor A with two levels control vs treatment and factor B with two levels 0 vs 8 days (repeated measure) with 3 replicates each, then you can use a mixed repeated measures ANOVA to do the analysis.

I don’t see how you can integrate the the fact that you don’t have 0 days for A, but instead have 2,4,6 days. I guess you could try to see if you could use some sort of regression to predict a 0 days value, but I don’t know how effective this would be. You could also do separate analyses on the control and treatment samples, but this is probably not what you really want. In any case, with such a small sample, it is not clear what sort of useful result you could get anyway.

Charles

Dear Sir,

I am currently developing a model based on Neural Networks.

Performance analyzes were successfully done but doing graphical residual analysis, I observed the trend to be a bit linear as shown below. while performing residual analysis, I noticed that Percentile Vs residual isnot linear, even Residual Vs predicted is lineary and not randomly distributed.

I tried a lot of method of data transformation method but I did not succeed. When I transform other data set, it works. It is just my dataset which is kind difficult for me. Can you show me how to transform my data to achieve linearity and normality with real stat? Below are my data:

Date Observed Predicted

15-Feb-15 1176.491943 1176.492483

19-Feb-15 1176.48291 1176.483679

20-Feb-15 1176.46582 1176.467308

25-Feb-15 1176.463379 1176.46493

2-Mar-15 1176.452515 1176.454374

7-Mar-15 1176.450439 1176.452346

12-Mar-15 1176.44165 1176.443764

17-Mar-15 1176.435913 1176.437807

22-Mar-15 1176.432251 1176.43359

27-Mar-15 1176.429688 1176.430538

1-Apr-15 1176.428101 1176.428278

6-Apr-15 1176.427002 1176.426561

11-Apr-15 1176.426147 1176.425223

16-Apr-15 1176.425659 1176.424153

21-Apr-15 1176.425293 1176.423277

26-Apr-15 1176.425049 1176.422545

1-May-15 1176.424805 1176.421921

6-May-15 1176.424805 1176.421381

11-May-15 1176.424805 1176.420909

16-May-15 1176.424805 1176.420491

21-May-15 1176.424805 1176.420119

26-May-15 1176.424805 1176.419786

31-May-15 1176.424805 1176.419486

1-Jun-15 1176.424805 1176.419216

Thank you for your time and help

Sage,

Have you tried taking first differences to try to get a stationary time series? Then you can use time series approaches.

Charles

Hello, I have a question about D’Agostino test. GraphPad Prism v.6 showes that data is normal with p ~0,06, RealStatistic with the same data showes p value 0,312153. Why?

79,72; 136,27; 126,79; 78,46; 108,45; 139,75; 141,54; 129,32; 78,95; 81,30; 153,46

138,15; 116,89; 88,76; 101,43; 128,26; 156,63; 84,41; 122,12; 89,36; 116,83; 96,82

80,96; 136,80; 137,23; 85,54; 87,04; 114,28; 133,52; 104,68; 95,31; 95,24; 151,45

143,14; 70,59; 80,57 ;96,00; 105,72; 124,76; 93,53; 71,00; 140,88; 161,89; 159,13

78,69; 106,94; 73,93; 111,59; 88,73; 21,77; 29,10; 31,66; 32,30; 34,48; 40,00; 47,73

50,25; 53,24; 54,48; 55,48; 58,34; 59,31; 60,34; 61,97; 63,57; 66,54;

Hello Mateusz,

I ran the D’Agostino test and got p = .312153, as you have stated. I also got a result of p = .191604 from the Shapiro-Wilk test. I looked at a QQ-plot and saw that the data looks like a good fit for normality. I don’t know why you are getting such a different result from GraphPad Prism. Finally, I used the online calculator at http://contchart.com/goodness-of-fit.aspx and got results that show that the data is normally distributed.

Charles

Hello Charles, thx for the reply,

I also ran SW test on GraphPad and received p value equal .191604, so the same as in your AddIn.

In GraphPad they used D’Agostino-Pearson omnibus K2 normality test. I’m not sure (I’m not mathematician), but I think in AddIn you applied different version of D’Agostino tests (I know that he (she?) invented several)

Mathew

Hi Charles;

Thanks for the wonderful website and free resource you have generated for all of us.

I am trying to test normality for a sample size of 3 (only three data points). Which Normality test (if any) should I be using?

Atul

Hi Atul,

In gneral I tend to use Shpairo-Wilk. With only three sample elements you shouldn’t expect too much from any of the tests.

Charles

Thanks for a very useful website.

SigmaPlot software, automatically performs normality test and equal variance test among the samples whenever a parametric test is run. When I am running two way ANOVA on my data, it gives following:

Normality test: failed

Equal variance test: passed

However, when I am testing individual samples separately for normality, all of the samples are passing the normality test. For normality assumptions, is it sufficient, if all the samples are passing normality test separately?

Thanks again

Kamran,

Generally you care about the normality of each group, not all the data combined. Of course, the assumptions depend on the specific test you are conducting.

Charles

Hello

Thanks so much for your fabulous stats pages. I am at the planning stage for my project and I have a question about what to do in the event that I end up with two very different sized groups of participants. At first they are all going to take the same tests. But I have asked the groups to identify as either Atype or Btype so that I can see if there is a difference in how they performed in the tests according to type. What happens if I have 100 of type A and only 6 of type B?

Is there something I can do? Is is possible to do a comparison with such a discrepancy in size?

Rosalind,

You can perform certain tests with such unbalanced samples size. Generally, though, the statistical power of such tests is more based on the size of the smaller sample, and so the power of the test will likely be very poor.

Charles

Dear Charles,

can I use a paired t-test when the samples are not normally distributed but their differences are?

thank you for your help

Takwa,

Yes.

Charles

Can I analyse using independent sample T test for sample size of less than 10?

A sample size of less than 10-It this considered non-normal distribution?

Mei,

You can run a t test with samples of less than 10 elements, and in fact the data can still be normally distributed (or symmetric), although you still need to check to see whether the data is at least symmetric. The problem with such a small sample is low power, i.e. a likelihood of a type II error.

Charles

Dear Charles,

How do I check whether the data is normally distributed (or symmetrical)?

Thanks

Mei,

This is described on the referenced webpage. usually the best test for normality is the Shapiro-Wilk test and a good way to check for symmetry is via a Boxplot or Histogram. All of these are described on the website.

Charles

Dear Charles,

How can I analyse data with Shapiro-Wilk test with spss software?

Thanks

Mei,

Sorry, but i don’t use SPSS. This site is about statistical analysis using Excel.

Charles

Google it. Or read a book. There’s so much useful info out there. Learn it by yourself first and then ask questions.

I had enquired as to how to judge normality from Q-Q plot. Is it visual only or there is some mathematics involved. I did not see any response so I am raising the query again for your kind attention.

Pramod,

Visual only.

Charles

How can I calculate the sample size for linear and multiple regression?

See http://www.real-statistics.com/multiple-regression/statistical-power-sample-size-multiple-regression/

Charles

hi sir..

m coected statistical data in industry bt how can project their and how to use the chek the data normal or log normal and how to analysis their data .

Sorry, but I don’t undersatdn your question.

Charles

I am confused. I thought that the residuals must be normally distributed and not the raw data.

Rob,

This depends on the specific test that you are trying to use. For the purposes of the normality tests described on the referenced webpage, you can think of the data as being the residuals (if that is what is required for the test you have in mind). Also in some cases the residuals are normal if and on only if the data is normally distributed.

Charles

Hey Charles,

Do you have any guidance on when to rely on the central limit theorem (eyeballing a histogram or QQ plot) compared to a test statistic such as the Anderson-Darling, Lilliefors, or Shapiro-Wilk test?

I have read that the CLT is more applicable for a large amount of data points, while test statistics become increasingly unreliable with large amounts of data points because even a minor amount of outliers could cause the null hypothesis of normality to be erroneously rejected.

Thanks.

David,

In general, I would test the data (using QQ plot, Shapiro-Wilk, etc.) and not rely on the CLT.

Charles

Hi sir.

I am currently writing a research, and I have found out after using KS Test and shapiro. Comparison of scores among the different grade levels, has normal dist, so i will use AnoVa. However, in comparison of scores among different location, is abnormal dist, so i will use kruskal wallis.

My question is, i am using the same scores but when they are grouped differently. They have resulted to different dist (one is normal and the other is abnormal). Would it be wise/proper to use anova for the 1st and kruskal wallis for the other? Considering all of these belongs to entirely one research?

Thank you very much.

Christopher,

You can certainly use ANOVA for one test and Kruskal-Wallis for another test, even if they are for the same research area.

Charles

1. Sir, i am going to correlate variable 1 to variable 2. But when i test the distribution of each variable, one group is normally distributed while the other is abnormally distributed. What should i use then parametric(pearson) or nonparametric(spearman)?

2. And are their cases when normality testing is ignored?

Thank you ver much.

Christopher,

1. The two samples don’t need to be normally distributed in order to compute their correlation. You may need normality for certain tests. What hypothesis are you trying to test?

2. There are many tests for which normality is either not required or for which the test is pretty robust to violations of normality (e.g. Anova).

Charles

The question is “Is there a significant relationship between parental involvement (in weighted mean) and the academic performance (score in their test) of their children?”

Hi Sir,

I am in biology background and very new to statistical analyses. I have variable 1 and variable 2. For each variable, I have two timepoints, timepoint 1 and timepoint 2. For each timepoint, I have three treatments, treatment 1, 2 and 3.

E.g. for variable 1 or 2

Timepoint 1, treatment 1, 3 replicates

Timepoint 1, treatment 2, 3 replicates

Timepoint 1, treatment 3, 3 replicates

Timepoint 2, treatment 1, 3 replicates

Timepoint 2, treatment 2, 3 replicates

Timepoint 2, treatment 3, 3 replicates

My ultimate goals is to do statistical test to investigate effects of timepoint, treatment and their interactions on variables 1 and 2 (e.g. two way ANOVA). Also, I want to do correlation test between variables 1 and 2 (e.g. Pearson).

My problems are:

(1) When I want to do normality/homogeneity test, should I use the mean (from three replicates) or all the values from three replicates? And for these tests should be done within variable (mean-6 values; replicate-18 values) or within timepoint (mean-3 values; replicate-9 values) or within treatment (mean-1 values; replicates-3 values)?

(2) Similarly, when transformation is required in case of non-normal distribution, should I transform data for each replicate first, and then calculate mean and standard deviation? or directly transform the mean?

(3) I understand that percentage data should be transform prior to statistical analysis. May I know the definition of ‘percentage data’ refers to “%” in which the range is from 0-100, or also other forms of ‘percentage’ such as “%/day” or “% d-1”?

Thank you in advance and hope that my questions are clear.

Lee,

(1) Which to do, depends on what hypothesis you are testing. I don’t really know what you mean by “I want to do correlation test between variables 1 and 2 (e.g. Pearson)”, since you have many different types of data for these two variables.

(2) Generally you transform the data and not the mean.

(3) You can transform any of these version of percentage, as long as you use the same transformation for all the data in any one group.

Charles

Dear Charles,

Very good website. I found a lot of useful information.

I have a set of data with over 3000 data entries. I want to test whether data is normally diststributed. I understand (from your website) that a normal shapiro wilks test only can handle a small data sample.

How do I determine normality and what test do you recommend?

/Anders

Anders,

Shapiro-Wilk can be used with a data set of 5,000 entries, as shown on the following webpage:

http://www.real-statistics.com/tests-normality-and-symmetry/statistical-tests-normality-symmetry/shapiro-wilk-expanded-test/

Actually, this webpage shows how to support ever larger data sets.

Charles

Hi,

Can we use page view/unique visitor report over a period of time can be considered as normal distribution ?

I have data of unique visitors for last 52 week.

also I got the following value

Kurtosis 7.89154432

Skewness -2.104581667

any other test you recommend to analyse the same ?

The kurtosis is extremely high compared to a normal distribution. The skewness is also a little low for a normal distribution. The kurtosis and skewness of a normal distribution is zero, although we could accept some variation from these values, but not the values you have found. Your data does not appear to be normally distributed. A variety of tests can be used to confirm these results. These tests are listed on the referenced webpage.

Charles