Election season is coming soon, and polls frequently have a "margin of error" associated with their results (e.g. there are 2 candidates, and there's a survey, and candidate A is the favorite of 52% of the surveyed, and candidate B is the favorite of 48%. But the margin of error is 3%).
Trying to understand how this "margin of error" is calculated I searched the internet and came across this article. The article says that:
Standard error of the sample multiplied by the critical value = margin of error
This article contains the example below, but it doesn't solve it step by step. This seems to be an example of Binomial data (please correct me if I'm wrong). How did they arrive at a margin of error equal to 2%? (in particular, how's standard error of the sample calculated, and the critical value decided-on, here?).
A publishing company wants to survey its customers to see whether they prefer to read an e-book or a physical book. The company has roughly one million customers in its database. Since the company cannot realistically survey all one million individuals, they gather a random sample from 3,000 customers representing the full customer base.
After completing the survey, the data shows that 2,000 out of 3,000 customers prefer physical books (2000 / 3000 = .67 or 67%). Using a level of confidence of 95%, they can determine that the margin of error is 2%. Anything between 65% and 69% (67% +/- 2) accurately describes the entire customer database. The company can then assume that if they continued to survey the remaining population of their customer base, they would find that 65% to 69% of individuals would rather read a physical book than an ebook.