6.21 National Health Plan, Part III. Exercise 6.11 presents the results of a poll evaluating support for a generically branded “National Health Plan” in the United States. 79% of 347 Democrats and 55% of 617 Independents support a National Health Plan.
nD <- 347
nI<- 617
pD <- 0.79
pI <- 0.55
# Point estimate = pD - pI
PE <- pD -pI
# SE <- sqrt((p * (1-p))/n)
SE <- sqrt(((pD * (1-pD))/nD) + ((pI * (1-pI))/nI))
#Z score for 95% CI = 1.96
#ME for 95% CI = 1.96*SE
ME <- 1.96 * SE
lower <- PE-ME
upper <- PE+ME## [1] 0.1818824
## [1] 0.2981176
TRUE : We see the confidence interval range is (0.1818824, 0.2981176) which doesn’t include 0 so it is more likely that Democrat would support the National health plan than the Independent