@@ -69,6 +69,9 @@ discard block |
||
| 69 | 69 | ); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + /** |
|
| 73 | + * @param NumberInterface $standardDev |
|
| 74 | + */ |
|
| 72 | 75 | public function SDToValue($standardDev) |
| 73 | 76 | {
|
| 74 | 77 | $standardDev = Numbers::makeOrDont($this->numberType, $standardDev); |
@@ -85,6 +88,9 @@ discard block |
||
| 85 | 88 | return $this->PDFByValue($value); |
| 86 | 89 | } |
| 87 | 90 | |
| 91 | + /** |
|
| 92 | + * @param NumberInterface $value |
|
| 93 | + */ |
|
| 88 | 94 | public function PDFByValue($value) |
| 89 | 95 | {
|
| 90 | 96 | $value = Numbers::makeOrDont($this->numberType, $value); |
@@ -19,6 +19,10 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | private $sd; |
| 21 | 21 | |
| 22 | + /** |
|
| 23 | + * @param NumberInterface $mean |
|
| 24 | + * @param NumberInterface $sd |
|
| 25 | + */ |
|
| 22 | 26 | public function __construct($mean, $sd) |
| 23 | 27 | {
|
| 24 | 28 | $mean = Numbers::makeOrDont(Numbers::IMMUTABLE, $mean); |
@@ -56,6 +56,9 @@ discard block |
||
| 56 | 56 | return $one->subtract($p); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param NumberInterface $x |
|
| 61 | + */ |
|
| 59 | 62 | public static function gaussErrorFunction($x) |
| 60 | 63 | { |
| 61 | 64 | |
@@ -68,14 +71,26 @@ discard block |
||
| 68 | 71 | $answer = $answer->multiply( |
| 69 | 72 | SeriesProvider::maclaurinSeries( |
| 70 | 73 | $x, |
| 74 | + |
|
| 75 | + /** |
|
| 76 | + * @param NumberInterface $n |
|
| 77 | + */ |
|
| 71 | 78 | function ($n) { |
| 72 | 79 | $negOne = Numbers::make(Numbers::IMMUTABLE, -1); |
| 73 | 80 | |
| 74 | 81 | return $negOne->pow($n); |
| 75 | 82 | }, |
| 83 | + |
|
| 84 | + /** |
|
| 85 | + * @param NumberInterface $n |
|
| 86 | + */ |
|
| 76 | 87 | function ($n) { |
| 77 | 88 | return SequenceProvider::nthOddNumber($n); |
| 78 | 89 | }, |
| 90 | + |
|
| 91 | + /** |
|
| 92 | + * @param NumberInterface $n |
|
| 93 | + */ |
|
| 79 | 94 | function ($n) { |
| 80 | 95 | $n = Numbers::makeOrDont(Numbers::IMMUTABLE, $n); |
| 81 | 96 | |
@@ -88,6 +103,9 @@ discard block |
||
| 88 | 103 | |
| 89 | 104 | } |
| 90 | 105 | |
| 106 | + /** |
|
| 107 | + * @param NumberInterface $p |
|
| 108 | + */ |
|
| 91 | 109 | public static function inverseNormalCDF($p, $precision = 10) |
| 92 | 110 | { |
| 93 | 111 | $pi = Numbers::makePi(); |
@@ -23,6 +23,9 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | private $denominator; |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param string $numerator |
|
| 28 | + */ |
|
| 26 | 29 | public function __construct($numerator, $denominator, $precision = null, $base = 10) |
| 27 | 30 | { |
| 28 | 31 | |
@@ -11,6 +11,10 @@ |
||
| 11 | 11 | |
| 12 | 12 | use SphericalCoordinateTrait; |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @param double $theta |
|
| 16 | + * @param double $phi |
|
| 17 | + */ |
|
| 14 | 18 | public function __construct($theta, $phi, $rho) |
| 15 | 19 | { |
| 16 | 20 | $this->theta = Numbers::makeOrDont(Numbers::IMMUTABLE, $theta); |