\[ \newcommand{\Exg}{\operatorname{\mathbb{E}}} \newcommand{\Ex}{\mathbb{E}} \newcommand{\Ind}{\mathbb{I}} \newcommand{\Var}{\operatorname{Var}} \newcommand{\Cov}{\operatorname{Cov}} \newcommand{\Corr}{\operatorname{Corr}} \newcommand{\ee}{\mathrm{e}} \]
12 Uniform and discrete
Summary:
If \(U \sim \operatorname{U}[0,1]\), then \(X = (b-a)U + a \sim \operatorname{U}[a,b]\).
A discrete random variable can be generated by splitting \([0,1]\) into subintervals with lengths according to the probabilities, then picking a point from the interval at random.
Remember that your answers to Problem Sheet 2 will be discussed in the problems class on Thursday 31 October.
Read more: Voss, An Introduction to Statistical Computing, Sections 1.2 and 1.3.