2. FIRSTUP
CONSULTANTS
ABSTRACT
I’m thankful to my teacher Prof. B.S. Mahapatra for providing me the guidelines
regarding this project. I’ve been assigned the topic, “The Sign Test”, finding it’s use
and the analogy behind it, discussing the various procedures of finding the different
types of sign test, by using we could see the results such as the analysis of the
statistical variances of the data. Its widely used in in many engineering and
manufacturing applications and presents its application. This technique is intended
to analyse variability in data in order to infer the inequality among population
means. Nowadays, it’s widely used in the calculation of linear regression in case of
using modules of ML, and it’s widely used in medical purposes also.
2
3. FIRSTUP
CONSULTANTS
DEFINITION OF SIGN TEST
The sign test is a statistical method to test for consistent differences between pairs
of observations, such as the weight of subjects before and after treatment. Given
pairs of observations (such as weight pre- and post treatment) for each subject, the
sign test determines if one member of the pair (such as pre-treatment) tends to be
greater than (or less than) the other member of the pair (such as post-treatment).
3
5. FIRSTUP
CONSULTANTS
TWO SIDED SIGN TEST
5
Data are collected on the length of the left hind leg and left foreleg for 10 deer.
Deer Hide leg Length(cm) Fore leg length(cm) Difference
1 142 138
+
2 140 136
+
3 144 147
-
4 144 139
+
5 142 143
-
6 146 141
+
7 149 143
+
8 150 145
+
9 142 136
+
10 148 146
+
6. FIRSTUP
CONSULTANTS
The null hypothesis is that there is no difference between the hind leg and
foreleg length in deer.
The alternative hypothesis is that there is a difference between hind leg length
and foreleg length.
There is n=10 deer.
There are 8 positive differences and 2 negative differences.
What is the probability that the observed result of 8 positive differences, or a
more extreme result, would occur if there is no difference in leg lengths?
Because the test is two-sided, a result as extreme or more extreme than 8
positive differences includes the results of 8, 9, or 10 positive differences, and
the results of 0, 1, or 2 positive differences. The probability of 8 or more
positives among 10 deer or 2 or fewer positives among 10 deer is the same as
the probability of 8 or more heads or 2 or fewer heads in 10 flips of a fair coin.
The probabilities can be calculated using the binomial test, with the probability
of heads = probability of tails = 0.5.
6
7. FIRSTUP
CONSULTANTS
• Probability of 0 positive difference among 10 deer = 0.00098
• Probability of 1 positive difference among 10 deer = 0.00977
• Probability of 2 positive difference among 10 deer = 0.04395
• Probability of 8 positive difference among 10 deer = 0.04395
• Probability of 9 positive difference among 10 deer = 0.00977
• Probability of 10 positive difference among 10 deer = 0.00098
The two-sided probability of a result as extreme as 8 of 10 positive difference is
the sum of these probabilities:
0.00098 + 0.00977 + 0.04395 + 0.04395 + 0.00977 + 0.00098 = 0.109375.
Thus, the probability of observing a result as extreme as 8 of 10 positive
differences in leg lengths, if there is no difference in leg lengths, is p = 0.109375.
The null hypothesis is not rejected at a significance level of p = 0.05. With a
larger sample size, the evidence might be sufficient to reject the null hypothesis.
7
8. FIRSTUP
CONSULTANTS
ONE SIDED SIGN TEST
8
A manufacturer produces two products, A and B. The manufacturer wishes to know if
consumers prefer product B over product A. A sample of 10 consumers are each given
product A and product B, and asked which product they prefer. What is the probability
of a result as extreme as 8 positives in favor of B in 9 pairs, if the null hypothesis is true,
that consumers have no preference for B over A?
The null hypothesis is that consumers do not prefer product B over product A.
The alternative hypothesis is that consumers prefer product B over product A.
At the end of the study, 8 consumers preferred product B, 1 consumer preferred product A,
and one reported no preference.
Number of +'s (preferred B) = 8 Number of –'s (preferred A) = 1 Number of ties (no
preference) = 1
The tie is excluded from the analysis, giving n = number of +'s and –'s = 8 + 1 = 9.
This is the probability of 8 or more heads in 9 flips of a fair coin, and can be calculated
using the binomial distribution with p(heads) = p(tails) = 0.5.
P (8 or 9 heads in 9 flips of a fair coin) = 0.0195.
The null hypothesis is rejected, and the manufacturer concludes that consumers prefer
product B over product A.
9. FIRSTUP
CONSULTANTS
SIGN TEST FOR MEDIAN OFASINGLE SAMPLE
9
In a clinical trial, survival time (weeks) is collected for 10 subjects with non-Hodgkin's
lymphoma. The exact survival time was not known for one subject who was still alive after
362 weeks, when the study ended. The subjects' survival times were
49, 58, 75, 110, 112, 132, 151, 276, 281, 362+
The plus sign indicates the subject still alive at the end of the study. The researcher wished to
determine if the median survival time was less than or greater than 200 weeks.
The null hypothesis is that median survival is 200 weeks.
The alternative hypothesis is that median survival is not 200 weeks.
Observations below 200 are assigned a minus (−); observations above 200 are assigned a plus
(+). For the subject survival times, there are 7 observations below 200 weeks (−) and 3
observations above 200 weeks (+) for the n=10 subjects.
Because any one observation is equally likely to be above or below the population median, the
number of plus scores will have a binomial distribution with mean = 0.5.
What is the probability of a result as extreme as 7 in 10 subjects being below the median? This
is exactly the same as the probability of a result as extreme as 7 heads in 10 tosses of a fair
coin. Because this is a two-sided test, an extreme result can be either three or fewer heads or
seven or more heads.
10. FIRSTUP
CONSULTANTS 10
The probability of observing k heads in 10 tosses of a fair coin, with p(heads) = 0.5, is given by
the binomial formula:
P (Number of heads = k) = Choose (10, k) × 0.5^10
The probability for each value of k is given in the table below.
The probability of 0, 1, 2, 3, 7, 8, 9, or 10 heads in 10 tosses is the sum of their individual
probabilities:
0.0010 + 0.0098 + 0.0439 + 0.1172 + 0.1172 + 0.0439 + 0.0098 + 0.0010 = 0.3438.
Thus, the probability of observing 3 or fewer plus signs or 7 or more plus signs in the survival
data, if the median survival is 200 weeks, is 0.3438. The expected number of plus signs is 5 if
the null hypothesis is true. Observing 3 or fewer, or 7 or more pluses is not significantly
different from 5. The null hypothesis is not rejected. Because of the extremely small sample
size, this sample has low power to detect a difference.
k 0 1 2 3 4 5 6 7 8 9 10
P 0.0010 0.0098 0.0439 0.1172 0.2051 0.2461 0.2051 0.1172 0.0439 0.0098 0.0010
11. FIRSTUP
CONSULTANTS
CONCLUSION
Nonparametric tests and parametric tests: which should we use?
As there is more than one treatment modality for a disease, there is also
more than one method of statistical analysis. Nonparametric analysis
methods are clearly the correct choice when the assumption of normality
is clearly violated; however, they are not always the top choice for cases
with small sample sizes because they have less statistical power
compared to parametric techniques and difficulties in calculating the
"95% confidence interval," which assists the understanding of the
readers. Whatever methods can be selected to support the researcher's
arguments most powerfully and to help the reader's easy understandings,
when parametric methods are selected, researchers should ensure that
the required assumptions are all satisfied. If this is not the case, it is more
valid to use nonparametric methods because they are "always valid, but
not always efficient," while parametric methods are "always efficient, but
not always valid".
11