Let $Y\_1, \ldots, Y\_n$ and $X\_1, \ldots, X\_n$ be i.i.d. $p$-Bernoulli random variables and let $T \in \{0, \ldots, n\}$ be a [stopping time](https://en.wikipedia.org/wiki/Stopping_time) for the process. From [Wald's equation](https://en.wikipedia.org/wiki/Wald%27s_equation), we know
$$
E\left[\sum\_{i=1}^T Y\_i \right] = E\left[\sum\_{i=1}^T X\_i \right] = p \times E[T].
$$
On the other hand, if $T$ was not itself a random variable, a standard Chernoff bound would give that for $\mu = pT$ and any $0 < \delta < 1$, with probability $\geq 1-\exp(-\delta^2 \mu/3)$ we have
$$
 \sum\_{i=1}^T Y\_i \in (1\pm \delta) \sum\_{i=1}^T X\_i.
$$
Now going back to $T$ being a stopping time and not known a priori, can we get a similar concentration bound? That is, letting $\mu$ be a given lower bound for the ~~expected~~\* actual value of $\sum\_{i=1}^T X\_i$, does the statement above still hold?


**Note**: One could try to apply Chernoff bound over all $n$ choices of $T$ and set the failure probability small enough that with high probability, no matter the value of $T$, sum of the two sequences are close up to any point. Unfortunately, though, to be able to do this, the error probability would have to depend on $n$ whereas the original bound is dimension-free. Is there any better way to do this? 


\*For $\mu$ being a lower bound for the expected value of the sum instead of its actual value, the statement is wrong. See Iosif Pinelis's answer.



Chernoff-type bounds for a stopped sum of independent random variables
The desired statement will not hold. E.g., suppose that $n\ge2$; $X\_1,\dots,X\_n,Y\_1,\dots,Y\_n$ are independent; $p=1/2$; $T=1\_{X\_1\ne Y\_1}+n1\_{X\_1=Y\_1}$; and $\delta=1/2$. Then $\mu:=p\,ET>n/4\to\infty$ (as $n\to\infty$), so that $1-\exp(-c\delta^2\mu )\to1$ for any fixed $c>0$. However, 
$$P\Big(\sum\_{i=1}^TY\_i\notin(1\pm\delta)\sum\_{i=1}^TX\_i\Big)
\ge P(T=1)=1/2\not\to0;$$
so, it is not true that 
$$P\Big(\sum\_{i=1}^TY\_i\in(1\pm\delta)\sum\_{i=1}^TX\_i\Big)\to1.$$


