Uniform distribution with an atom at zero (source code)

= Uniform distribution with an atom at zero
{title2=$\mathcal L(S)=(1-q)\delta_0+q\operatorname{Unif}(0,r)$}

For $0\leq q\leq1$ and $r>0$, this <mixed probability distribution> has <probability mass> $1-q$ at zero and ordinary <probability density function> $q/r$ on $(0,r)$. That ordinary density integrates to $q$, not to one; conditioned on $S>0$, the law is the <uniform distribution> on $(0,r)$. Its <cumulative distribution function> is zero for $s<0$, $1-q+qs/r$ for $0\leq s<r$, and one for $s\geq r$.

For each positive integer $k$, integration gives $\mathbb E[S^k]=qr^k/(k+1)$. Thus the <expected value> is $qr/2$ and the <variance> is $qr^2/3-q^2r^2/4$. The nonzero atom contributes to normalization even though it contributes zero to positive moments. At $q=0$, conditioning on positive delay is undefined because the conditioning event has probability zero.