Suppose a biased coin (probability of head being $p$) was flipped $n$ times. For a fixed positive integer $k$ ($k<n$), there exists $(n-k+1)$ consecutive subsequences. I am interested in the greatest number of heads which appear in any $k$-element subsequences taken from the particular outcome of n flips.
Concretely, when $n=100,k=30,p=0.5$, we have $X_1,X_2,...,X_{100} \sim Bernoulli(0.5)$ i.i.d.,and I am interested in the random variable
$$ Y=max_{1\leq k \leq 71}(\sum_{i=k}^{k+29} X_i) $$
I would appreciate any advice on how to calculate the distribution or expectation of $Y$, both analytically or asymptotically ($n \rightarrow \infty$ with $k/n$ remains fixed). This is actually the maximum of some dependent binomial variables with some known structure.
Thank you again!