# A random variable $x$ has a probability density function $f(x) = \left\{ \begin{array}{l l} k & \quad \text{0<x<2n}\\ 0 & \quad \text{elsewhere} \end{array} \right.$ Find $p(\large\frac{\pi}{2}<x<\frac{3\pi}{2})$

Toolbox:
• The probability density function (continuous probability function $f(x)$ satisfies the following properties :
• (i) $P(a\leq x\leq b)=\int_a^b f(x) dx$
• (ii) $f(x)$ is non-negative for all real $x$
• (iii) $\int_{-\infty}^\infty f(x) dx=1$
• Also $P(x=a)=0$
• $P(a\leq x\leq b)=P(a\leq x\leq b)$=P(a < x < b)
Step 1:
$\int_{-\infty}^{\infty} f(x) dx=1$
$\int_0^{2\pi} kdx=1$
Since $f(x)=0$ elsewhere
$\therefore kx\bigg]_0^{2\pi}=1$
$2\pi k=1$
$k=\large\frac{1}{2\pi}$
Step 2:
$P(\large\frac{\pi}{2}$$< x <\large\frac{3\pi}{2})=\int_{\Large\frac{\pi}{2}}^{\Large\frac{3\pi}{2}}$$f(x)dx$
$\qquad\qquad\;\;\;\;\;\;=\int_{\Large\frac{\pi}{2}}^{\Large\frac{3\pi}{2}}\large\frac{dx}{2\pi}$
$\qquad\qquad\;\;\;\;\;\;=\large\frac{x}{2\pi}\bigg]_{\Large\frac{\pi}{2}}^{\Large\frac{3\pi}{2}}$
$\qquad\qquad\;\;\;\;\;\;=\large\frac{3\pi}{4\pi}-\frac{\pi}{4\pi}$
$\qquad\qquad\;\;\;\;\;\;=\large\frac{2\pi}{4\pi}$
$\qquad\qquad\;\;\;\;\;\;=\large\frac{1}{2}$