public function cdf(int $k): float
    {
        $a = $this->a;
        $b = $this->b;

        if ($k < $a) {
            return 0;
        }
        if ($k > $b) {
            return 1;
        }

        $n = $b - $a + 1;

        return ($k - $a + 1) / $n;
    }