# stats again please help

posted by
**david**
.

When a computerized generator is used to generate random digits, the proability that any particular digit in the set {0,1,2, . . .,9} is generated on any individual trial is 1/10-0.1. suppose that we are generating digits one at a time and are interested in tracking occurrences of the digit 0.

Determine the probabiliy that the first 0 occurs as the fifth random digit generated?

so the probability of not getting a zero for the first four time is 9/10. then the probability of getting a zero for the fifth time is 1/10. and i just multiply that right.

****how many digits would you expect to have to generate in order to observe the first o.

please help me. am i doing this right?

The probability of generating a zero is 1/10, so you would expect to have to generate 10 digits.

You can calculate this from the defintion of the expectation value with a bit of brute force as follows:

The probability that the n-th random digit is the first zero is:

P(n) = (9/10)^(n-1) * 1/10

The expectation value for n is:

<n> = sum_{n=1}^{infinity} n*P(n)

You can calculate this summation using the formula for the geometric series:

sum_{n=0}^{infinity} x^n = 1/[1-x]

differentiate both sides w.r.t. x:

sum_{n=1}^{infinity} nx^(n-1) =

1/[1-x]^(2)

Note that the lower limit of the summation changes to n = 1 because the n = 0 term is a constant which vanishes when differentiated.

Inserting x = 9/10 in here and multiplying by 1/10 gives:

<n> = 1/10 * 1/[1/10]^2 = 10