Anonymous

# I will form a random 5 digit number using only the integers 1 through 7 and allowing no integer to be used?

more than once in any 5 digit number. Find the probability that the 5 digit number contains the integer "5" but does not contain the integer "4"

Relevance

We can figure this out by counting.

(number that contain 5 but not 4) / (total number)

Getting the total number:

We have seven choices for the first digit, six for the second digit, five for the third digit, four for the fourth digit, and three for the fifth digit. There are:

7*6*5*4*3

five digit numbers using digits 1 through 7 inclusive and not allowing repeats.

Getting the number that contain 5 but not 4:

Let's compute this as follows.

(number that contain 5 but not 4)

= (number that contain 5) - (number that contain both 4 and 5)

Getting the number that contain 5:

We have five different places to insert a 5 within a four digit number (5 choose 1), and we can only have one 5 in the number. We are free to choose the other four digits.

Thus we have 6 choices for one of the digits, 5 for the next, 4 for the next, and 3 for the last. Then we have five places we can insert the 5 we want, giving:

6*5*4*3*5

total number that contain a 5.

Getting the number that contain both 4 and 5:

This problem is similar to the last one. Here we have to place two digits (the 4 and 5) among the others. We can choose any of 5 positions for one, and then we have 4 positions for the other. That's 5*4=20 choices. We choose the other digits from the set {7,6,3,2,1}. Thus we have 5 choices for the first, 4 for the second, and 3 for the third. The total is:

5*4*3*20

numbers that contain both 4 and 5.

Putting it all back together:

(number that contain 5 but not 4)

= ((number that contain 5) - (number that contain both 4 and 5)) / (total number)

= ((6*5*4*3*5) - (5*4*3*20)) / (7*6*5*4*3)

= (5*4*3)*(6*5 - 20) / (7*6*5*4*3)

= (30 - 20) / (7*6)

= 10 / 42

= 5 / 21

The probability is 5/21. Hope this helps!

EDIT:

Raven is close, but makes an error at the end. You can only have P(A,B)=P(A)*P(B) when events A and B are independent. In this case they are not, because if a number contains a 5 it is less likely to contain a 4, and if it does not contain a 4 it is more likely to contain a 5. That is, P(A|B) is not P(A) in this case.

Here's an easy way to see this.

Suppose we just use the digits 1 and 2 and we form two-digit numbers (no other restrictions). Then these are all the combinations: 11, 12, 21, 22

Now, the probability of containing a 2 is 3/4. The probability of not containing a 1 is 1/4. The probability that a number contains a 2 but not a 1 is also 1/4, NOT (1/4)*(3/4) = 3/16.

EDIT 2:

I originally missed a factor of two in the above (d'oh!) but fixed it. Should be correct now.

The set of all 5 digit numbers that can be formed this way is:

7*6*5*4*3 = 2520 unique numbers

The set of all numbers containing 5 is:

(6*5*4*3) * 5 = 1800 unique numbers (71.43% of the total)

The set of all numbers not containing 4 is:

6*5*4*3*2 = 720 unique numbers (28.57% of the total)

So now we know how many numbers contain 5 and how many numbers don't contain 4. What to do now? Find how many numbers contain 5 AND don't contain 4. This can be done by multiplying their probabilities:

.7143 * .2857 = .2041

The probability is 20.41%

EDIT:

Whoops, yeah, I'm wrong as Stacy has pointed out. My apologies.

Step 1: discover the number of 5-digit combinations that will contain a 5.

Step 2: discover the number of 5-digit combinations that will contain 5 and a 4.

step 3: subtract step 2 from step 1

step 4: devide step 3 by the total number of combinations.

We don't care about the order of the digits, so this is simply a question of the combination of digits chosen.

Choosing 5 digits out of 7 (7C5) can be done

7 * 6 / 2 = 21 ways.

(After all, it's just the same as selecting two digits to be excluded.)

There are 6 combinations that exclude the 4, and one of them also excludes the 5, so the probability of meeting your criteria is 5/21.

• Bill C
Lv 6

7 x 6 x 5 x 4 x 3 = 2,520 combinations of numbers between 1 and seven that can be used.

The chance of any 1 digit appearing is 100%- (1/7+1/6+1/5+1/4+1/3)/5 or Approximately 79% and the chance of it NOT appearing would be 100%-(6/7+5/6+4/5+3/4+2/3)/5 or 23%.

If my guess is correct, there is an 18% chance (79%*23%) that your outcome will occur.

Lv 7

I can get you started. The number of possible combinations is

7!/(7-5)! = 7!/2!

= 3×4×5×6×7

= 2520

• lou h
Lv 7

Nº= 7C5· 5!= 2520

P=5C4· 5! / 2520= 600/2520 =5/21= 0.2381

Saludos.