0

I have a sum $\sum_{i=1}^\infty Y_i$ where $Y_i=AX_i+a$ if $X_i>X_{lower}$ and $Y_i=BX_i+a$ if $X_i<X_{lower}$. Here $X_{lower}, A, a, B$ are positive constants and all $X_i$'s are i.i.d exponential random variables with parameter $\lambda$. I want to know how to find the average number of terms in the sum so that the sum is equal to or greater than some constant $C$.

I already know how to compute the average number of terms if $Y_i=KX_i+a$ where $K>0$. Hence, I have one solution in my mind which has following two steps.

1- Find the average number of terms for $Y_i=AX_i+a$ and $Y_i=BX_i+a$ cases separately.

2- If the number of terms for $Y_i=AX_i+a$ are $j_1$ and number of terms for $Y_i=BX_i+a$ are $j_2$ then the number of terms for my problem will be $$\text{number of terms}=j_1Pr(X_i>X_{lower})+j_2Pr(X_i<X_{lower}).$$

Is it the right answer? I will be very grateful for your suggestions. Thank you.

Frank Moses
  • 2,718
  • 1
    In your heuristic, it looks like you are mixing random variables and expectations. I think you want to find the average number of terms required for your sum to exceed a given limit. Wald's equation is usually used to get bounds. https://en.wikipedia.org/wiki/Wald%27s_equation – Michael Jun 14 '16 at 03:31
  • 1
    It gives bounds because usually the overshoot is hard to calculate. It is easy to calculate if you have an exponential distribution, but you have a mixture of exponentials. If I were you, I would consider the worst-case overshoot over either exp distribution 1 or exp distribution 2. – Michael Jun 14 '16 at 03:36
  • @Michael I think Wald equation may not be useful here. Actually this problem is a slight variation of the problem discussed in http://math.stackexchange.com/questions/1809136/average-number-of-terms-required-in-a-sum-of-exponential-variables-to-reach-a-sp?rq=1 – Frank Moses Jun 14 '16 at 03:40
  • 1
    You haven't responded to Michael's comment that it seems you want the sum to exceed a given limit. It makes no sense to ask for the number of terms until the sum is equal to some constant, since the probability for that is zero. – joriki Jun 14 '16 at 08:12
  • @joriki I have done it right by changing it to "equal to or greater than" – Frank Moses Jun 14 '16 at 08:15
  • 1
    The approach you suggest is incorrect, since it assume just a single decision on the type of the terms, whereas in fact the decision is taken separately for each term, and the sum contains a mixture of the two types of terms. – joriki Jun 14 '16 at 08:43
  • @MIchael I think we can get an upper bound on the number of terms using the method of http://math.stackexchange.com/questions/1809136/average-number-of-terms-required-in-a-sum-of-exponential-variables-to-reach-a-sp?rq=1 if $A<B$. In this case the average number of terms will be upper bounded by $\frac{\lambda}{A+\lambda a}e^{\frac{\lambda}{A+\lambda a}}C+1$ – Frank Moses Jun 14 '16 at 20:54
  • @FrankMoses : How do you get that? I will write up a quick Wald bound below. – Michael Jun 14 '16 at 22:08
  • By applying the methodology of http://math.stackexchange.com/questions/1809136/average-number-of-terms-required-in-a-sum-of-exponential-variables-to-reach-a-sp?rq=1 – Frank Moses Jun 14 '16 at 22:08
  • Yes, but, how do you get $\lambda/(A + \lambda a)$ from that methodology? That bound gives $\lambda e^{\lambda t}L+1$ and seems to be for a variation on the problem. – Michael Jun 14 '16 at 22:11
  • that is the parameter of the random variable $AX_i+a$. I just put this value in the equation you mentioned in your above comment and got that bound – Frank Moses Jun 14 '16 at 22:12
  • @Michael I would love to see the bound from the wald's equation – Frank Moses Jun 14 '16 at 22:15

1 Answers1

2

The Joriki method in that other link is interesting, I would have approached it differently (via Wald) and (hopefully?) that would also give an exact expression for the exponential case. For the problem at hand, a Wald-based approach is as follows:

Suppose that $\{Y_i\}_{i=1}^{\infty}$ are iid, nonnegative, and have finite expectation $E[Y]>0$. Define $N$ as the smallest time at which the sum of the $Y_i$ values meets or exceeds a positive threshold $C$, so that $\sum_{i=1}^N Y_i \geq C$. Define $$Overshoot = \sum_{i=1}^N Y_i - C$$ Then $Overshoot \geq 0$ and $$ E\left[\sum_{i=1}^N Y_i \right] = C + E[Overshoot] $$ On the other hand, we can write $\sum_{i=1}^N Y_i = \sum_{i=1}^{\infty} Y_iI_i$ for indicator functions $I_i=1\{i \leq N\}$, so the $I_i$ indicators filter out only those terms that are used. Then, by a Wald-type technique: \begin{align} E\left[\sum_{i=1}^N Y_i\right] &=E\left[\sum_{i=1}^{\infty}Y_iI_i\right]\\ &\overset{(a)}{=}\sum_{i=1}^{\infty}E\left[Y_iI_i \right]\\ &\overset{(b)}{=}\sum_{i=1}^{\infty}E[Y_i]E[I_i] \\ &=E[Y]\sum_{i=1}^{\infty}E[I_i]\\ &= E[Y]\sum_{i=1}^{\infty}P[i\leq N]\\ &\overset{(c)}{=}E[Y]E[N] \end{align} where (a) holds because we can always pass expectations through an infinite sum of non-negative random variables; (b) holds by the Wald observation that $I_i$ depends only on $Y_1, ... Y_{i-1}$ and so is independent of $Y_i$; (c) holds by the expectation identity for positive integer random variables $N$.
Equating these two different expressions for $E[\sum_{i=1}^NY_i]$ gives: $$ E[N] = \frac{C + E[Overshoot]}{E[Y]} $$ This holds for any iid and nonnegative random variables $Y_i$ with $E[Y]>0$, which includes your case. You can compute $E[Y]$ for your case. The only difficulty is computing $E[Overshoot]$. But you could perhaps bound that above and/or below considering the worst-case distribution on the last step.


Using the above technique on the problem from the previous link you gave, I get a slightly different answer (I suspect that previous answer had a minor mistake because the constant $c$ used there should have depended on time, i.e., $c(t)$). That link was:
Average number of terms required in a sum of exponential variables to reach a specific limit

There, it looks like we have $Y_i = \max[X_i-t, 0]$ for $X_i$ exponential with rate $\lambda$. So: $$ E[Y] = \int_{t}^{\infty} (x-t)\lambda e^{-\lambda x}dx = \frac{e^{-\lambda t}}{\lambda}$$ $$ E[Overshoot] = 1/\lambda $$ Then, using threshold $C=L$: $$E[N] = \frac{L+E[Overshoot]}{E[Y]} = (L + 1/\lambda)\lambda e^{\lambda t} = L\lambda e^{\lambda t} + e^{\lambda t} $$

Edit: Joriki fixed his answer to indeed get the final "constant term" as $c=e^{\lambda t}$, consistent with my answer.

Michael
  • 23,905
  • As far as I understand this method still assumes that same parameter is used for all the $Y_i$ however in my case it is slightly different because any particular $Y_i$ can have one of the two different parameters. The problem that I am facing is how to tackle two different parameters – Frank Moses Jun 14 '16 at 22:37
  • 2
    @FrankMoses : It looks like your $Y_i$ depends only on $X_i$ and hence indeed your ${Y_i}$ values are iid. So they do indeed fit the framework of my answer above. – Michael Jun 14 '16 at 22:56
  • I understand the independent part but I am unable to understand the identical part because they maybe all exponential but their parameters are different. If different parameter also comes under identical than I have no problem. – Frank Moses Jun 14 '16 at 23:05
  • 2
    @FrankMoses : The $Y_i$ random variables are certainly not exponentially distributed. You can see that they are identically distributed (with a distribution more complex than exponential) since you would use the same software to generate each $Y_i$ variable (each run of that software calls a rand() function that gives an independent random value). You would not need to write different software to generate each $Y_i$. – Michael Jun 14 '16 at 23:12
  • what I understood from the above explanation is that $E[overshoot]$ will be either $E[AX_i+a]$ or $E[BX_i+a]$. which ever is smaller if I want to get the lower bound and whichever is larger if i want to get the upper bound – Frank Moses Jun 14 '16 at 23:32
  • As the final step for finding $E[N]$ can we write the upper bound of $E[N]$ as $E[N]=\frac{\lambda C}{Ae^{\frac{\lambda a}{A}}}+1$ if $\frac{Ae^{\frac{\lambda a}{A}}}{\lambda}<\frac{Be^{\frac{\lambda a}{B}}}{\lambda}$ or otherwise the upper bound of $E[N]$ is $E[N]=\frac{\lambda C}{Be^{\frac{\lambda a}{B}}}+1$ if $\frac{Ae^{\frac{\lambda a}{A}}}{\lambda}>\frac{Be^{\frac{\lambda a}{B}}}{\lambda}$. Here, I used $E[AX_i+a]=\frac{Ae^{\frac{\lambda a}{A}}}{\lambda}$ and $E[BX_i+a]=\frac{Be^{\frac{\lambda a}{B}}}{\lambda}$ – Frank Moses Jun 14 '16 at 23:53
  • Actually I am confused about which value of $Y_i$ should be considered for finding $E[Y]$. $AX_i+a$ or $BX_i+a$. And further what should be the value of $E[overshoot]$. Thank you for your help. – Frank Moses Jun 15 '16 at 00:00
  • 1
    @FrankMoses Calculation of $E[Y]$ uses the law of total expectation: $$E[Y]=E[Y|X>x_{lower}]e^{-\lambda x_{lower}}+E[Y|X<x_{lower}](1-e^{-\lambda x_{lower}})$$ where $E[Y|X>x_{lower}]=E[a+AX|X>x_{lower}]$ and so on. – Michael Jun 15 '16 at 04:57
  • and the $E[overshoot]$ will be equal to $E[X_i]$ or will it be different too? – Frank Moses Jun 15 '16 at 05:04
  • 1
    A simple lower bound is $E[Overshoot] \geq 0$. An upper bound is $$E[Overshoot]= E[Overshoot|X_{last}<x_{lower}]P[<] + E[Overshoot|X_{last}>x_{lower}]P[>] \leq \max[E[Overshoot|X_{last}<x_{lower}], E[Overshoot|X_{last}>x_{lower}]]$$ Then $E[Overshoot|X_{last}<x_{lower}]\leq a + Bx_{lower}$. – Michael Jun 15 '16 at 05:08
  • 1
    The other expectation is tricky and subtle, because we must also condition on $X_{last}$ being large enough to make the threshold exceeded. I hesitate to give an upper bound, but I think the exponential properties imply $E[Overshoot|X_{last}>x_{lower}]\leq a + Ax_{lower} + A/\lambda$, with the intuition that once we cross the threshold, either $X_{last}$ is already done, or it is not and we wait an additinoal $A/\lambda$ on average. – Michael Jun 15 '16 at 05:08
  • This problem has become more complex than I thought initially. Is it possible to get a less complex value for $E[overshoot]$ if we always use $Y_i=X_i+a$ irrespective of the value of $X_i$. – Frank Moses Jun 15 '16 at 07:40
  • in the above comment i wanted to say $Y_i=AX_i+a$ instead of $Y_i=X_i+a$ – Frank Moses Jun 15 '16 at 08:13
  • I have sent a message on the online discussion – Frank Moses Jun 16 '16 at 01:53
  • I am reading your paper entitled "Utility optimal scheduling in processing networks". I have some problem in understanding it. I have posted a question in SE at http://math.stackexchange.com/questions/1834125/optimal-average-utility-of-the-processing-network-needed. I will be very thankful to you if you can provide some answer. Thank you in advance. – Frank Moses Jun 21 '16 at 05:13