The order we choose people here does not matter. Therefore we have a combination, as long as there are 5 people choosen to form a committee.
\({10\choose 5} = \frac{10!}{5!(10-5)!} = \frac{10!}{5!5!}\)
so \({10\choose 5} = \frac{10*9*8*7*6}{5*4*3*2*1} = \frac{30240}{120}\)
Therefore: \({10\choose 5} = 252\)
GiveUsCombinationOf <- function(n, m){
got_it <- factorial(n)/(factorial(m)*factorial(n-m))
return(got_it)
}
#Run the question!!
GiveUsCombinationOf(10, 5)
## [1] 252