221k views
2 votes
A certain code is a sequence of 7 digits. What is the probability of generating 7 digits and getting the code consisting of 1, 2, . . ., 7 if each digit can be repeated?

User Delmania
by
5.0k points

1 Answer

2 votes

Answer:

The code has 7 digits:

Here you are asking:

"What is the probability that the code is consisting only of the digits {1, 2, 3, 4, 5, 6, 7}?"

Ok, first we must calculate the number of all the possible codes.

Suppose that each digit is an independent event.

Each one of those events has 10 possible outcomes {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}

And we have 7 of those.

The total number of possible combinations is equal to the product of the number of outcomes for each event, then the total number of possible combinations is:

C = 10^7.

Now let's calculate the number of possible codes if we only use the digits in the restriction.

We can do exactly the same as above, but now in each case, we have 7 possible outcomes for each digit, then in this case the number of possible combinations is:

c = 7^7.

Now the probability of generating at random a code that only uses the digits {1, 2, 3, 4, 5, 6, 7} is equal to the quotient between the number of codes that only use these digits, and the total number of possible codes.

P = c/C = (7^7)/(10^7) = (7/10)^7 = 0.082

User Arnaud Potier
by
4.7k points