Skip to main content Skip to complementary content

TTest_dif - script and chart function

TTest_dif() is a numeric function that returns the aggregated student's t-test mean difference for two independent series of values.

This function applies to independent samples student's t-tests.

If the function is used in the load script, the values are iterated over a number of records as defined by a group by clause.

If the function is used in a chart expression, the values are iterated over the chart dimensions.

Syntax:  

TTest_dif (grp, value [, eq_var] )

Return data type: numeric

Arguments:  

  • value: The sample values to be evaluated. The sample values must be logically grouped as specified by exactly two values in group. If a field name for the sample values is not provided in the load script, the field will automatically be named Value.
  • grp: The field containing the names of each of the two sample groups. If a field name for the group is not provided in the load script, the field will automatically be given the name Type.
  • eq_var: If eq_var is specified as False (0), separate variances of the two samples will be assumed. If eq_var is specified as True (1), equal variances between the samples will be assumed.

Limitations:  

Text values, NULL values and missing values in the expression value will result in the function returning NULL.

Examples:  

TTest_dif( Group, Value )

TTest_dif( Group, Value, false )

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com