finite expected value for a generated binary number.

81 Views Asked by At

A binary number that is generated in the following way: We start with zero bits (which is considered a valid representation of 0), In each step the probability to stop generating is p (and the probability to continue is 1-p), In addition, in each step the probability to generate "1" is q (and the probability to generate "0" is 1-q). all the probabilities are independent of each other. I need to find for which values of p,q the expected value of the generated number is finite.

This is a question in probabilistic method, my initial approach was to use the linearity of expectation but I could not get very far. Thanks in Advance.