GROUPTTEST

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:

Experiment

Sample_ID

Value

Experiment

Sample_ID

Value

A

x

520

A

x

460

A

x

500

A

x

470

A

y

230

A

y

270

A

y

280

A

y

250

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

GROUPBY(#input!Experiment)

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:

Experiment

GROUPTTEST returns

Experiment

GROUPTTEST 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.