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:10] – [What if horse order doesn’t matter] hkimscilb:head_first_statistics:permutation_and_combination [2025/10/01 08:36] (current) – [exercises] hkimscil
Line 224: 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 229: 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 247: Line 254:
  
 b b
-b/a 
 </code> </code>
 <code> <code>
Line 260: Line 266:
 > b > b
 [1] 36 [1] 36
-> b/a 
-[1] 0.04545455 
  
 </code> </code>
Line 339: 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.1759273844.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki