Compute one-sided or two-sided p-values from the requested reference distribution and classify significance thresholds.