I have a uniform random variable $\theta \in [-\pi,+\pi]$. I also have a bernoulli function of this random variable $G(\theta)$, defined as follows,
\begin{align} \begin{cases} 1 & \text{if $ - x\leq \theta \leq x$};\\ c & \text{OW}.\end{cases} \end{align}
Does anyone know what the distribution of $G(\theta)$ is?
The distribution of $G(\theta)$ is given by $$ \begin{align*} \Pr[G(\theta)=1] &= \Pr[-x \leq \theta \leq x] \\ \Pr[G(\theta)=c] &= 1-\Pr[-x \leq \theta \leq x] \end{align*} $$ I hope that you can calculate $\Pr[-x \leq \theta \leq x]$ on your own.