### Question:
ZScores { public static double zToP(double z) { double p; if (z > 0) { p = NORM_DIST.cumulative(-z); } else { p = NORM_DIST.cumulative(z); } if (p > 0.5) { p = 1 - p; } p *= 2.0d; return p; }  static double zToR(double z, int n); static double getWeightedZ(float[] zScores, int[] sampleSizes); static double getWeightedZ(double[] zScores, int[] sampleSizes); static double getWeightedZ(float[] zScores, int[] sampleSizes, double[] weights); static double getDatasetSizeWeightedZ(float[] zScores, int[] sampleSizes, double[] weights); static double getWeightedZ(double[] zScores, int[] sampleSizes, double[] weights); static double zToP(double z); static double pToZ(double p); static double pToZTwoTailed(double p); static double correlationToZ(double correlation, int nrSamples, StudentT tDist); static double correlationToP(double correlation, int nrSamples, StudentT tDist); static double zScoreToCorrelation(double obsZ, int nrSamples); static double extrapolateZScore(int originalSampleSize, int newSampleSize, double originalZ); static double betaToZ(double b, double se, double n); static double[] zToBeta(double z, double maf, int n);  }### Answer:
@Test public void testZToP() { assertEquals(ZScores.zToP(10), 1.523971e-23, 0.00000001); assertEquals(ZScores.zToP(-10), 1.523971e-23, 0.00000001); assertEquals(ZScores.zToP(0), 1, 0.00000001); assertEquals(ZScores.zToP(2), 0.04550026, 0.00000001); assertEquals(ZScores.zToP(-2), 0.04550026, 0.00000001); }