| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function pdf(float $value) |
||
| 37 | { |
||
| 38 | // Calculate the probability density by use of normal/Gaussian distribution |
||
| 39 | // Ref: https://en.wikipedia.org/wiki/Normal_distribution |
||
| 40 | $std2 = $this->std ** 2; |
||
| 41 | $mean = $this->mean; |
||
| 42 | return exp(- (($value - $mean) ** 2) / (2 * $std2)) / sqrt(2 * $std2 * pi()); |
||
| 43 | } |
||
| 44 | |||
| 61 |