Tom K. answered 04/17/20
Knowledgeable and Friendly Math and Statistics Tutor
You are right about 5p(1-p). Let the sum of the first 5 flips be a, the next five b, and the next five c
X = a+b
Y=b+c
Then, cov(X,Y) = cov(a+b,b+c) = cov(a,b) + cov(a,c) + cov(b,b) + cob(b,c) = 0 + 0 + 5p(1-p) + 0 = 5p(1-p)
Correlation = cov(X,Y) /sqrt(var(X)var(Y)) = 5p(1-p)/(10p(1-p)) = 1/2