https://numbas.mathcentre.ac.uk/question/12052/construct-a-probability-distribution-function-then-find-cdf-and-expectation/embed/