SciPy

scipy.stats.mstats.pointbiserialr

scipy.stats.mstats.pointbiserialr(x, y)[source]

Calculates a point biserial correlation coefficient and its p-value.

Parameters:
x : array_like of bools

Input array.

y : array_like

Input array.

Returns:
correlation : float

R value

pvalue : float

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.

For more details on pointbiserialr, see stats.pointbiserialr.