In a sequence of numbers 4 and 5 randomly arranged, let A be the number of numbers until the sequence 45 first appears, and B be the number of numbers until the sequence 55 appears. What is the magnitude relationship between the expected values of the numbers of A and B?

Assuming numbers are restricted to positive integers, and that the integers are arranged in numerical order, the sequence up to 55 is:

4, 5, 44, 45, 54, 55.

A={4, 5, 44, 45}; n(A)=4

B={4, 5, 44, 45, 54, 55}; n(B)=6.

Relative magnitude n(B)/n(A)=6/4=3/2.

However, if the digits are arranged sequentially side by side in an infinite sequence, for example, 5454554544454545... then a different logic must be applied. In this example, 45 appears in the 2nd and 3rd position so A would be 3 and B would be 6. This would be analogous to placing coins in a line and counting how many coins are placed until a head is followed by a tail, and two tails first appear.

In any sequence of 4s and 5s in a long string there will always be more 45 permutations than 55. I estimate that there are about 40% more. But if you take any pair of digits it’s just as likely that the first appearance of 45 and 55 is the same probability, because there are 4 possible permutations:

44, 45, 54, 55 and the probability of 45 or of 55 is 1 in 4.

by Top Rated User (813k points)