documentation of p-value calculation