下列函数为随机变量分布密度的是
A. $p(x)= \begin{cases}\sin x, & 0 < x < \frac{\pi}{2} \\ 0, & \text { 其它 }\end{cases}$
B. $p(x)= \begin{cases}\sin x, & 0 < x < \frac{3 \pi}{2} \\ 0, & \text { 其它 }\end{cases}$
C. $p(x)=\left\{\begin{array}{lc}\sin x, & 0 < x < \pi \\ 0, & \text { 其它 }\end{array}\right.$
D. $p(x)= \begin{cases}\sin x, & 0 < x < 2 \pi \\ 0, & \text { 其它 }\end{cases}$