You are here:

Probability & Statistics/Guessing against 8 chracter alphanumeric code

Advertisement


Question
I'm trying to figure out what the odds of something are basically.

I generated an 8 character alphanumeric sequence. I want to know what the odds are of someone guessing any of the generated characters correctly.

So, one generated code might be - 1234abcd

Someone might guess -1qrst567

What were the odds that their random guess would get the 1 character correct?

I'm not counting lower/uppercase and I'm not counting the order.

So if their guess has an 'a' anywhere and the target had an 'a' anywhere then that was a hit.

What are the odds of a 'hit' at that point? Assuming it was chance, random?

Answer
If you choose 8 characters out of the 10 + 26 possible numbers or digits, there are 36 choose 8 possibilities, which is 30,260,340 possibilities.


Now, your question is "what is the probability that someone guesses 8 characters and one of them is correct?" It is actually easier to answer the opposite question: "what is the probability that none of the digits are correct?"

To get none correct, you must choose the 8 out of the 36-8=28 characters that are not correct. There are 28 choose 8 ways to do that, which is 3,108,105.

That means the odds of getting none correct are 3,108,105/30,260,340 ≈ 10.3%.

The odds of getting one correct is the remainder: 89.7%.

Probability & Statistics

All Answers


Answers by Expert:


Ask Experts

Volunteer


Clyde Oliver

Expertise

I can answer all questions up to, and including, graduate level mathematics. I do not have expertise in statistics (I can answer questions about the mathematical foundations of statistics). I am very much proficient in probability. I am not inclined to answer questions that appear to be homework, nor questions that are not meaningful or advanced in any way.

Experience

I am a PhD educated mathematician working in research at a major university.

Organizations
AMS

Publications
Various research journals of mathematics. Various talks & presentations (some short, some long), about either interesting classical material or about research work.

Education/Credentials
BA mathematics & physics, PhD mathematics from a top 20 US school.

Awards and Honors
Various honors related to grades, various fellowships & scholarships, awards for contributions to mathematics and education at my schools, etc.

Past/Present Clients
In the past, and as my career progresses, I have worked and continue to work as an educator and mentor to students of varying age levels, skill levels, and educational levels.

©2016 About.com. All rights reserved.