Let $T\sim~U[-t_0,t_0]$. Then I define random variable $R$ as the following
$\mathbb{P}\{R=t|T=t\}=\beta$ and $\mathbb{P}\{R\neq t|T=t\}=1-\beta$.
My first question is: Why we can write the conditional density as
$f(R=r|T=t)=(1-\beta)+\beta\delta(t-r)$, or actually, we should write is as $f(R=r|T=t)=\frac{1-\beta}{2t_0}+\beta\delta(t-r)$???
where $\delta(\cdot)$ is the Dirac Delta function such that $\int_{-\infty}^\infty\delta(x)=1$ and $\delta(x)=0$ if $x\neq 0$ and $\delta(x)=\infty$ if $x=0$?
I understand that if $t\neq r$, then $f(R=r|T=t)=1-\beta$, which looks the same as $\mathbb{P}\{R\neq t|T=t\}=1-\beta$. But if $r=t$, then how $f(R=r|T=t)=(1-\beta)+\beta\delta(t-r)$ connects to $\mathbb{P}\{R=t|T=t\}=\beta$?
My second question is: what is the marginal distribution of $R$? Should it be
\begin{equation*} \begin{aligned} f(R=r)&=\int_{-t_0}^{t_0}f(R=r|T=t)f_T(t)dt\\ &=\int_{-t_0}^{t_0}[(1-\beta)+\beta\delta(t-r)]f_T(t)dt\\ &=(1-\beta)+\beta\int_{-\infty}^{\infty}\delta(t-r)f_T(t)dt\\ &=1-\beta+\beta\frac{\mathbf{1}_{\{-t_0\leq r\leq t_0\}}}{2t_0}?? \end{aligned} \end{equation*} Is the last step correct? I use the property $\int_{-\infty}^{\infty}f(t)\delta(t-T)dt=f(T)$.
What is the support of $R$ is? In the above density, it seems that if we integrate over $[-\infty,\infty]$, then the integral of $f_R(r)$ won't be one. So it is not a valid density function?
I did a simulation study
Generate $M$ i.i.d. $U[-2,2]$ $T_i$
For each $T_i$, generate one $U[0,1]$, if it is less than $\beta=0.6$, then set $R_i=T_i$, otherwise, set $R_i=U[-z_0,z_0]$.
Plot the density of $R_i$, it is indeed $f_R(r)=\frac{1}{2t_0}=0.25$. And this density is independent of $\beta$.
So this means, my above derivation is wrong??