Português

Point-biserial correlation

Association and correlation · reference distribution: t(n−2)

When to use it

Measure the relationship between a binary and a quantitative variable; it is equivalent to the two-sample t-test.

Null hypothesis

There is no correlation.

Assumptions

Test statistic

r_{pb} = \dfrac{\bar{x}_1 - \bar{x}_0}{s_n} \sqrt{\dfrac{n_1 n_0}{n^2}}, \qquad s_n = \sqrt{\tfrac{1}{n} \textstyle\sum (x_i - \bar{x})^2}

Effect size

r_pb itself.

How to report it

r_pb(38) = .33, p = .038

In R and Python

R
cor.test(y, as.numeric(group == "B"))
Python
stats.pointbiserialr(binary, y)

In Python, stats is scipy.stats and np is numpy.

Variants and alternatives

Where it sits in the catalog

Association and correlation. Instead of comparing groups, they measure whether two variables move together, and how strongly.

In the decision tree

  1. What do you want to do? Measure the relationship between two variables
  2. What kind of variables are they? One binary and one numeric

Open the decision tree