b:head_first_statistics:permutation_and_combination
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
b:head_first_statistics:permutation_and_combination [2023/10/11 08:08] – [e.g.] hkimscil | b:head_first_statistics:permutation_and_combination [2024/10/01 22:40] (current) – [e.g.] hkimscil | ||
---|---|---|---|
Line 106: | Line 106: | ||
<WRAP box> | <WRAP box> | ||
- | __<fc # | + | __<fc # |
1. How many ways are there of finishing the race if we’re interested in individual animals? | 1. How many ways are there of finishing the race if we’re interested in individual animals? | ||
Line 217: | 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 box> | ||
+ | < | ||
+ | # only combination function is available in r, choose | ||
+ | # for permutation | ||
+ | > choose(52, | ||
+ | [1] 2598960 | ||
+ | > perm <- function(n, | ||
+ | > perm(52, 5) | ||
+ | > [1] 311875200 | ||
+ | </ | ||
+ | </ | ||
+ | |||
< | < | ||
Line 257: | Line 270: | ||
</ | </ | ||
{{https:// | {{https:// | ||
+ | see [[wp> | ||
+ | {{https:// | ||
< | < | ||
## 52장의 카드 중에서 5장 고를 조합은 | ## 52장의 카드 중에서 5장 고를 조합은 | ||
factorial(52)/ | factorial(52)/ | ||
- | all <- factorial(52)/ | + | all2 <- factorial(52)/ |
+ | all2 | ||
+ | # or | ||
+ | all <- choose(52, 5) | ||
+ | all | ||
## royal flush = 10, 11, 12, 13, 1 각 문양 | ## royal flush = 10, 11, 12, 13, 1 각 문양 | ||
## 즉, 4가지. 따라서 전체 조합 중 4가지만 해당됨 | ## 즉, 4가지. 따라서 전체 조합 중 4가지만 해당됨 |
b/head_first_statistics/permutation_and_combination.1696979301.txt.gz · Last modified: 2023/10/11 08:08 by hkimscil