TTest
- class hypex.comparators.TTest(compare_by, grouping_role=None, target_role=None, baseline_role=None, reliability=0.05, key='', calc_kwargs={})[source]
Bases:
StatHypothesisTestingTwo-sample t-test for numeric targets.
Compares group means using Welch’s t-test (unequal variances assumed). Operates on raw data slices via scipy. For Spark workloads prefer the aggregated-stats variant exposed through
hypex.comparators.AggTTest.- Parameters:
compare_by (
Literal['groups','columns','columns_in_groups','cross','matched_pairs']) – Comparison mode ("groups","columns", etc.).grouping_role (
Optional[ABCRole]) – Role that identifies the group column.target_role (
Optional[ABCRole]) – Role that identifies the numeric target column(s).reliability (
float) – Significance level α (default 0.05).key (
Any) – Optional label for this test instance.