Let $\alpha \in (\frac14,\frac12)$ is some constant.
Consider a random variable $X$ with PDF:
$$P(X=s) =\begin{cases}4 &if\ s< \frac12-\alpha\\ 2 & if\ \frac12 -\alpha < s \leq \alpha \\ 0&if\ s>\alpha \end{cases} $$
I wish to find the CDF, $F$
Can someone
- confirm I wrote the integrals correctly (specifically, the variable of integration?),
- that the CDF is correct,
- whether the CDF is differentiable?
My attempt:
For $s< \frac12-a$, $$F(s) = \int_0^s 4 dX = 4s $$ For $\frac12 -a \leq s \leq \alpha$, $$ F(s) = \int_0^{\frac12 -\alpha} 4 dX+ \int_{\frac12-\alpha}^s 2dX =2-4\alpha+ 2s - 2(\frac12-\alpha)=2-4\alpha-1+2\alpha + 2s \\= 1-2\alpha + 2s $$
So the CDF $F$ is, for given $\alpha\in (\frac14,\frac12)$, $$ F(s) = \begin{cases}4s &if\ s< \frac12-\alpha\\ 1-2\alpha + 2s &if\ \frac12-\alpha<s\leq \alpha\end{cases} $$
I believe that it is kinked at $s=\frac12-\alpha$ (the slope changes from (4) to (2)), so it is not differentiable? (but it is continuous)
(More background: Suppose we have a random variable, $Z$, and we define another random variable $X\equiv d(Z,y)$. Note that $Z,y$ are such that $0\leq d(Z,y)\leq \alpha$, where $\alpha \in (\frac14,\frac12)$ is some constant.)
The choice of the integration variable doesn't really matter, but $X$ (capitalized) is a bit of a weird choice. It's more common to use $x$ if the random variable is denoted by $X$.
Other than that it looks OK, though I didn't check the details. The only thing is that technically $F$ should be defined on all of $\mathbb{R}$, so you should have two more cases (one for $s<0$ and one for $s>\alpha$). These cases are trivial to write down but still important.