Based off chapter 7 ModernDive. Code for quiz 11.
tactile_prop_red
# A tibble: 33 x 4
group replicate red_balls prop_red
<chr> <int> <int> <dbl>
1 Ilyas, Yohan 1 21 0.42
2 Morgan, Terrance 2 17 0.34
3 Martin, Thomas 3 21 0.42
4 Clark, Frank 4 21 0.42
5 Riddhi, Karina 5 18 0.36
6 Andrew, Tyler 6 19 0.38
7 Julia 7 19 0.38
8 Rachel, Lauren 8 11 0.22
9 Daniel, Caroline 9 15 0.3
10 Josh, Maeve 10 17 0.34
# ... with 23 more rows
ggplot(tactile_prop_red, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 50 balls that were red",
title = "Distribution of 33 proportions red")
#Segment 1
virtual_samples_26 <- bowl %>%
rep_sample_n(size = 2, reps = 1100)
#1.b
#1.c
ggplot(virtual_prop_red_26, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 26 balls that were red", title = "26")
#Segment 2
virtual_samples_57 <- bowl %>%
rep_sample_n(size = 57, reps = 1100)
#2.b
#2.c
ggplot(virtual_prop_red_57, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 57 balls that were red", title = "57")
#Segment 3
virtual_samples_110 <- bowl %>%
rep_sample_n(size = 110, reps = 1100)
#3.b
ggplot(virtual_prop_red_110, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 110 balls that were red", title = "110")
#Standard deviation of n=26
#Standard deviation of n=57
#standard deviation of n=110