\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)
Consider the function \(f(x) = \frac{1}{2}\), defined on the interval \([0, 2]\).
Verify that \(f(x)\) is a probability density function on the interval \([0, 2]\).\FieldText{1}{From the graph, \(f(x) \geqslant 0\) for all \(0 \leqslant x \leqslant 2\). $$\begin{aligned}[t] \int_{0}^{2} f(x)\; \mathrm d x&=\int_{0}^{2} \frac{1}{2} \; \mathrm d x\\&=\frac{1}{2} \left[x\right]_{0}^{2}\\&= \frac{1}{2} \left[2 - 0\right]\\&= \frac{1}{2} \cdot 2\\&= 1\\\end{aligned}$$ So \(f\) is a probability density function on the interval \([0, 2]\).}