# smoothing the CDF of discrete random variable

Let $X$ be a (discrete) random variable with mass point $x_i$ and probabilities $p_i$, i.e., $Pr(X=x_i)=p_i$. Let $F_X(x)=Pr(X \leq x)$ denote the CDF of $X$. Suppose $F_X(0)=0$ and $F_X(1)=1$, that is: $X\in[0,1]$.

I want to defined a smoothed version of $X$ where the CDF $F_{\tilde{X}}$ of $\tilde{X}$ is equal to that of $X$ at the points $x_i$ and 0 and 1, but the function $F_{\tilde{X}}$ is piecewise linear, that is, the value of $F_{\tilde{X}}$ at any point other than $x_i$ is linear interpolation between the given points.

The quastion is, do you see a nice way to describe the $F_{\tilde{X}}$ in terms of $F_X$.

In general the piecewise linear interpolant of a set of points $(x_i,y_i)$ (sorted so that $x_i$ is increasing) is given by
$$f(x)=\frac{(x-x_i)y_{i+1}+(x_{i+1}-x)y_i}{x_{i+1}-x_i}$$
for $x$ between $x_i$ and $x_{i+1}$. So
$$F_{\tilde{X}}(x)=\frac{(x-x_i)F_X(x_{i+1})+(x_{i+1}-x)F_X(x_i)}{x_{i+1}-x_i}$$
for $x$ between $x_i$ and $x_{i+1}$. You won't get any nicer representation than that unless $x_i$ are in some nice form, like uniformly spaced.