# Combination formula | Probability and combinatorics | Probability and Statistics | Khan Academy

– The first time you’re
exposed to permutations and combinations it takes a little bit to get your brain around it,
so I think it never hurts to do as many examples. But each incremental
example I’m gonna review what we’ve done before, but hopefully go a little bit further. So let’s just take another example. This is in the same vein. In videos after this I’ll
start using other examples, other than just people sitting in chairs, but let’s just stick with it for now. Let’s say we have six people again. Person A, B, C, D, E, and F, so we have six people. Now let’s put them into four chairs. We can go through this fairly quickly, one, two, three, four chairs. We’ve seen this show multiple times. How many ways, how many
permutations are there of putting these six
people into four chairs? Well the first chair, if
we seat them in order, we might as well, we
can say well there’d be six possibilities here. For each of those six possibilities there would be five possibilities
of who we’d put here, because one person’s already sitting down. For each of these 30 possibilities of seating these first two people, there’d be four possibilities of who we put in chair number three. Then for each of these, what
is this, 120 possibilities there would be three possibilities of who we put in chair four. This six times five times four times three is the number of permutations. We’ve seen in one of the
early videos on permutations that, when we talk about
the permutation formula, one way to write this, if we
wanted to write in terms of factorial, we could write this as six factorial, six factorial
which is going to be equal to six times five times four times three times two times one, but we wanna get rid of the two times one. We’re gonna divide that, we’re gonna divide that. Now what’s two times one? Two times one is two factorial. Where do we get that? We wanted the first four, the first four factors of six factorial. That’s where the four came from. We wanted the first four
factors, so the way we got two is we said six minus four. Six minus four, that’s gonna give us the number that we wanna get rid of. We wanted to get rid of two or the factors we wanna get rid of. That’s going to give us two factorial. If we do six minus four factorial. That’s going to give us two factorial, which is two times one. Then these cancel out, and we are all set. This is one way, I put in
the particular numbers here, but this is a review of
the permutations formula, where people say, “Hey, if I’m saying n, “if I’m taking n things,
then I want to figure out “how many permutations are there “of putting them into let’s say k spots, “it’s going to be equal to n factorial “over n minus k factorial.” That’s exactly what we did over here, where six is n and k, or four is k. Four is k. Actually let me color code the whole thing so that we see the parallel. All of that is review. Then we went into the
world of combinations. In the world of combinations, we said permutations make a difference between who’s sitting in what chair. For example, in the permutations world, and this is all review, we’ve covered this in the combinations video,
in the permutations world A, B, C, D, and D, A, B, C, these would be two different permutations that’s being counted in
whatever number this is. This is what? This is 30 times twelve. This is equal to 360. Each of these, this is one permutation, this is another permutation, and if we keep doing it
we would count up to 360. But we learned in combinations, when we’re thinking about combinations, let me write combinations. If we’re saying n choose, n choose k, or how many combinations are there? If we take k things, and
we just wanna figure out how many combinatio- If we start with n, if
we have pool of n things, and we wanna say how many combinations of k things are there,
then we would count these as the same combination. What we really wanna do is we wanna take the number of permutations there are. We wanna take the number
of permutations there are, which is equal to n factorial over n minus k factorial, over n minus k factorial, and we wanna divide by the number of ways that you can arrange four people. Once again, this takes- I remember the first time I learned it took my brain a little while. If it’s taking you a little
while to think about it, not a big deal. It can be confusing at first, but hopefully if you
keep thinking about it hopefully you will see
clarity at some moment. What we wanna do is we wanna
divide by all of the ways that you can arrange four things. Cuz once again, in the permutations it’s counting all of the
different arrangements of four things, but we don’t wanna count all of those different
arrangements of four things. We wanna just say they’re
all one combination. We wanna divide by the number of ways to arrange four things. Or the number of ways to arrange k things. Let me write this down. What is the number of ways, number of ways, to arrange k things, k things, in k spots. I encourage you to pause the video, because this actually a review from the first permutation video. If you have k spots, let me do it so if this is the first
spot, the second spot, third spot, and then
you’re gonna go all the way to the kth spot. For the first spot there could be k possibilities. There’s k things that
could take the first spot. For each of those k possibilities, how many things can be in the second spot? It’s gonna be k minus one,
in the first spot. Then over here, what’s it gonna be? K minus two all the way to the last spot, there’s only one thing that
can be put in the last spot. What is this thing here? K times k minus one times k minus two times k minus three all
the way down to one. This is just equal to k factorial. The number of ways to
arrange k things in k spots, k factorial. The number of ways to arrange
four things in four spots, that’s four factorial. The number of ways to arrange three things in three spots, it’s three factorial. We could just divide this. We could just divide this by k factorial. This would get us, this would get us, n factorial divided by k factorial, k factorial times, times n minus k factorial, n minus k, n minus k, I’ll put the factorial right over there. This right over here is the formula. This right over here is the
formula for combinations. Sometimes this is also called
the binomial coefficient. People always call this n choose k. They’ll also write it like this, n choose k, especially
when they’re thinking in terms of binomial coefficients. I got into kind of an
abstract tangent here, when I started getting
into the general formula. Let’s go back to our example. In our example we saw
that there was 360 ways of seating six people into four chairs. What if we didn’t care about
who’s sitting in which chairs and just wanna say,
“How many ways are there “to choose four people “from a pool of six?” That would be that would be how many ways are there. That would be six. How many combinations if I’m starting with a pool of six, how many combinations are there? How many combinations are there for selecting four? Another way of thinking about it is how many ways are there to, from a pool of six items, people in this example, how many ways are there
to choose four of them. That is going to be, we could do it- I’ll apply the formula first, and then I’ll reason through it. And like I always say, I’m not a huge fan of the formula. Every time I revisit it after a few years, actually just rethink about it,
as opposed to memorizing it, because memorizing is a
good way to not understand what’s actually going on, but if we just apply the formula here, I really want you to understand what’s happening in the formula, it would be six factorial
over four factorial, over four factorial, times six minus four factorial, six, oops let me just, This is six minus four factorial, so this part right over here, six minus four fa- Let me write it out because I know this can be a little bit confusing the first time you see it. So six minus four factorial, factorial, which is equal to, which is equal to six
factorial over four factorial, over four factorial, times
this thing right over here is two factorial, times two factorial, which is going to be equal to, we can just write out the factorials,
six times five times four times three times two times one, over four. Four time three times two times one times, times two times one. Of course that’s going
to cancel with that. Then the one doesn’t
really change the value, so let me get rid of this one here. Let’s see, this three can
cancel with this three. This four could cancel with this four. Then it’s six divided by
two is going to be three. So we are just left with three times five. We are left with, we are left with, there’s
fifteen combinations. There’s 360 permutations for putting six people into four chairs, but there’s only 15 combinations, because we’re no longer counting all of the different arrangements for the same four people
in the four chairs. We’re saying, “Hey if
it’s the same four people, “that is now one combination.” You can see how many ways are there to arrange four people into four chairs? That’s the four factorial
part right over here. The four factorial part right over here, which is four times three
times two times one, which is 24. We essentially just took the 360 divided by 24 to get 15. Once again, I don’t think
I can stress this enough. I wanna make it clear
where this is coming from. This right over here, let me circle, this piece right over here is
the number of permutations. This is really just so you can get to six times five times four times three, which is exactly what we did up here, where we reasoned through it. Then we just wanna divide
by the number of ways you can arrange four items in four spaces.

## 100 thoughts on “Combination formula | Probability and combinatorics | Probability and Statistics | Khan Academy”

1. Xenia Vera Tarrago says:

My name is Khan and I'm not a ….

2. Patrick Bang says:

love your videos and explanations. I have a question: I can't seem to wrap my head this: n(n-1)(n-2)…n(n-k+1) where does the n-k+1 come from?? I'm so blind I just can't seem to figure it out and I need a clear explanation. Please help me understand this. Thanks!

3. Sergio Perez Bolanos says:

4. Rolling thunder says:

Ok getsss haha

5. PowerPoint Master says:

IM MINDBLOWN

6. Nathalia Mancilla says:

In how many ways can a comittee of 4 members be formed of 5 couples if husband and wife are not in tge same committee?

7. Epic Boy says:

Aaaa statistics is so hard 🙁 Although I still don’t fully understand it, this cleared some things up for me! Thank you Khan Academy!

A question for clarification though: so in a combination (I’ll be using your example), ABCD and all other permutations that contain those letters are considered one combination right? And if you get another set of permutations that contains CDEF in any order, is that another combination?

YOU KHAN DO IT!!!!

9. Kramvitz the Vega says:

Please solve this, how many combinations can we do with 4 roofs , 7 windows, 9 doors and 8 walls

10. Kawtar Bouzaidi says:

Thank you sir !

11. jcashisme says:

Did you even mention how to calculate "probability" of combinatorics???? Nope. Thumbs down for false advertising

12. Fidget Spinner Master says:

Lol who's seeing in 2017 December

13. Youssef Achouham says:

Thanks

14. TheSuomi says:

Numberphile is better

15. Lesrie Hammang says:

Yes! My brain just turn up side down………..

What if the same number of peopel = # of chairs

17. IDK332 says:

What if 1 or 2 or 6 people want to remain standing

18. meghanaben patel says:

19. qwert ty says:

😮😮😮
ahhh i get it
this is so hard but after i make an example, I memorized what are the permutation meaning

20. Anirudh Kaushik says:

Greatest video available on the internet to explain permutations and combinations.

21. Anirudh Kaushik says:

I wish you had written all the 15 combinations too though so as to make things somewhat clearer. Nonetheless, thanks a bunch!!

22. Zhaofeng Zheng says:

Why am I paying thousands of dollars tuition fee?

23. Maxim Petrov says:

Just wonderful, I been tryin to find out about "wheeling lotto" for a while now, and I think this has helped. Have you ever come across – Zenulian Lottify Bonkers – (do a search on google ) ? Ive heard some pretty good things about it and my work buddy got excellent success with it.

24. Rehime Salman says:

from 4:41 how he divided by k! then multiply by (n-k)! ????

25. Abeer Khan says:

People sitting in chair or on chair?

26. premlata Anil Panwar says:

That description is funny, Busted

27. premlata Anil Panwar says:

Ok let it easy,
Permutation is red blue black ball not qual to blue red black ball
R B BL not= B R BL

While, In combination
R B BL = B R BL = BL R B

28. Marcos Ponce says:

how did you get K!(n-k)???

29. Colin Brewster says:

I actually understand but I think I would understand if you can go through or show me in working HOW MANY 6# COMBINATIONS YOU CAN GET OUT OF 15# & HOW MANY 5# COMBINATIONS YOU CAN GET OUT OF 15# you can use alphabet #s or numerìcal #s it dissent make any difference LOOKING FORWARD FOR YOUR HELP THANKS GOD BLESS

30. Grammar Nazi says:

So, what if we need to choose let's say 30 elements out of a pool of 9? (Where of course, we can repeat each element as many times as we need)

31. aviwe mayengeshe says:

Thank you, I hope I am going to pass the test with the understanding of this video

32. Maria Grazia Pastorello says:

Until 1.42 minute is nice and clear what you do. Then it starts being really confusing starting form when you say "We want to get rid of 2×1". Yes? And why we should want to get rid of 2×1?? What's the logic behind it? Can you please explain?

33. Bananaaaa342 says:

Man I suck at everything 😭

34. chooch tech says:

math is so garbage

35. Vishal Mali says:

I finally get it…thanks sal

36. s Yoos says:

this will make a lot more sense after watching sals videos on permutation. how do teachers even manage to make something so simple so hard.

37. larz person says:

thank you, never understood why the formula was the way it is. And now I can see why it is the way it is.

38. Samaa Zeidan says:

If n=4 and k=6 , the c equal to ???????!!!!!!!!

39. Rafcio Pranks says:

Now I'm convinced.

40. hklausen says:

I was able to caculate the combinations before, but now I also understand the algebra 🙂 Thanks

41. Ilse Pena says:

Wooowwww, why can't my teacher explain like this hahaha, so simple, my teacher makes it seem more difficult than it really is. Great explanation, very helpful. Thanks so much! 🙂

42. INDULEKHA V says:

Mr Anil Nair,
You're the best math teacher!

43. hari says:

yes! that makes total sense!! thank you!!!

44. Hens Schulz says:

Why can you just multiply the denominator by k!? When you actually have to divide the whole thing by k!?

45. Karthasis says:

What if n=k

46. Abdul Aziz says:

THIS IS ART !

47. Edward Liu says:

who else watching this has a test tomorrow?

48. Joseph Carmona says:

THANK YOU MY LORD

49. Jared Lombard says:

i think i love you 😀

50. Hossam Hamam says:

I don't know how to thank you but just say it

51. Haaey 11 says:

Lol, “In videos after this i’ll use other example rather than sitting chairs” 😂😂

52. Ellie Maristela says:

I got more confused now

53. Lindsay Weiler says:

Is there a faster way to figure out the answer if n is a larger number?

54. Diastro says:

Best Teacher! 😉

55. ashwini rode says:

Nice one!!!!

56. FPS TV says:

so EZ

57. Savukala says:

No matter how you explain it, this part of math will never make any intuitive sense.

58. Lilmeow BTS says:

You're the best! Thank you so much.

i dont think this helpful for me because it is not straight forward and it just mixes everything for me

60. S.D Fragoso says:

See, my homework says 45C3, and I'm not tryna write out 45!. I can't find a shortcut anywhere

61. Tanner Faircloth says:

Would have loved to just get a more concrete explanation of n and k instead

62. enes akar says:

I didn't understand where this things is coming for. I looked for books about it but there was even more advanced stuff that I can't understand but now, thanks to you I understand where it's coming from. Thank you, for all

63. Benne rosen says:

You could do 360/N • K

64. cesar col says:

thaaaaaaank youuuuu

65. The Mynor says:

Why are you talking about 4 seats for 6 people?

66. NestyPeach says:

I got it! Thank you (I didnt even cry this time!!!)

67. mikejonesnoreally says:

You had me at "C."  Funny how often that happens to me…..  =3

68. Joao Tompson da Silva Konno says:

you are actually the only person that was able to make me understand the combination formula id buy you a mince and cheese pie if i could

69. Lawrence Raoux says:

Thank you. I needed this.

70. Big Country says:

Sal is better than ANYBODY on youtube at EXPLAINING why you are doing these steps i literally surfed 3 dif videos to find out why we cross out the 2×1

71. Ali Comedy says:

What's thaaaat
Airplane 😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂
I can't understand anything

72. Derv says:

But why does the order matter though?

73. Rabia Arif says:

9:39"four" XD

74. Frederic Zacharias says:

He sounds like Phil dunphy

75. Amar Raja says:

why did we divide by k! instead of substracting by k! .,what is the logic behind that..
On many occasions I get confused by the usage of substraction and division in many formulas…

76. Bhupathi M says:

Very good way of explainning, Thanks much.

77. Amond Eve Casones says:

One of the greatest teachers/tutors to be born…

78. sufei says:

I get this concept, but cannot get how this applies to the probability of unrelated events, for example, coin flips. With only two outcomes, how does combination and permutation work to predict the unique/not unique times a certain number of heads/tails are in the final result? Someone help explain please.

79. Karthik B.V.A.S says:

1:25

80. Space Explorer says:

Thanks I understood this concept of 11th grade even though I m in 9th

81. a8lg6p says:

This video is exceptionally quiet.

Thanks a ton! You helped me my algorithm class!

83. Apsie Tese says:

I hate my discrete math teacher after watching this

84. Daniel Chakraborty says:

Thank you for explaining it very well. Appreciate it greatly!

85. Rokonuzzaman Rokon says:

Thanks

86. phil amras says:

Brilliant explanation. I never fully understood where this formula came from but now I do.

87. Linda Brown says:

Are you using 'k' in this video the same you used 'r' in the last video? Are they interchangeable?

88. Monstro Azul says:

89. Gerald Hoxha says:

What if there are k=9 seats and n=3 people? All the examples I saw on YouTube tells that the n (item) is greater than k (hole for example).
I make a thought experiment: Let's say we have a chessboard (10×10) and there are 3 items on it, how many combinations there are for all the items on the chessboard?
I'm so confused. Using the formula that is shown in the video, and swap k<->n in the formula, there are 504 combinations, which I think there are a lot more than that. If we don't swap k<->n, then it's undefined, because the factorial is defined only for positive integers and 0 (0! = ).

90. Albert Mendoza says:

Why divide it by the number of chairs factorial instead of just the number of chairs?? That's the only part where I am confused, therefore this whole combination thing.

91. Bhanusri Boddeda says:

If I want to know the combinations by 3 then k equal to 3 then formula is 6! /3! (6-3)!
Right or wrong

92. m. o. says:

great explanation, im preparing my own video about it

93. Martin Rudnikovski says:

xd

94. Project Spectre says:

Why is our formula in school n!/r!(n-r)! And not the one you showed us which is just (n-r)! . Thanks.

95. Taleb Mohamed Kheireddine says:

Thank you.

96. Sarujan Rupan says:

Omd thank you so much I was so lost until now

97. Rahul Kumar Sharma says:

Great teacher

98. Bholu Dubey says: