The probability of the th trial failing given the failure of preceding trials is . The probability of every trial failing up to and including the th trial is therefore

.

The probability of the th trial succeeding given the failure of preceding trials is . Let Y=y denote the event that every trial up to and including the th trial fails and then the th trial succeeds. Then

.

Therefore .

This can be simplified using common summation identities.