@math

In case anyone is curious as to how to do some elementary statistics, in this case combinatorics, here is a quick little write up I did to explain the "n choose k" paradigm.

Here is the is the question (from my cousin):

> Math people
Can you help me ??
Let's say
Hypothetically
You have 7 numbers
Between 1-99
The first 6 cant repeat but the 7th can
How many outcomes are possible?
This isnt a riddle or anything I just dont know how to do the math on something I'm trying to figure out

Here is my answer:

mathb.in/47715

@freemo

Might benefit from a discussion of why `nCk = n!/(k!(n-k)!)`. I don't use combinatorics often enough to have it memorised, so I re-derive the `nCk` and `nPk` formulae every time I need them. Here's my reasoning:

- If you want to arrange `n` objects, you can choose any of `n` for the first, any of the `n-1` remaining for the second, ... down to one for the `n`th. So n objects can be arranged in `n! = n(n-1)...1` ways.
- If you want to choose `k` of `n` objects, you can do this by ordering the `n` objects and taking the first `k`. So initially `nCk = n!`
- However, you don't care about ordering of the chosen objects. If you choose two of `{1, 2, 3, 4}`, the orderings `{1, 2, 3, 4}` and `{2, 1, 3, 4}` should not be treated as distinct. Since there are `k!` ways to order the `k` objects you chose, you need to divide that out. Now we have `nCk = n!/k!`
- Equally, you don't care about ordering of the non-chosen objects. In the above example, `{1, 2, 3, 4}` and `{1, 2, 4, 3}` should not be treated as distinct. There are `n-k` of these objects, so `(n-k)!` ways to order them, which again should be divided out. Finally, we arrive at `nCk = n!/(k!(n-k)!)`

Follow

@khird excellent contribution thank you. I agree this is very helpful to anyone reading.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.