# Y=the number of pins your opponent guess correct in the first round. Find P(Y=0) and P (Y=1).  In the game mastermind there are 8 different colours. 4 pins are used to make different codes. X is...

Y=the number of pins your opponent guess correct in the first round. Find P(Y=0) and P (Y=1).

In the game mastermind there are 8 different colours. 4 pins are used to make different codes. X is different colours that are used in a random code.

Asked on by svjr

### 1 Answer|Add Yours

nathanshields | High School Teacher | (Level 1) Associate Educator

Posted on

Okay, for the opponent to guess everything wrong (Y=0), he first guesses the first pin wrong.  There's a 7/8 chance of that happening.  Same for the 2nd, 3rd, and 4th.  So we have

`P(Y=0)=7/8*7/8*7/8*7/8`

I'll let you multiply that out!

For Y=1, think about the chance that the first pin was correct and the other three were wrong:

`1/8*7/8*7/8*7/8`

We would add this to the chance that the second pin is the only correct one:

`7/8*1/8*7/8*7/8`

And so on, four times, so we have

`P(Y=1)=4(1/8)(7/8)^3`

We’ve answered 320,034 questions. We can answer yours, too.