ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Confidence.php
Go to the documentation of this file.
1<?php
2
4
7
9{
21 public static function CONFIDENCE($alpha, $stdDev, $size)
22 {
23 $alpha = Functions::flattenSingleValue($alpha);
24 $stdDev = Functions::flattenSingleValue($stdDev);
26
27 try {
31 } catch (Exception $e) {
32 return $e->getMessage();
33 }
34
35 if (($alpha <= 0) || ($alpha >= 1) || ($stdDev <= 0) || ($size < 1)) {
36 return Functions::NAN();
37 }
38
39 return Distributions\StandardNormal::inverse(1 - $alpha / 2) * $stdDev / sqrt($size);
40 }
41}
$size
Definition: RandomTest.php:84
An exception for terminatinating execution or to throw for unit testing.
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
Definition: Functions.php:649
static CONFIDENCE($alpha, $stdDev, $size)
CONFIDENCE.
Definition: Confidence.php:21