Darwin Help

Back to Index

TestStatResult

Class TestStatResult - result of a statistical test

Calling Sequence  TestStatResult(name,TestStat,pvalue,pstd)
Selectors
NameTypeDescription

name stringname of the statistical test
TestStat numerictest statistic computed from the data
pvalue numericp-value (probability value)
pstd numericp-value in standard deviations
plog numericnatural logarithm of the p-value
CountMatrix array(integer)count matrix, (optional, e.g. ChiSquare)
Methods print, Rand, select, string, Table, type
Synopsis A TestStatResult holds a result of a statistical test. It is normally generated by the StatTest function. The pvalue depends on the test, and in general it is the probability that such a result is obtained by chance. Extreme values (very close to 0 or very close to 1) are hence very rare. The pstd value measures the pvalue too. It is the number of standard deviations away that the pvalue would be if it were a normally distributed variable. It is useful to measure very extreme probabilities, where the p-values may be out of precision. For extremely small values of the p-value, the selector plog may be more practical, it records the natural logarithm of the p-value. For the ChiSquare test the count matrix is returned as the fifth field and is associated with the selector CountMatrix.

Besides the first four fields and the CountMatrix, the structure can hold any number of additional arguments, which are test-dependent. These extra arguments are typically of the form string=anything. TestStatResult prints nicely via the print method. Any symbol of type string=anything will be printed using the format (%s = %a). Any occurrences of _ in the string will be replaced by a space. An example for this is Degrees_of_freedom=x in the ChiSquare test.

See also StatTest