Compute z-statistic for Sign test (ZScoreForSignTest)

class cerebunit.statistics.stat_scores.zSignScore.ZScoreForSignTest(*args, **kwargs)

Compute z-statistic for Sign Test.

Definitions Interpretation
\(\eta_0\) some specified value \(^{\dagger}\)
\(S^{+}\) number of values in sample \(> \eta_0\)
\(S^{-}\) number of values in sample \(< \eta_0\)
\(n_u\) number of values in sample \(\neq \eta_0\), i.e., \(S^{+} + S^{-}\)
z-statistic, z z = \(\frac{ S^{+} - \frac{n_u}{2} }{ \sqrt{\frac{n_u}{4}} }\)

\(^{\dagger} \eta_0\), null value is

  • the model prediction for one sample testing
  • 0 for testing with paired data (observation - prediction)

Use Case:

x = ZScoreForSignTest.compute( observation, prediction )
score = ZScoreForSignTest(x)

Note: As part of the SciUnit framework this custom TScore should have the following methods,

  • compute() (class method)
  • sort_key() (property)
  • __str__()
classmethod compute(observation, prediction)
Argument Value type
first argument dictionary; observation/experimental data
second argument floating number or array

Note:

  • observation must have the key “raw_data” whose value is the list of numbers