A goodness-of-fit test for the bivariate necessary-but-not-sufficient relationship