GROUPTTEST

Syntax

GROUPTTEST(<integer, big integer, or string>;<number>)

Description

The Student's t-test compares the means of two samples (or treatments), even if they have a different numbers of replicates. It is used to determine if sets of data are significantly different from each other.

It compares the actual difference between two means in relation to the variation in the data (expressed as the standard deviation of the difference between the means). It allows a statement about the significance of the difference between the two means of the two samples, at a certain significance level (usually alpha=0.05).

The function returns a JSON object with the calculated t-value, the degrees of freedom, the p-value, and a statement if the difference is significant or not.

This is an aggregate function. 

Example

Example input sheet could be:

ExperimentSample_IDValue
Ax520
Ax460
Ax500
Ax470
Ay230
Ay270
Ay280
Ay250

First, create a group using the GROUPBY function. In this example, the group is the Experiment column.

GROUPBY(#input!Experiment)
Experiment
A

Next, use the GROUPTTEST function. The function arguments are:

  • Sample ID column
  • Value column
  • Significance level constant (optional)
GROUPTTEST(#input!Sample_ID;#input!Value;0.05)

Result:

ExperimentGROUPTTEST returns
A{"t-value":13.010765,"d.f.":5.73882,"p-value":1.8E-5,"isSignificant":true}

The function did the computations to get the t-value of 13 and looked up the tabulated t-value for 6 degrees of freedom. The t-value for p=0.05 is 2.45. Since 13 exceeds 2.45 the function returns "true" for significance.