Confidence Interval (CI): Range of values that is to contain the true population parameter (mean, proportion) with certain level of confidence
Margin of Error (ME): Amount of uncertainty/ potential error our estimate or Confidence Interval
Relationship between Confidence Interval and Margin of Error:
CI = Sample statistic ± Margin of error
Example:
Let us assume that we are have a population who had voted for this year’s central election
We have drawn 100 sample from the large population and say 54% of them have voted for BJP
So, n=100, sample proportion/sample mean = sp = 0.54
Now we want to see how close this sample proportion (sp) to population proportion
Note that, the sample proportion will change when we take different sample size, because it is not true population proportion, it is just sample proportion
Now how much deviation/error is there between sample and population proportion?
We know that from Empirical rule of normal distribution, approximately 95% of the data points fall within two standard deviations (2σ) of the mean
So lets calculate Standard deviation
From central limit theory, mean of sample distribution is distributed normally, thus mean of population (P) = sample mean distribution (Ps)
P = Ps
Standard deviation ofsample mean distribution = σ_s = σ / √n
From the proportion, sample standard deviation = √(P*(1-P)/ √n = σ_s
σ_s = σ / √n = √(P*(1-P)/ √n
We can estimate the standard deviation by replacing population proportion with sample proportion
(it’s just an estimate because we don’t know the value of population proportion P, so we replace it by Ps)
σ_s = σ / √n = √( Ps *(1- Ps)/ √n = √( 0.54 *(1- 0.54)/ √100 = ~0.05
So, we could be 95% confident that true population proportion is two standard deviations (2σ) of the mean
P = Mean ± 2 * Standard deviation
P = Ps ± 2 * Standard deviation
P = 0.54 ± 2 * 0.05 = 0.54 ± 0.1
P = 0.44 and 0.64, population proportion for BJP is in the range of 44% to 66%
Here, 0.1 is called margin of error, 0.54 is sample statistic Identifying a good sample size for the experiment