Estimating the confidence interval in the combination of multiple groups 
Hello everyone
Assume that I have data as above.  The left-hand side describes the age distribution of a population.
On the right-hand side, I have the data of people come to check for a virus (say Covid-19).
So, there are 200 people of the age <20 came to virus-check, in which 20 are infected, and in 20 infected cases there are 2 deaths.
Now, if I assume the entire population is infected, what should be the 95% confidence interval of the number of deaths (there are 100 million people in the population).
We might assume that it is expensive and almost impossible to collect more data (testing for Covid-19 is expensive and time-consuming for instance).
 A: Given that you wish to construct confidence intervals assuming the entire population is infected, the infected people are the only ones worth considering. For each group, your number of deaths and those infected who have not died is not great enough to construct accurate confidence intervals, so I am going to find the interval for the all groups together, assuming the number of people that fall in each group is representative of the proportion of the population that fall in that group.
The sum of the infected column is 67 while the sum of the death column is 37. Therefore the predicted proportion of people infected is approximately 0.57.
Calculating the standard error:

And generating confidence intervals:

Given that you want 95% confidence intervals, we are looking for the z score that gives a result of 97.5% less than it on the normal distribution as excluding 2.5% either side will provide this result. Looking this up on a z-table gives a result of 1.96.

Therefore there is a 95% probability that the true proportion is between 0.451 and 0.689.
