[Math] A random variable $X$ uniformly distributed over the interval $[0, 2\pi]$

probabilityprobability distributionsrandom variablesuniform distribution

A random variable $X$ distributed over the interval $[0, 2\pi]$

a) the pdf of $X$

b) the cdf of $X$

c) $P(\frac{\pi}{6} \leq X \leq \frac{\pi}{2})$

d) $P(-\frac{\pi}{6} \leq X \leq \frac{\pi}{2})$

my answers:

a) pdf of $X$ is $f(x) = \begin{cases}\frac{1}{2\pi},& 0 \leq x \leq 2\pi, \\
0, & \text{otherwise.}\end{cases}$

b) cdf of $X$ is $F(x) = \begin{cases}0,& x < 0, \\ \frac{x}{2\pi}, &0 \leq x \leq 2\pi, \\ 1,& x > 2\pi.\end{cases}$

c) For this one, do i just do $F(\frac{\pi}{6}) – F(\frac{\pi}{2})$ ?

d) and for this question, it looks like I have to do something else? because it's asking for the probability between
$F(-\frac{\pi}{6})$ and $F(\frac{\pi}{2}) $ but when $x < 0,$ the probability should be $0$ as well? Not sure if i'm looking at this the wrong way.

could someone also kindly explain to me why in a CDF, the probability is always $0$ when $x$ less than the start of the interval but when it's greater than the interval, the probability is always 1? I don't know if it's a coincidence or if i didn't properly understand a CDF but every CDF I've seen so far has it so that the probability is 1 when x is greater than the end of the interval.

Best Answer

If $F$ is the CDF of a random variable then $F(x)$ stands for the probability that $X$ will not exceed $x$, i.e. $F(x)=P(X\leq x)$. If $X$ is distributed over interval $[a,b]$ then it will only take values in $[a,b]$ so that for every $x\geq b$ it is true that $X$ will not exceed $x$. Equivalently you can say that for every $x$ with $x\geq b$ the probability that $X$ not exceeds $x$ is $1$. That explains that $F(x)=1$ if $x\geq b$. If $x\leq a$ then the probability $X$ will not exceed $x$ is $0$. That explains that $F(x)=0$ if $x \leq a$.

a) and b) are okay.

If $A\subseteq B$ then $A=B\cup\left(A/B\right)$ and based on the fact that $B$ and $A/B$ are disjoint we conclude $P\left(A\right)=P\left(B\right)+P\left(A/B\right)$ or equivalently $P\left(A/B\right)=P\left(A\right)-P\left(B\right)$.

This can be applied in c) on the sets $A=\left\{ X\leq\frac{\pi}{2}\right\} $ and $B=\left\{ X\leq\frac{\pi}{6}\right\} \subseteq A$ and in d) on the sets $A=\left\{ X\leq\frac{\pi}{2}\right\} $ and $B=\left\{ X\leq-\frac{\pi}{6}\right\} \subseteq A$ .

In c) it leads to $P\left(\frac{\pi}{6}\leq X\leq\frac{\pi}{2}\right)=P\left(X\leq\frac{\pi}{2}\right)-P\left(X<\frac{\pi}{6}\right)$. Here $P\left(X\leq\frac{\pi}{2}\right)=F\left(\frac{\pi}{2}\right)$ by definition and $P\left(X<\frac{\pi}{6}\right)=\lim_{z\rightarrow\frac{\pi}{6}-}P\left(X\leq z\right)=\lim_{z\rightarrow\frac{\pi}{6}-}F\left(z\right)=F\left(\frac{\pi}{6}\right)$ where the last equality is a consequence of the fact that in this case CDF $F$ is continuous.

So our final result is: $$P\left(\frac{\pi}{6}\leq X\leq\frac{\pi}{2}\right)=F\left(\frac{\pi}{2}\right)-F\left(\frac{\pi}{6}\right)$$ Likewise we will find: $$P\left(-\frac{\pi}{6}\leq X\leq\frac{\pi}{2}\right)=F\left(\frac{\pi}{2}\right)-F\left(-\frac{\pi}{6}\right)$$

Since you allready determined $F$ in b) you can find these values by substituting.