How to interpret a summation equation with two separated sigmas and no operator

28 Views Asked by At

I'm trying to write stata code to recreate a probability estimate via this published equation, but I don't understand how the two summations relate to one another since there's no operator. Obviously pretty rusty on my summation algebra, so any guidance is appreciated!

Equation pictured here: enter image description here

I have values for:

$T=730$

$r=.00006084$

To be clear, I'm not really looking for the solution to the equation, but rather an explanation for how the equation "works" so that I can recreate it in stata (and therefore run using a bunch of different values for T and r). Thank you in advance!

2

There are 2 best solutions below

2
On BEST ANSWER

This is a "nested" summation: $$\sum_{S=1}^{T-1}\left[r(1-r)^{S-1}\left(\sum_{D=S+1}^{T}\left\{1-(1-r)^{T-D+1}\right\}\left\{x(1-x)^{D-S-1}\right\}\right)\right]$$ It's an expression, not an equation, since there's no equals sign. The inner summation, for each $S$ of the outer summation, runs from $S+1$ to $T$.

0
On

Using the MathJax that Adrian Keister entered, and letting $1-x=y$ and $1-r = q$,

$\sum_{S=1}^{T-1}\left[r(1-r)^{S-1}\left(\sum_{D=S+1}^{T}\left\{1-(1-r)^{T-D+1}\right\}\left\{x(1-x)^{D-S-1}\right\}\right)\right]\\ =rx\sum_{S=1}^{T-1}\left[q^{S-1}\left(\sum_{D=S+1}^{T}\left\{1-q^{T-D+1}\right\}\left\{y^{D-S-1}\right\}\right)\right]\\ =rx\sum_{S=1}^{T-1}\left[q^{S-1}\left(\sum_{D=S+1}^{T}\left\{y^{D-S-1}\right\}\right)\right]\\ -rx\sum_{S=1}^{T-1}\left[q^{S-1}\left(\sum_{D=S+1}^{T}\left\{q^{T-D+1}\right\}\left\{y^{D-S-1}\right\}\right)\right]\\ =rx\sum_{S=1}^{T-1}\left[q^{S-1}y^{-S-1}\left(\sum_{D=S+1}^{T}\left\{y^{D}\right\}\right)\right]\\ -rx\sum_{S=1}^{T-1}\left[q^{S-1}q^{T+1}y^{-S-1}\left(\sum_{D=S+1}^{T}\left\{q^{-D}\right\}\left\{y^{D}\right\}\right)\right]\\ =rx(qy)^{-1}\sum_{S=1}^{T-1}\left[(q/y)^S\left(\sum_{D=S+1}^{T}y^{D}\right)\right]\\ -rxq^Ty^{-1}\sum_{S=1}^{T-1}\left[q^{S}y^{-S}\left(\sum_{D=S+1}^{T}(y/q)^D\right)\right]\\ =rx(qy)^{-1}\sum_{S=1}^{T-1}\left[(q/y)^S\dfrac{y^{S+1}-y^{T+1}}{1-y}\right]\\ -rxq^Ty^{-1}\sum_{S=1}^{T-1}\left[(q/y)^S\dfrac{(y/q)^{S+1}-(y/q)^{T+1}}{1-y/q}\right]\\ =\dfrac{rx}{qy(1-y)}\sum_{S=1}^{T-1}\left[(q/y)^S(y^{S+1}-y^{T+1})\right]\\ -\dfrac{rxq^T}{y(1-y/q)}\sum_{S=1}^{T-1}\left[(q/y)^S((y/q)^{S+1}-(y/q)^{T+1})\right]\\ =\dfrac{rx}{q(1-y)}\sum_{S=1}^{T-1}\left[(q/y)^S(y^{S}-y^{T})\right]\\ -\dfrac{rxq^T}{y(1-y/q)}\sum_{S=1}^{T-1}\left[(y/q)-(y/q)^{T-S+1})\right]\\ =\dfrac{rx}{q(1-y)}\sum_{S=1}^{T-1}\left[q^S-(q/y)^Sy^{T})\right]\\ -\dfrac{rxq^T}{y(1-y/q)}\sum_{S=1}^{T-1}\left[(y/q)-(y/q)^{T-S+1})\right]\\ =\dfrac{rx}{q(1-y)}\sum_{S=1}^{T-1}\left[q^S-(q/y)^Sy^{T})\right]\\ -\dfrac{rxq^T}{q(1-y/q)}\sum_{S=1}^{T-1}\left[1-(y/q)^{T-S})\right]\\ =\dfrac{rx}{q(1-y)}\left[\sum_{S=1}^{T-1}q^S-\sum_{S=1}^{T-1}(q/y)^Sy^{T})\right]\\ -\dfrac{rxq^T}{q(1-y/q)}\left[\sum_{S=1}^{T-1}1-\sum_{S=1}^{T-1}(y/q)^{T-S})\right]\\ =\dfrac{rx}{q(1-y)}\left[\dfrac{q-q^T}{1-q}-y^T\dfrac{(q/y)-(q/y)^T}{1-q/y})\right]\\ -\dfrac{rxq^T}{q(1-y/q)}\left[(T-S)-(y/q)^T\sum_{S=1}^{T-1}(q/y)^{S})\right]\\ =\dfrac{rx}{q(1-y)}\left[\dfrac{q-q^T}{1-q}-y^T\dfrac{(q/y)-(q/y)^T}{1-q/y})\right]\\ -\dfrac{rxq^T}{q(1-y/q)}\left[(T-S)-(y/q)^T\dfrac{(q/y)-(q/y)^T}{1-q/y})\right]\\ $

Of course, with all this manipulation being done in the answer box, there is a good chance that I have made some mistakes.

However, something like this is true.

Your turn.