# How to calculate the confidence interval for a combination of a proportion and continuous data

I want to calculate the 95% confidence interval for a combination of binary data and continuous data.

Lets say I want to estimate the production of a certain item from all factories of a given country. I know the size of the population (1000) and take a sample of size 50 for example.

Out of the 50, say 10 produce item A. The 95% CI of that proportion would be 20% +- 8.3% i.e. 11.7% - 28.3%

If the values for item A are: 100, 80, 120, 200, 150, 90, 110, 190, 180, 120 The mean would be: 134 SEM: 13.7 and 95% CI would reach from 103 - 164

My Question is now: the best guess for the population production of item A is 20% * 134 so for all 1000 factories 134 * 200 (20% of 1000) but how about the 95% CI.

Do I take the minimum of both calculations i.e. 11.7% * 1000 * 103 and the maximum of both i.e.: 28.3% * 1000 * 164

It feels like I would include the maximum uncertainty and making the 95% CI to wide. But if I only use the mean proportion for both i.e. 20% * 1000 * 103 for min and 20% *1000 * 164 for max I feel like missing the second source of variance.

Doing 11.7% * 134 (mean production of A) * 1000 till 28.3% * 134 * 1000 doesnt seem to be right either.

Any thoughts?