In the practice of processing observation results, the distribution of the general population is unknown or (for continuous random variables) differs from the normal distribution, so the use of classical statistical methods is unreasonable and can lead to errors. In this case, methods are used that do not depend (or are free) from the distribution of the general population - nonparametric methods.
The article discusses from a unified point of view three single-sample tests that are frequently encountered in practice: the sign test, the t-test, and the Signed-Rank Wilcoxon test, a nonparametric procedure whose power is comparable to the power of the t-test in the case of a normally distributed sample, and exceeds the power of the t-test if the distribution of the sample has "heavier tails" compared to the normal distribution.
1. Define a model for the location model as follows. Let - denote a random sample obtained according to the following law
where it is assumed that random errors are independent and identically distributed random variables with a continuous distribution density symmetric about zero.
2 . Under the condition of symmetry, any position parameter , including the mean and median, is equal to . Consider the hypothesis
3. To test this hypothesis, consider three tests that are often used in practice: the sign test, the t-test, and the Wilcoxon test.
3.1. Classic signs test (sign test) is based on statistics
where for, respectively. Let be
. , ( , , ). , . โ p-value , โ (R pbinom
cdf ).
, () .
3.2. t- (t-test) .
, . t- t-
, . , t- . . p-value t- , โ t- c (R pt
cdf t-). p-value , .
3.3. t- , t- .
(signed-rank Wilcoxon test) , . , .
t-, , .
. , , ,
p-value , โ (R psignrank
cdf ).
4. . : , t- . .
4.1. ,
, โ - , โ . . , - .
4.2. , t- . , โ t- . .
4.3. , - (Hodges-Lehmann)
, (Walsh averages) . . , โ signed-rank Wilcoxon . . , โ . , , , .
5. ( ) A B . , ?
, A B. . R t-
> Store_A <- c(82, 69, 73, 43, 58, 56, 76, 65)
> Store_B <- c(63, 42, 74, 37, 51, 43, 80, 62)
> response <- Store_A - Store_B
> wilcox.test(response, alternative = "greater", conf.int = TRUE)
Wilcoxon signed rank exact test
data: response
V = 32, p-value = 0.02734
alternative hypothesis: true location is greater than 0
95 percent confidence interval:
1 Inf
sample estimates:
(pseudo)median
7.75
> t.test(response, alternative = "greater", conf.int = TRUE)
One Sample t-test
data: response
t = 2.3791, df = 7, p-value = 0.02447
alternative hypothesis: true mean is greater than 0
95 percent confidence interval:
1.781971 Inf
sample estimates:
mean of x
8.75
wilcox.test()
, p-value , - . - t.test()
. , , , A .
, . , t- t- ยซ ยป .