ttest_p()

Read(1217) Label: numeric, binary,

Description:

Calculate t-test’s p-value.

Syntax:

ttest_p(A, B)

Remark:

The external library function (See External Library Guide) calculates a t-test’s p-value based on numeric target A and binary variable B, or binary target A and numeric variable B.

Parameter:

A

A sequence of numeric targets or binary targets

B

A sequence of binary variables or numeric variables

Return value:

A double-precision number

Example:

 

A

 

1

[1,2,3,4,5,6,7,8,9,10]

Numeric variables.

2

[1,0,1,1,1,0,0,1,0,1]

Binary variables.

3

=ttest_p(A1,A2)

4

=ttest_p(A2,A1)