0

I asked a very similar question: Prove that $E([c-U]) = c-1$. There, I had missed a simple trick. But then, I've been trying to extend it to $E([c-xU])$ and haven't been able to put a wrap on it with the same approach. Here, $c$ and $x$ are real scalars and $U$ is a uniform random number between $0$ and $1$.


My attempt

Let:

$$c=n+u_1$$ $$x=m+u_2$$

We know that the smallest value $[c-xU]$ can take is $(n-m-1)$ and the largest value it can take is $n$.

In general we get:

$$[c-xU] = n-m+i $$ When $$(n-m)+i < c-xU<(n-m)+i+1$$ $$=> \frac{m+u_1-i-1}{x} < U < \frac{m+u_1-i}{x}$$ $$\forall \;\; i \in {-1,0,1,\dots m}$$

At first glance, each of those intervals is of length $\frac{1}{x}$. So, the probability of $U$ falling into each of them should also be $\frac{1}{x}$.

However, this misses the possibility that either end of an interval might be $<0$ or $>1$. This can make the probability of $U$ falling into the interval $0$ or less than $\frac{1}{x}$.

For instance, when $m=1$ and $u_2=0$, (meaning $x=1$); we get to the simpler version of the problem linked in the question with two intervals of sizes $u_1$ and $1-u_1$.

In particular, we get that when $i<u_1-u_2$, the start of the interval must be $0$ and when $i>m+u_1-1$, the end of the interval must be $1$. But, I can't wrap this up into a nice expression for the overall summation.

This has been the thorn in my side, haven't been able to properly account for these shrinking intervals and come up with a final closed-form expression.

Rohit Pandey
  • 6,803

1 Answers1

1

We can express $c$ as $ax$ for some $a$. So we study the random variable $Z=(a-U)x\in[(a-1)x,ax]$ (which is uniform with range $x$).

Consider $n_0<(a-1)x<n_1<n_2<...<n_k<ax$ for some consecutive integers $n_j$. Then $$\mathbb{E}[\textrm{floor}((a-U)x)]=n_0P(Z\in [x(a-1),n_1])+\sum_{j=1}^{k-1}n_jP(Z \in [n_j,n_{j+1}))+n_kP(Z\in[n_k,ax])=$$ $$=n_0\frac{n_1-x(a-1)}{x}+\sum_{j=1}^{k-1}n_j\frac{(n_{j+1}-n_j)}{x}+n_k\frac{(ax-n_k)}{x}$$ If $x=1$ and $n_0=n<c-1<n_1=n+1<c$ this reduces to the particular case: $$\mathbb{E}[\textrm{floor}(c-U)]=n(n+1-c+1)+(n+1)(c-n-1)=$$ $$=(n^2+n-nc+n)+nc-n^2-n+c-n-1=c-1$$ I think this works. I will let you work out more details.

Snoop
  • 15,214