scipy.stats.mstats.pointbiserialr

scipy.stats.mstats.pointbiserialr(x, y)
Calculates a point biserial correlation coefficient and the associated

p-value.

The point biserial correlation is used to measure the relationship between a binary variable, x, and a continuous variable, y. Like other correlation coefficients, this one varies between -1 and +1 with 0 implying no correlation. Correlations of -1 or +1 imply a determinative relationship.

Parameters:

x : array of bools

y : array of floats

Returns:

(point-biserial r, :

2-tailed p-value)

Notes

Missing values are considered pair-wise: if a value is missing in x, the corresponding value in y is masked.