User Tools

Site Tools


b:head_first_statistics:permutation_and_combination

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
b:head_first_statistics:permutation_and_combination [2025/10/01 08:04] – [What if horse order doesn’t matter] hkimscilb:head_first_statistics:permutation_and_combination [2025/10/01 08:36] (current) – [exercises] hkimscil
Line 202: Line 202:
 {{:b:head_first_statistics:pasted:20191015-084051.png}} {{:b:head_first_statistics:pasted:20191015-084051.png}}
  
-$\displaystyle {^{n} P_{r}$ +\begin{eqnarray*
-$\displaystyle ^{n} P_{r} = \displaystyle \frac {n!} {(n-r)!}$+\displaystyle ^{n} P_{r} = \displaystyle \dfrac {n!} {(n-r)!} \\ 
 +\end{eqnarray*} 
 A **permutation** is the number of ways in which you can choose objects from a pool, and **where the order in which you choose them counts**. It’s a lot more specific than a combination as you want to count the number of ways in which you fill each position. A **permutation** is the number of ways in which you can choose objects from a pool, and **where the order in which you choose them counts**. It’s a lot more specific than a combination as you want to count the number of ways in which you fill each position.
  
- +\begin{eqnarray*} 
-$\displaystyle ^{n} C_{r}+\displaystyle ^{n} C_{r} & = & \displaystyle \dfrac {^{n} P_{r}} {r!} \\ 
-$\displaystyle ^{n} C_{r} = \displaystyle \frac {n!} {r! \cdot (n-r)!}$+\displaystyle \frac {n!} {r! \cdot (n-r)!} \\ 
 +\end{eqnarray*}
 A **combination** is the number of ways in which you can choose objects from a pool, **without caring about the exact order in which you choose them**. It’s a lot more general than a permutation as you don’t need to know how each position has been filled. It’s enough to know which objects have been chosen. A **combination** is the number of ways in which you can choose objects from a pool, **without caring about the exact order in which you choose them**. It’s a lot more general than a permutation as you don’t need to know how each position has been filled. It’s enough to know which objects have been chosen.
  
Line 221: Line 224:
  
 <WRAP box> <WRAP box>
 +$ {}_{52} P _{5} $
 <code> <code>
 # only combination function is available in r, choose # only combination function is available in r, choose
Line 226: Line 230:
 > choose(52,5) > choose(52,5)
 [1] 2598960 [1] 2598960
-perm <- function(n,r) { choose(n,r)*factorial(r)} +permute <- function(n,r) {  
-perm(52, 5)+>   choose(n,r) * factorial(r)  
 +
 +permute(52, 5)
 > [1] 311875200 > [1] 311875200
 +> # or 
 +> factorial(52)/factorial(52-5)
 +[1] 311875200
 +
 </code> </code>
 </WRAP> </WRAP>
- +답. 12명 중에서 순서는 상관없는 5명이므로  
 +${}_{12} C _{5} $
 <code> <code>
 ## n! / r!(n-r)! ## n! / r!(n-r)!
Line 244: Line 254:
  
 b b
-b/a 
 </code> </code>
 <code> <code>
Line 257: Line 266:
 > b > b
 [1] 36 [1] 36
-> b/a 
-[1] 0.04545455 
  
 </code> </code>
Line 336: Line 343:
 <code> <code>
 > # 6C4 * 4C3 * 7! > # 6C4 * 4C3 * 7!
-> choose(6,4) * choose(4,3) * (4+3) +> choose(6,4) * choose(4,3) * factorial(4+3) 
-[1] 420+[1] 311875200
  
 </code> </code>
b/head_first_statistics/permutation_and_combination.1759273498.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki