Changed the theta calculation for npMeanUnpaired, working now (though
slow). Output alternative d for debugging.