This topic describes the One Sample T Test component provided by Machine Learning Designer. The One Sample T Test component is used to determine whether a significant difference exists between the overall mean of a variable and a specific value. The sample on which you want to perform a T test must follow a normal distribution.
Configure the component
You can use one of the following methods to configure the One Sample T Test component:
Method 1: Configure the component in Machine Learning Designer
Configure the component on the pipeline configuration tab of Machine Learning Designer in the Machine Learning Platform for AI console. The following table describes the parameters that are used to configure the component.
Tab | Parameter | Description |
---|---|---|
Fields Setting | Sample 1 Column | The column that contains Sample 1. |
Parameters Setting | Alternative Hypothesis Type | The alternative hypothesis type. |
Confidence Level | The confidence level of the test results. | |
Hypothesized Mean | The hypothesized mean. | |
Variances of Two Populations Are Equal | Specifies whether the variances of two populations are equal. Valid values: Yes and No. | |
Core number | The number of cores. The value must be a positive integer. | |
Memory Size per Core | The memory size of each core. Valid values: 1 to 65536. Unit: MB. |
Method 2: Run Machine Learning Platform for AI commands
Configure the component parameters by running a Machine Learning Platform for AI command. You can use the SQL Script component to run Machine Learning Platform for AI commands. For more information, see SQL Script. The following table describes the parameters of the command.
pai -name t_test -project algo_public
-DxTableName=pai_t_test_all_type
-DxColName=col1_double
-DoutputTableName=pai_t_test_out
-DxTablePartitions=ds=2010/dt=1
-Dalternative=less
-Dmu=47
-DconfidenceLevel=0.95
Parameter | Required | Description | Default value |
---|---|---|---|
xTableName | Yes | The name of the input table. | None |
xColName | Yes | The column that you want to select from the input table for testing. | None |
outputTableName | Yes | The name of the output table. | None |
xTablePartitions | No | The partitions that you want to select from the input table. | Null |
alternative | No | The alternative hypothesis type. Valid values: two.sided, less, and greater. | two.sided |
mu | No | The hypothesized mean. | 0 |
confidenceLevel | No | The confidence level. Valid values: 0.8, 0.9, 0.95, 0.99, 0.995, and 0.999. | 0.95 |
Output description
The output table is in the JSON format and contains only one row and one column.
{
"AlternativeHypthesis": "mean not equals to 0",
"ConfidenceInterval": "(44.72234194006504, 46.27765805993496)",
"ConfidenceLevel": 0.95,
"alpha": 0.05,
"df": 99,
"mean": 45.5,
"p": 0,
"stdDeviation": 3.919647479510927,
"t": 116.081867662439
}