Odds for randomly assigning a men-only group in a team working assignment We are partitioning a group of $30$ people in $5$ groups of $6$ persons each. We have $13$ women and $17$ men in those $30$ people and randomly drawing those people gave us a men-only group. What are the odds of getting a group of the same gender?
A generic way is preferred, of course. So, let $N$ be the number of people to partition in $m$ groups while $G[k]$ is the number of people per gender.
 A: As a check on these analytical results, we can simulate this in R:
f = function(){
  is.man = matrix(sample(30) <= 17, nrow=5, ncol=6)
  man.gp.counts = rowSums(is.man)
  contains.all.man.group = sum(man.gp.counts == 6) >= 1
  return(contains.all.man.group)
}

table(replicate(10^6, f())

This returns
 FALSE   TRUE 
896547 103453 

The function f randomly groups the individuals into six groups and takes their gender (the individuals are numbered 1 to 30, of whom the first 17 are men); then it determines the number of men in each group, and returns TRUE if there is a group of all men.
The table shows that the probability of getting an all-male group is about 10.3% (on one million simulations), which agrees with Graham Kemp's answer.
A: My humble try:
Total Number of ways denoted by B $$=\frac{{30\choose6}{24\choose6}{18\choose6}{12\choose6}{6\choose6}}{5!}$$
Number of ways atleast one group is of same gender denoted by A

The probability that you have atleast one group of same gender $= \frac{A}{B}$
Thanks
Satish
