-
Notifications
You must be signed in to change notification settings - Fork 32
Statistical Tests Selection
Selection of the proper statistical test is of the essential importance for analysing retrieved data of an experiment. Depending on the type of data points, different tests could more or less misleading or truthful. Here is presented a division in the interest of making the selection process easier and accurate.
The one-sample t-test is a statistical test used for testing the null hypothesis that the population mean is equal to a specified value mu_0
.
- The dependent variable must be continuous (interval/ratio).
- The observations are independent of one another.
- The dependent variable should be approximately normally distributed.
- The dependent variable should not contain any outliers.
- Implementation in R:
t.test(a, mu=mu_0)
- Implementation in Python:
scipy.stats.ttest_1samp(a, popmean, axis=0)
The one-sample t-test is a statistical test used for testing the null hypothesis such that the means of two populations are equal.
- The populations from which the samples have been drawn should be normal - appropriate statistical methods exist for testing this assumption (e.g. the Kolmogorov Smirnov non-parametric test).
- The standard deviation of the populations is unknown. This assumption can be tested by the F-test.
- Samples have to be randomly drawn independent of each other.
- Implementation in R:
t.test(a,b, var.equal=TRUE, paired=FALSE)
- Implementation in Python:
scipy.stats.ttest_ind(a, b, axis=0, equal_var=True, nan_policy='propagate')
The paired t-test is a statistical test used for testing the null hypothesis that the difference between two responses measured on the same statistical unit has a mean value of zero. The dependent variable must be continuous (interval/ratio).
- The observations are independent of one another.
- The dependent variable should be approximately normally distributed.
- The dependent variable should not contain any outliers.
- Implementation in R:
t.test(a,b, paired=TRUE)
- Implementation in Python:
scipy.stats.ttest_rel(a, b, axis=0, nan_policy='propagate')
The paired t-test is a statistical test used for testing whether the slope of a regression line differs significantly from 0.
- The observations are independent of one another.
- The dependent variable should be approximately normally distributed.
- The dependent variable should not contain any outliers.
- The data is continuous.
- The groups should have equal variance.
- Implementation in R:
t.test(x, y, alternative="two.sided", var.equal=FALSE)
- Implementation in Python:
scipy.stats.ttest_ind(a, b, axis=0, equal_var=True, nan_policy='propagate')
The Wilcoxon test is a non-parametric statistical test used to compare two related samples, matched samples, or repeated measurements on a single sample to assess whether their population mean ranks differ.
- Data are paired and come from the same population.
- Each pair is chosen randomly and independently.
- The data are measured on at least an interval scale when, as is usual, within-pair differences are calculated to perform the test (though it does suffice that within-pair comparisons are on an ordinal scale).
- Implementation in R:
wilcox.test(a,b, paired=TRUE)
- Implementation in Python:
scipy.stats.wilcoxon(x, y=None, zero_method='wilcox', correction=False)
[1] Table summary is extracted from https://www.graphpad.com/support/faqid/1790/
For more information about the Triangle of Life concept visit http://evosphere.eu/.
_________________
/ Premature \
| optimization |
| is the root of |
| all evil. |
| |
\ -- D.E. Knuth /
-----------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||