#Democrats
p.1 <- .70
n.1 <- 819
#Independents
p.2 <- .42
n.2 <- 783se <- sqrt((p.1*(1-p.1)/n.1)+(p.2*(1-p.2)/n.2))pt.est <- p.1 - p.2ci.upper <- pt.est + se
ci.lower <- pt.est - se
ci <- c(ci.lower, ci.upper)
ci## [1] 0.2561773 0.3038227
TRUE. The confidence interval does not include 0. Therefore, it is likely that Democrats support the public option than the Independent.