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
| Name | Type | Description |
|---|
data | file (CSV) | Input table containing the value and (optional) grouping columns. |
value_column | string | Name of the numeric column to test. |
group_column | string | Optional 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. |
mu | number | Null-hypothesis mean for the one-sample test. Defaults to 0. Ignored when group_column is set. |
alternative | string | Alternative hypothesis - one of "two.sided", "less", "greater". Defaults to "two.sided". |
paired | boolean | Whether to run a paired two-sample test. Requires equal-length groups. Defaults to false. |
conf_level | number | Confidence level for the reported interval. Defaults to 0.95. |
Outputs🔗
| Name | Type | Description |
|---|
result | json | Test 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