Odds question

On a certain web site I must enter a seven digit random (I assume its random) number that is texted to my cell phone. What are the odds that there will be paired numbers in that seven? How do you figure that out? 8966324, for example, has paired 6s. FWIW, 17 out of the last 27 numbers had a pair so I’m guessing its near 50/50. But aren’t the odds of any given digit being followed by itself 10:1? I freely admit to being not so good with math.

There are 10[sup]7[/sup] seven-digit numbers in all. There are 10*9[sup]6[/sup] in which each digit is different from the one before. So I get 4685590 that have paired numbers, which is a little less than 47% of them.

Anybody wanna check my math/reasoning?

There are 10^7 random numbers in that situation.

There are 10^6 where the first digit is paired with the second. 10^6 where the second digit is paired with the third. and so on…
so of 10^7 choices, 6x10^6 are paired. But, that includes triples, two pair, full house, etc.
Look at it another way. To avoid pairing the first digit can be one of 10 (assuming leading zeros are permitted)
The next can be 1 of 9 since it cannot be the same as the first. the third cannot be same as the 2nd, so 1 of 9 choices, and so on.
10x9^6 possible non-paired numbers.

If you want to eliminate multiple pairs and triples etc. if the question is one pair vs no pairs - a bit more complex, but you get the idea.

Assuming you mean paired right next to each other and that 0 can be a leading number, then the probability the second does not match the first is 0.9. The probability that the third does not match the second is 0.9. Etc. You have 7 digits so 6 such independent comparisons. The probability of no pairs is therefore 0.9[sup]6[/sup] = 0.531. So the probability of 1 or more pairs (including triplets) is 0.469.

If you want exactly one pair it’s a bit more difficult.

Jeez, fast folk. My post started with:

“Go the other way: What are the odds that no digit is followed by itself? …”

It’s often easier to figure out the odds of one thing not happening than one or more things happening.

So confirm the 0.531… value for no doublings.