public static function CDF($a, $b, $x) { if ($x < $a) { return 0; } if ($x >= $b) { return 1; } return ($x - $a) / ($b - $a); }