stats.t_test

Student's t-test on a numeric column — one-sample against a fixed mean, or two-sample comparing the column across the two levels of a grouping column.

  • Kind: standard
  • Network: no

Inputs🔗

NameTypeDescription
datafile (CSV)Input table containing the value and (optional) grouping columns.
value_columnstringName of the numeric column to test.
group_columnstringOptional grouping column with exactly two levels. If provided, a two-sample t-test is run; if empty, a one-sample test against mu is run.
munumberNull-hypothesis mean for the one-sample test. Defaults to 0. Ignored when group_column is set.
alternativestringAlternative hypothesis - one of "two.sided", "less", "greater". Defaults to "two.sided".
pairedbooleanWhether to run a paired two-sample test. Requires equal-length groups. Defaults to false.
conf_levelnumberConfidence level for the reported interval. Defaults to 0.95.

Outputs🔗

NameTypeDescription
resultjsonTest results - statistic, degrees of freedom, p-value, confidence interval, estimate(s), and the test parameters used.

Example🔗

- id: 01890000-0000-0000-0000-000000000403
  name: stats.t_test
  inputs:
    - 01890000-0000-0000-0000-000000000000
  args:
    value_column: "biomass"
    group_column: "ownership"
    alternative: "two.sided"
    paired: false
    conf_level: 0.95