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
Last revisionBoth sides next revision
b:head_first_statistics:permutation_and_combination [2019/10/28 11:35] – [e.g.] hkimscilb:head_first_statistics:permutation_and_combination [2023/10/11 08:15] – [e.g.] hkimscil
Line 1: Line 1:
 +====== Permutation and Combination ======
 +순열과 조합
 ====== Permutation ====== ====== Permutation ======
 +
 세마리 말이 들어오는 순서 세마리 말이 들어오는 순서
 {{:b:head_first_statistics:pasted:20191015-073815.png}} {{:b:head_first_statistics:pasted:20191015-073815.png}}
Line 69: Line 72:
 b, a2, a1 b, a2, a1
  
-n! p! q! +$$ \frac {n!} {p! q!} $$
  
 +<BOOKMARK:arranging_group>
 {{:b:head_first_statistics:pasted:20191015-075959.png}} {{:b:head_first_statistics:pasted:20191015-075959.png}}
 +
 6 horses 6 horses
 2 groups 3 horses per each group 2 groups 3 horses per each group
 +
 +{{:b:head_first_statistics:pasted:combination.arranging.duplicates.png}}
  
 <code> <code>
Line 88: Line 94:
 {{:b:head_first_statistics:pasted:20191015-080318.png}} {{:b:head_first_statistics:pasted:20191015-080318.png}}
 {{:b:head_first_statistics:pasted:20191015-081850.png}} {{:b:head_first_statistics:pasted:20191015-081850.png}}
 +
 +<WRAP box>
 +X = {a a b c c c} 라면?
 +n(X) = 6 이므로 총 6! 
 +a가 둘, c가 셋으로 묶이므로
 +6! / (2! * 3!)
 += 6*5*2 = 60
 +
 +
 +</WRAP>
  
 <WRAP box> <WRAP box>
Line 150: Line 166:
 C A C A
  
 +\begin{eqnarray*}
 +_{3}P_{2} & = & \frac{3!}{(3-2)!} \\
 + & = & \frac {3!}{(3-2)!} = 6
 +\end{eqnarray*}
 +
 +Among the two, the order doesn't matter. Then, we follow the same logic as [[#arranging_group|the above]]
 2 representatives 2 representatives
 A B | B A A B | B A
Line 156: Line 178:
  
 \begin{eqnarray*} \begin{eqnarray*}
-_{3}C_{2} * 2! & = & _{3}P_{2} \\ +\text{Answer we want} & = & \frac {_{3}P_{2}}{2!} \\ 
-_{3}C_{2} & = & \frac {_{3}P_{2}}{2!} \\+\text{We call this} & = &  _{3}C_{2}  \\
 _{3}C_{2} & = & \frac {\frac{3!}{(3-2)!}} {\frac {2!} {1}} \\ _{3}C_{2} & = & \frac {\frac{3!}{(3-2)!}} {\frac {2!} {1}} \\
-_{3}C_{2} & = & \frac {3!}{2! * (3-2)!} = 6+_{3}C_{2} & = & \frac {3!}{2! * (3-2)!} = 3
 \end{eqnarray*} \end{eqnarray*}
  
Line 195: Line 217:
 2. The coach classes 3 of the players as expert shooters. What’s the probability that all 3 of these players will be on the court at the same time, if they’re chosen at random? 2. The coach classes 3 of the players as expert shooters. What’s the probability that all 3 of these players will be on the court at the same time, if they’re chosen at random?
 </WRAP> </WRAP>
 +
 <code> <code>
 ## n! / r!(n-r)! ## n! / r!(n-r)!
Line 233: Line 256:
 A flush is where all 5 cards belong to the same suit. What’s the probability of getting this? A flush is where all 5 cards belong to the same suit. What’s the probability of getting this?
 </WRAP> </WRAP>
 +{{https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/Piatnikcards.jpg/1920px-Piatnikcards.jpg?800}} 
 +see [[wp>List_of_poker_hands]] 
 +[{{https://upload.wikimedia.org/wikipedia/commons/thumb/e/e2/A_studio_image_of_a_hand_of_playing_cards._MOD_45148377.jpg/1024px-A_studio_image_of_a_hand_of_playing_cards._MOD_45148377.jpg?400}}]
 <code> <code>
 +## 52장의 카드 중에서 5장 고를 조합은
 factorial(52)/(factorial(5)*factorial(52-5)) factorial(52)/(factorial(5)*factorial(52-5))
-## there are four cases for the royal flush +all <- factorial(52)/(factorial(5)*factorial(52-5)) 
-4 / (factorial(52)/(factorial(5)*factorial(52-5))) +## royal flush = 10, 11, 12, 13, 1 각 문양 
-## four cards = 13 ways+## 즉, 4가지. 따라서 전체 조합 중 4가지만 해당됨 
 +4 / all 
 + 
 +## four cards = 13 가지 
 +## {1,1,1,1} {2,2,2,2} . . . . {13,13,13,13} = 13 가지 
 +## 그리고 나머지 한장은 4장을 제외한 48장에서 조합되는 것이니
 13 * (52-4)  13 * (52-4) 
-## four cards out of five cards +## 위의 숫자가 four of a kinds에 해당되는 경우의 수 
-(13 * (52-4)) / (factorial(52)/(factorial(5)*factorial(52-5))) +## 따라서 그 확률은 four cards out of five cards 
-## 13 개 같은 모양 중에서 5개가 나올 확률이 4 종류가 있으니+(13 * (52-4)) / all 
 + 
 +## 13 개 같은 모양 중에서 5개가 나올 조합은 13C5 
 +## 그리고, 모양이 4 종류가 있으니 * 4를 하면
 4 * (factorial(13)/(factorial(5)*factorial(13-5))) 4 * (factorial(13)/(factorial(5)*factorial(13-5)))
 +## 그 확률은 
 +(4 * (factorial(13)/(factorial(5)*factorial(13-5)))) / all
  
 </code> </code>
  
 <code> <code>
 +> ## 52장의 카드 중에서 5장 고를 조합은
 > factorial(52)/(factorial(5)*factorial(52-5)) > factorial(52)/(factorial(5)*factorial(52-5))
 [1] 2598960 [1] 2598960
-4 / (factorial(52)/(factorial(5)*factorial(52-5)))+all <- factorial(52)/(factorial(5)*factorial(52-5)) 
 +> ## royal flush = 10, 11, 12, 13, 1 각 문양 
 +> ## 즉, 4가지. 따라서 전체 조합 중 4가지만 해당됨 
 +> 4 / all
 [1] 1.539077e-06 [1] 1.539077e-06
 +
 +> ## four cards = 13 가지
 +> ## {1,1,1,1} {2,2,2,2} . . . . {13,13,13,13} = 13 가지
 +> ## 그리고 나머지 한장은 4장을 제외한 48장에서 조합되는 것이니
 > 13 * (52-4)  > 13 * (52-4) 
 [1] 624 [1] 624
-> (13 * (52-4)) / (factorial(52)/(factorial(5)*factorial(52-5)))+> ## 위의 숫자가 four of a kinds에 해당되는 경우의 수 
 +> ## 따라서 그 확률은 four cards out of five cards 
 +> (13 * (52-4)) / all
 [1] 0.000240096 [1] 0.000240096
  
 +> ## 13 개 같은 모양 중에서 5개가 나올 조합은 13C5
 +> ## 그리고, 모양이 4 종류가 있으니 * 4를 하면
 > 4 * (factorial(13)/(factorial(5)*factorial(13-5))) > 4 * (factorial(13)/(factorial(5)*factorial(13-5)))
 [1] 5148 [1] 5148
 +> ## 그 확률은
 +> (4 * (factorial(13)/(factorial(5)*factorial(13-5)))) / all
 +[1] 0.001980792
 +
 </code> </code>
  
  
b/head_first_statistics/permutation_and_combination.txt · Last modified: 2023/10/11 08:16 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki