chi_p()

Description:

Calculate p-value of chi-square test.

Syntax:

chi_p (A, B)

Note:

The external library function calculates the p-value of chi-square test on binary target A and binary target B.

Parameters:

A

A sequence, which is a binary target

B

A sequence, which is a binary variable

Return value:

A double-precision number

Example:

 

A

 

1

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

A binary variable

2

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

A binary variable

3

=chi_p(A1,A2)