SIGNT
Performs a sign test of the hypothesis that a given value is a specified quantile of a distribution.
Required Arguments
X — Vector of length NOBS containing the input data. (Input)
Q — Hypothesized percentile of the population from which X was drawn. (Input)
P — Value in the range (0, 1). (Input)
Q is the 100 * P percentile of the population.
NPOS — Number of positive differences X(j Q, for j = 1, 2, , NOBS. (Output)
NTIE — Number of zero differences (ties) X(j Q, for j = 1, 2, , NOBS. (Output)
PROB — Binomial probability of NPOS or more positive differences in NOBS  NTIE  NMISS trials. (Output)
NMISS — Number of missing values in X. (Output)
Optional Arguments
NOBS — Number of observations. (Input)
Default: NOBS = size (X,1).
FORTRAN 90 Interface
Generic: CALL SIGNT (X, Q, P, NPOS, NTIE, PROB, NMISS [])
Specific: The specific interface names are S_SIGNT and D_SIGNT.
FORTRAN 77 Interface
Single: CALL SIGNT (NOBS, X, Q, P, NPOS, NTIE, PROB, NMISS)
Double: The double precision name is DSIGNT.
Description
Routine SIGNT tests hypotheses about the proportion P of a population that lies below a value Q. In continuous distributions, this can be a test that Q is the 100P‑th percentile of the population from which X was obtained. To carry out testing, SIGNT tallies the number of values above Q in NPOS. The binomial probability of NPOS or more values above Q is then computed using the proportion P and the sample size NOBS (adjusted for the missing observations [NMISS] and ties [NTIE]).
Hypothesis testing is performed as follows for the usual null and alternative hypotheses.
*H0 : Pr(X Q) P (the P‑th quantile is at least Q)
H1: Pr(X Q) > P
Reject H0 if PROB is less than or equal to the significance level.
*H0 : Pr(X Q) P (the P‑th quantile is no greater than Q)
H1 : Pr(X Q) < P
Reject H0 if PROB is greater than or equal to one minus the significance level.
*H0 : Pr(X = Q) = P(the P‑th quantile is Q)
H1 : Pr(X Q) < P or Pr(X Q) > P
Reject H0 if PROB is less than or equal to half the significance level or greater than or equal to one minus half the significance level.
The assumptions are as follows:
1. The Xi are a random sample; i.e., they are independent and identically distributed.
2. The measurement scale is at least ordinal; i.e, an ordering less than, greater than, and equal to exists in the observations.
Many uses for the sign test are possible with various values of P and Q. For example, to perform a matched sample test that the difference of the medians of Y and Z is 0.0, let P = 0.5, q = 0.0, and Xi = Yi  Zi in matched observations Y and Z. To test that the median difference is C, let Q = C.
Comments
Other probabilities that may be of interest can be computed via routine BINDF (see Chapter 17, “Probability Distribution Functions and Inverses”).
Example
We wish to test the hypothesis that at least 75% of a population is negative. Because 0.923 < 0.95, we fail to reject the null hypothesis at the 5 percent level of significance.
 
USE SIGNT_INT
USE UMACH_INT
INTEGER NOBS
REAL P, Q
PARAMETER (NOBS=19, P=0.75, Q=0.0)
!
INTEGER NMISS, NOUT, NPOS, NTIE
REAL PROB, X(NOBS)
!
DATA X/92.0, 139.0, -6.0, 10.0, 81.0, -11.0, 45.0, -25.0, -4.0, &
22.0, 2.0, 41.0, 13.0, 8.0, 33.0, 45.0, -33.0, -45.0, -12.0/
! Perform sign test
CALL SIGNT (X, Q, P, NPOS, NTIE, PROB, NMISS)
! Print output
CALL UMACH (2, NOUT)
WRITE (NOUT,99996) NPOS
WRITE (NOUT,99997) NTIE
WRITE (NOUT,99998) PROB
WRITE (NOUT,99999) NMISS
!
99996 FORMAT (' Number of positive differences = ', I2)
99997 FORMAT (' Number of ties = ', I2)
99998 FORMAT (' PROB = ', F6.3)
99999 FORMAT (' Number of missing values = ', I2)
END
Output
 
Number of positive differences = 12
Number of ties = 0
PROB = 0.923
Number of missing values = 0
Published date: 03/19/2020
Last modified date: 03/19/2020