Основи інференції в R
Jo Hardin
Instructor


| Підвищено | Без підвищення | Разом | |
|---|---|---|---|
| Чоловіки | 21 | 3 | 24 |
| Жінки | 14 | 10 | 24 |
| Разом | 35 | 13 | 48 |
disc <- data.frame(
promote = c(rep("promoted", 35), rep("not_promoted", 13)),
sex = c(rep("male", 21), rep("female", 14),
rep("male", 3), rep("female", 10)))
disc %>%
group_by(sex) %>%
summarize(promoted_prop = mean(promote == "promoted"))
# A tibble: 2 × 2
sex promoted_prop
<fctr> <dbl>
1 female 0.5833333
2 male 0.8750000
Перше перетасування
| Підвищено | Без підвищення | |
|---|---|---|
| Чоловіки | 18 | 6 |
| Жінки | 17 | 7 |







Основи інференції в R