-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhistograms-jelly-bean.R
More file actions
25 lines (17 loc) · 873 Bytes
/
histograms-jelly-bean.R
File metadata and controls
25 lines (17 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(tidyverse)
dotdata <- list(sec4=data.frame(x=c(0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,5,5)/20),
sec5 = data.frame(x=c(1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,4,4,4,5,5,5,5,5,7)/20),
combined = data.frame(x=c(0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,4,4,4,5,5,5,5,5,7)/20))
dotdata[[1]]
length(dotdata$sec4)
length(dotdata$sec5)
length(dotdata$combined)
ggplot(data=dotdata$sec4) +
geom_histogram(aes(x=x)) +
xlim(0,1) + labs(title="Section 4 hhistogram of 24 different p_hat values", x="p_hat")
ggplot(data=dotdata$sec5) +
geom_histogram(aes(x=x)) +
xlim(0,1) + labs(title="Section 5 histogram of 24 different p_hat values", x="p_hat")
ggplot(data=dotdata$combined) +
geom_histogram(aes(x=x)) +
xlim(0,1) + labs(title="Histogram of all 48 different p_hat values", x="p_hat")