I know that my 95% confidence interval can be calculated for a proportion using:
$$ 1.96 \times \sqrt{p(\frac{1-p}{n})} $$
where $p$ is the proportion and $n$ is the number of trials.
But if my data is collected in a series of datasets (say, annual data collections), does this change my $n$? For example, if my data is framed:
Year | TRUE | n |
---|---|---|
2010 | 14 | 25 |
2011 | 17 | 25 |
2012 | 15 | 25 |
2013 | 11 | 25 |
2014 | 15 | 25 |
Do I calculate a total $p=\frac{14+17+15+11+15}{25\times5}=0.576$ and use:
$n=5$ because data was collected in five seperate experiments? $$ 1.96 \times \sqrt{0.576(\frac{1-0.576}{5})} $$
$n=125$ because data was collected on 125 events? $$ 1.96 \times \sqrt{0.576(\frac{1-0.576}{125})} $$
Furthermore, say there was an extra variable, $x$, for which I wanted to calculate a seperate proportion for ($\frac{\text{TRUE}}{x}$). Say $x$ represents the total number of job openings available and $n$ is the total applications, so $\frac{\text{TRUE}}{n}$ would be the job acceptance rate and $\frac{\text{TRUE}}{x}$ would be the positions filled rate:
Year | TRUE | n | x |
---|---|---|---|
2010 | 14 | 25 | 20 |
2011 | 17 | 25 | 20 |
2012 | 15 | 25 | 20 |
2013 | 11 | 25 | 20 |
2014 | 15 | 25 | 20 |
Would my $n$ for calculating my confidence interval for $\frac{\text{TRUE}}{x}$ still use the total from the $n$ column (either $5$ or $125$) or would it be the total from the $x$ column (either $5$ or $100$)?