A small company has 9 female employees and 15 male employees. In how many ways can 8 employees be selected at random for drug testing if exactly 5 of the employees must be males?

To find the number of ways to select 8 employees for drug testing given that exactly 5 of them must be males, we need to consider two scenarios:

Scenario 1: Selecting 5 males and 3 females.
In this scenario, we need to choose 5 males out of 15 and 3 females out of 9.

The number of ways to select 5 males out of 15 is denoted as C(15, 5) or "15 choose 5". This can be calculated using the formula:
C(15, 5) = 15! / (5! * (15 - 5)!) = (15 * 14 * 13 * 12 * 11) / (5 * 4 * 3 * 2 * 1) = 3003

Similarly, the number of ways to select 3 females out of 9 is denoted as C(9, 3) or "9 choose 3". This can be calculated using the formula:
C(9, 3) = 9! / (3! * (9 - 3)!) = (9 * 8 * 7) / (3 * 2 * 1) = 84

Therefore, the number of ways to select 5 males and 3 females is 3003 * 84 = 252,252.

Scenario 2: Selecting all 8 employees as males.
In this scenario, we simply need to choose all 8 employees from the 15 male employees. Since there are no females required, this can be calculated directly as:
C(15, 8) = 15! / (8! * (15 - 8)!) = (15 * 14 * 13 * 12 * 11 * 10 * 9) / (8 * 7 * 6 * 5 * 4 * 3 * 2 * 1) = 6435

Therefore, the number of ways to select all 8 employees as males is 6435.

To get the total number of ways to select 8 employees for drug testing, we add the counts from both scenarios:
252,252 + 6435 = 258,687

Hence, there are a total of 258,687 ways to select 8 employees at random for drug testing given that exactly 5 of the employees must be males.