In the tutorial for this problem, I am confused as to why z[i + 1][j + 1] + = z[i][j] * p
is done? Specifically, why are we multiplying p and (1-p) to the previous probabilities? I am a beginner with probabilities and expected value and I didnt understand why " z[i][j] is multiplied with p " . Please explain in detail. Thank You..!