### Question:
ZScores { public static double pToZTwoTailed(double p) { p = p / 2; return pToZ(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 pToZTwoTailed() { assertEquals(ZScores.pToZTwoTailed(0), -40, 0.00000001); assertEquals(ZScores.pToZTwoTailed(1), 0, 0.00000001); assertEquals(ZScores.pToZTwoTailed(1.523971e-23), -10, 0.00001); assertEquals(ZScores.pToZTwoTailed(1e-308), -37.55912122001427, 0.00001); assertEquals(ZScores.pToZTwoTailed(0.04550026), -2, 0.00001); }