Tuesday
University of Portland
Section 4.8, #1, 2, 3, 5
What are your questions?
Visualizations: Bar graphs, mosaic graphs, pie charts, waffle charts
Summary statistics: proportions
# A tibble: 268,166 × 3
vaccine age outcome
<chr> <chr> <chr>
1 Vaccinated <50 died
2 Vaccinated <50 died
3 Vaccinated <50 died
4 Vaccinated <50 died
5 Vaccinated <50 died
6 Vaccinated <50 died
7 Vaccinated <50 died
8 Vaccinated <50 died
9 Vaccinated <50 died
10 Vaccinated <50 died
# ℹ 268,156 more rows
died | survived | ||
---|---|---|---|
Unvaccinated | 250 | 150802 | 151052 |
Vaccinated | 447 | 116637 | 117084 |
697 | 267439 | 268136 |
Can easily calculate proportions from this table. E.g. proportion of vaccinated patients that died: \[
\frac{447}{117084} = 0.004
\]
Convert each entry to a proportion of either column or row total.
E.g. row proportions gives proportion of all vaccinated/unvaccinate patients that died
died | survived | ||
---|---|---|---|
Unvaccinated | 0.002 | 0.998 | 1 |
Vaccinated | 0.004 | 0.436 | 1 |
Visualize one (or more) categorical variables
Similar to bar charts
can be difficult to interpret
What is the relative frequency of Respiratory conditions?