1 | <?php |
||
7 | class Gaussian |
||
8 | { |
||
9 | /** |
||
10 | * @var float |
||
11 | */ |
||
12 | protected $mean; |
||
13 | |||
14 | /** |
||
15 | * @var float |
||
16 | */ |
||
17 | protected $std; |
||
18 | |||
19 | /** |
||
20 | * @param float $mean |
||
21 | * @param float $std |
||
22 | */ |
||
23 | public function __construct(float $mean, float $std) |
||
28 | |||
29 | /** |
||
30 | * Returns probability density of the given <i>$value</i> |
||
31 | * |
||
32 | * @param float $value |
||
33 | * |
||
34 | * @return type |
||
35 | */ |
||
36 | public function pdf(float $value) |
||
44 | |||
45 | /** |
||
46 | * Returns probability density value of the given <i>$value</i> based on |
||
47 | * given standard deviation and the mean |
||
48 | * |
||
49 | * @param float $mean |
||
50 | * @param float $std |
||
51 | * @param float $value |
||
52 | * |
||
53 | * @return float |
||
54 | */ |
||
55 | public static function distributionPdf(float $mean, float $std, float $value) |
||
60 | } |
||
61 |