# Distribution of shifted and censored random variable

Suppose I have a non-negative random variable $$X$$ with finite mean $$\mu$$. Let's for example assume it denotes demand, and we denote by $$X(t)$$ demand in period $$t$$, demand in different periods are iid. Now suppose, you get $$q<\mu$$ units each period as part of a subscription. This reduces your demand $$X$$ by $$q$$. Intuitively one would think the remaining demand is $$Y=(X-q)^+$$.

However in certain periods, it could happen, that $$X(t)< q$$. Hence the remaining demand in $$t$$ is 0, and the demand of the next period gets reduced by $$q-X(t)$$.

Is there any way to express the distribution of $$Y$$ given the distribution of $$X$$? Or the variance? For the mean e.g. it seems obvious that the mean of $$Y$$ is $$\mu-q$$. If you have any literature to which this is similar, I would be very grateful.

What I've tried so far:

Let Z denote the green part. $$Z(t) = (Z(t-1)+q-X(t))^+$$, which is the waiting time distribution in a GI/D/1 queue. I tried to find something similar for $$Y$$>

$$K(t+1) = X(t+1)-q-(K(t))^- = X(t+1)-q-Z(t)$$

$$Y(t+1) = K(t+1)^+ = (X(t+1)-q-Z(t))^+$$

I don't now what to do next.