Click or drag to resize
SignTest Class
Performs a sign test.
Inheritance Hierarchy
SystemObject
  Imsl.StatSignTest

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public class SignTest

The SignTest type exposes the following members.

Constructors
  NameDescription
Public methodSignTest
Constructor for SignTest.
Top
Methods
  NameDescription
Public methodCompute
Performs a sign test.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyNumPositiveDev
Returns the number of positive differences. Note that the Compute method must be invoked first before invoking this method. Otherwise, the return value is 0.
Public propertyNumZeroDev
Returns the number of zero differences. Note that the Compute method must be invoked first before invoking this method. Otherwise, the return value is 0.
Public propertyPercentage
The percentage percentile of the population.
Public propertyPercentile
The hypothesized percentile of the population.
Top
Remarks

Class SignTest tests hypotheses about the proportion p of a population that lies below a value q, where p and q corresponds to the Percentage and Percentile properties, respectively. In continuous distributions, this can be a test that q is the 100 p-th percentile of the population from which x was obtained. To carry out testing, SignTest tallies the number of values above q in the number of positive differences x[j-1]- {\rm Percentile} for j=1, 2, \ldots, {\rm x.length}. The binomial probability of the number of values above q in the number of positive differences x[j-1]- {\rm Percentile} for j=1,2,\ldots,\ldots, {\rm x.length} or more values above q is then computed using the proportion p and the sample size in x (adjusted for the missing observations and ties).

Hypothesis testing is performed as follows for the usual null and alternative hypotheses:

  • H_0: Pr(x \leq q) \geq p (the p-th quantile is at least q)

    H_1: Pr(x \leq q) \lt p

    Reject H_0 if probability is less than or equal to the significance level.

  • H_0: Pr(x \leq q) \leq p (the p-th quantile is at least q)

    H_1: Pr(x \leq q) \gt p

    Reject H_0 if probability is greater than or equal to 1 minus the significance level.

  • H_0: Pr (x = q) = p(the p-th quantile is q)

    H_1: Pr((x \leq q) \lt p) or Pr((x \le q) \gt p)

    Reject H_0 if probability is less than or equal to half the significance level or greater than or equal to 1 minus half the significance level.

The assumptions are as follows:

  1. They are independent and identically distributed.
  2. 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 x_i = y_i - z_i in matched observations y and z. To test that the median difference is c, let q = c.

See Also