A standard normal table, also called the unit normal table or Z table, is a mathematical table for the values of Φ, which are the values of the cumulative distribution function of the normal distribution. It is used to find the probability that a statistic is observed below, above, or between values on the standard normal distribution, and by extension, any normal distribution. Since probability tables cannot be printed for every normal distribution, as there are an infinite variety of normal distributions, it is common practice to convert a normal to a standard normal and then use the standard normal table to find probabilities. https://en.wikipedia.org/wiki/Standard_normal_table This table is provided only for completeness. It is common for statistics textbooks to include this table, so this library does as well. It is better to use the standard normal distribution CDF function when a Z score is required.
Example #1
0
 /**
  * Confidence interval
  * Finds CI given a sample mean, sample size, and standard deviation.
  * Uses Z score.
  * https://en.wikipedia.org/wiki/Confidence_interval
  *          σ
  * ci = z* --
  *         √n
  *
  * interval = (μ - ci, μ + ci)
  *
  * Available confidence levels: See Probability\StandardNormalTable::Z_SCORES_FOR_CONFIDENCE_INTERVALS
  *
  * @param number $μ  sample mean
  * @param number $n  sample size
  * @param number $σ  standard deviation
  * @param string $cl confidence level (Ex: 95, 99, 99.5, 99.9, etc.)
  *
  * @return array [ ci, lower_bound, upper_bound ]
  */
 public static function confidenceInterval($μ, $n, $σ, string $cl) : array
 {
     $z = Table\StandardNormal::getZScoreForConfidenceInterval($cl);
     $ci = $z * ($σ / sqrt($n));
     $lower_bound = $μ - $ci;
     $upper_bound = $μ + $ci;
     return ['ci' => $ci, 'lower_bound' => $lower_bound, 'upper_bound' => $upper_bound];
 }