STAT 02290 | 2026 Spring

Practice: Sample Space, Events, Counting

Sample Space and Events

Give a probability model for the chance process of rolling two fair, six-sided dice by writing down the sample space. Then state the size of this sample space.

Solution. The sample space is the set $$ \{1,2,3,4,5,6\}^2=\{(1,1),(1,2),\dots,(6,6)\}. $$ The cardinality or size of this sample space is $6\times 6 = 36$.

(a) Identify the sample space of the following probability experiment: identifying a person’s eye color (blue, brown, green, hazel, gray, other) and hair color (blonde, black, brown, red, other).

(b) Determine the size of this sample space.

Solution. The sample space is the set {blue, brown, green, hazel, gray, other} x {blonde, black, brown, red, other}.

The cardinality or size of this sample space is $6\times 5 = 30$.

Write a sample space for the following probability experiment: recording the number of emails you receive in a day.

Solution. You can receive 0 emails, you can receive 1 email, you can receive 2 emails, so on. In general, the sample space is the set of all nonnegative integers: {0, 1, 2, 3, 4, ...}.

Counting

What is the maximum number of guesses you would need to try to figure out the correct 4-digit passcode for the keypad shown in the picture?

Keypad with digits 1, 7, 9, 0 erased.
Image from Reddit.
Answer:

Solution. We can reasonably guess that only the digits 1, 7, 9, and 0 are part of the 4-digit passcode. There are $4!=4\times 3\times 2\times 1 = 24$ permutations of the word "1234".

What is the maximum number of guesses you would need to try to figure out the correct 4-digit passcode for the keypad shown in the picture, assuming that the digit 5 is used twice in the passcode?

Keypad with digits 1, 7, 9, 0 partially erased.
Image from Reddit.
Answer:

Solution. We can reasonably guess that only the digits 2, 4, and 5 are part of the 4-digit passcode, with the digit 5 being used twice. The number of permutations of the word "2355" is $4!/2=12$.

What is the maximum number of guesses you would need to try to figure out the correct 4-digit passcode for the keypad shown in the picture?

Keypad with digits 4 and 7 erased.
Image from Reddit.
Answer:

Solution 1. We must count the number of 4-digit strings of 4's and 7's that use both 4 and 7 at least once each. These are permutations of 4777, 4477, and 4447, so the answer $$ \frac{4!}{1!3!} +\frac{4!}{2!2!} +\frac{4!}{3!1!} = 4+ 6+4=14. $$

Solution 2. We count using complements. There are $2^4$-many 4-digit strings composed from the letters 4 and 7. Of these, we discard the 4-digit strings 4444 and 7777, so the answer is $2^4-2=16-2=14$.

(JP Morgan interview, rated easy)

Imagine you are in 3D space. How many paths are there from $(0,0,0)$ to $(2,2,2)$ if you can move only up, right, and forward, one unit at a time?

Answer:

Solution. All such paths from $(0,0,0)$ to $(2,2,2)$ must use 2 U's (ups), 2 R's (rights), and 2 F's (forwards), so we are counting the number of permutations of the word "UURRFF". The answer is therefore $$ \frac{6!}{2!2!2!}=\frac{6\times 5\times 4\times 3\times 2}{2\times 2\times 2} = 90 $$