6. Hans has 12 good friends, five of them male and seven of them female. He decides to have a

dinner party but can invite only seven because his dining room table will seat only eight
people. He decides to invite his guests by lot. What is the probability that:
a. There will be four males and four females at the party?
b. Rivka will be among those invited?
c. Hans will have only female guest

To answer these probability questions, we first need to determine the total number of ways in which Hans can invite his friends.

1. Total number of ways to invite guests:
Hans has 12 friends, and he can invite 7 of them. Mathematically, this can be calculated using the combination formula (nCr) as follows:

Total number of ways = 12C7 = (12!)/(7!(12-7)!) = 792

a. Probability of having four males and four females at the party:
Hans has 5 male friends and 7 female friends. To have four males and four females at the party, he must choose 4 males out of 5 and 3 females out of 7. Mathematically, this can again be calculated using the combination formula:

Number of ways to have 4 males and 3 females = 5C4 * 7C3 = (5!)/(4!(5-4)!) * (7!)/(3!(7-3)!) = 5 * 35 = 175

Probability = (Number of ways to have 4 males and 3 females) / (Total number of ways)
Probability = 175 / 792 ≈ 0.221

Therefore, the probability of having four males and four females at the party is approximately 0.221.

b. Probability of inviting Rivka:
Since Rivka is one of the 12 friends, the probability of inviting Rivka is simply the probability of choosing her among the 7 guests.

Probability = 1/7 ≈ 0.143

Therefore, the probability of inviting Rivka is approximately 0.143.

c. Probability of having only female guests:
To have only female guests, Hans must choose 7 females out of 7, as there are no males.

Number of ways to have only female guests = 7C7 = 1

Probability = 1 / 792 ≈ 0.00126

Therefore, the probability of having only female guests is approximately 0.00126.