\[p=\frac{a!}{b!(a-b)!}\]
\[p=\frac{10!}{5!(10-5)!}\]
\[p=\frac{3628800}{120 *5!}\] \[p=\frac{3628800}{120 *5!}\] \[p=\frac{3628800}{14400}\] \[p=252\]
Now lets test this in R using the choose function:
choose(10,5)
## [1] 252
\[p=\frac{a!}{b!(a-b)!}\]
\[p=\frac{9!}{7!(9-7)!}\]
\[p=\frac{362880}{5040 *2!}\]
\[p=\frac{362880}{10080}\]
\[p=36\]
Now lets test it with R.
choose(9,7)
## [1] 36