T-Test

A Callable for performing T-Test on two columns and returning its results.

Definition

class controller.callable.transformer.TTest(self, column1: str, column2: str, output_names: list[str], output_list: list[str])
Callable name:

t_test

Callable type:

Transformer

Parameters:
  • column1 (ColumnReference) – A column reference where the values in the column are used as the first group in the T-Test.

  • column2 (ColumnReference) – A column reference where the values in the column are used as the second group in the T-Test.

  • output_name (list[str]) – The names of the new columns containing the Callable outputs.

  • output_list (list[str]) – A list of columns to return.

Parameters

column1

A column reference where the values in the column are used as the first group in the T-Test.

Type:

ColumnReference

Required:

True

Choices:

All columns in the target DataFrame

column2

A column reference where the values in the column are used as the second group in the T-Test.

Type:

ColumnReference

Required:

True

Choices:

All columns in the target DataFrame, except the column selected in column1

output_name

The names of the new columns containing the Callable outputs.

Type:

list[str]

Required:

True

  • output_name[0] stores the t-statistic.

  • output_name[1] stores the p-value.

output_list

A list of columns to return.

Type:

list[str]

Required:

True

Choices:

All columns in the target DataFrame, plus the new columns created by this Callable

Output

A DataFrame is returned where it contains all columns specified in the output_list, potentially including new columns with the names <callable_id>.<output_names>.

Example configuration

{
    "name": "foo",
    "callable": "t_test",
    "params": {
        "column1": "$get_assignment1_submissions.submission.score",
        "column2": "$get_assignment2_submissions.submission.score",
        "output_name": [
            "ttest_t_statistic",
            "ttest_p_value"
        ]
        "output_list": [
            "get_assignment1_submissions.submission.score",
            "get_assignment2_submissions.submission.score",
            "foo.ttest_p_value"
        ]
    }
}