Jim2835
Badges: 0
Rep:
?
#1
Report Thread starter 5 years ago
#1
Hi everyone. New here and in need of help. Really hope I manage to explain this properly.

Is it possible to calculate a confidence interval for a number which is the result of dividing one number by another, each with their own confidence intervals?

I'm measuring proportions of two populations. Then I'm creating a hybrid metric called an index, which is one proportion divided by the other. Can we say what the confidence interval of that index is?

I'll try an example. Let's say from a sample we find that 20% of all adults eat cake, plus or minus 2% (at 95% confidence level). And we also find that 24% of women eat cake, plus or minus 4% (at 95% confidence level). The "index" for women is 24% / 20% = 1.2. What I want to know is, can we give upper and lower bounds for this index?

I know one simple approach would be to take the upper bound of the 24% and the lower bound of the 20% to get the upper bound of the index. And vice versa. But what's the confidence level of the new number? It's not 95% is it? It must be somewhere south of 95%. By extension, if I want my index to have a confidence level of 95%, then presumably that widens the interval.

I need something with a bit more rigour....

Many thanks in advance.

Jim
0
reply
Gregorius
Badges: 14
Rep:
?
#2
Report 5 years ago
#2
(Original post by Jim2835)
Hi everyone. New here and in need of help. Really hope I manage to explain this properly.

Is it possible to calculate a confidence interval for a number which is the result of dividing one number by another, each with their own confidence intervals?

I'm measuring proportions of two populations. Then I'm creating a hybrid metric called an index, which is one proportion divided by the other. Can we say what the confidence interval of that index is?

I'll try an example. Let's say from a sample we find that 20% of all adults eat cake, plus or minus 2% (at 95% confidence level). And we also find that 24% of women eat cake, plus or minus 4% (at 95% confidence level). The "index" for women is 24% / 20% = 1.2. What I want to know is, can we give upper and lower bounds for this index?

I know one simple approach would be to take the upper bound of the 24% and the lower bound of the 20% to get the upper bound of the index. And vice versa. But what's the confidence level of the new number? It's not 95% is it? It must be somewhere south of 95%. By extension, if I want my index to have a confidence level of 95%, then presumably that widens the interval.

I need something with a bit more rigour....

Many thanks in advance.

Jim
This sort of thing is frequently done in epidemiology, where one is concerned with the calculation of risk ratios and rate ratios (where the risks and the rates can be expressed as proportions).

So if you have x_1 out of n_1 in your first sample and x_2 out of n_2 in your second sample, then the obvious estimate of your index is

\displaystyle \hat{\theta}= \frac{x_1/n_1}{x_2/n_2}

and the variance of its logarithm is approximately

\displaystyle V(\log \hat{\theta}) = \frac{1}{x_1} - \frac{1}{n_1} + \frac{1}{x_2} - \frac{1}{n_2}

Take the square root of this to get the standard error of  \log \hat{\theta} and then form

\displaystyle \log \hat{\theta} \pm 1.96 \times SE(\log \hat{\theta})

This gives you an approximate 95% confidence interval around \log \hat{\theta}. You then exponentiate this to get your 95% confidence interval around \hat{\theta}.
0
reply
Jim2835
Badges: 0
Rep:
?
#3
Report Thread starter 5 years ago
#3
Thank you so much - I'll have a read tonight. I might need one or two of those steps fleshing out for me a little.
0
reply
Jim2835
Badges: 0
Rep:
?
#4
Report Thread starter 5 years ago
#4
Hi Gregorious

I'm really grateful for your answer but just struggling to put it to work. I'm doing my work in Microsoft Excel and trying to create a formula which encapsulates the solution you gave me. I don't suppose you could help could you? I just need a single formula (or broken down into stages if necessary) which has as inputs the proportion and sample size of each of the samples, and has as outputs the index and its confidence interval. Is that do-able?

Jim
0
reply
Gregorius
Badges: 14
Rep:
?
#5
Report 5 years ago
#5
(Original post by Jim2835)
Hi Gregorious

I'm really grateful for your answer but just struggling to put it to work. I'm doing my work in Microsoft Excel and trying to create a formula which encapsulates the solution you gave me. I don't suppose you could help could you? I just need a single formula (or broken down into stages if necessary) which has as inputs the proportion and sample size of each of the samples, and has as outputs the index and its confidence interval. Is that do-able?

Jim
No problem.

So, as inputs, I'm assuming that you have proportions p_1, p_2 out of two groups of size n_1, n_2.

Step 1: Calculate the numbers x_1, x_2 in the two groups that correspond to the proportions p_1, p_2. So,

\displaystyle x_1 = p_1 \times n_1
\displaystyle x_2 = p_2 \times n_2

These should end up being integers, but don't worry if they're not quite (due to rounding error).

Step 2: Calculate the estimate of the index:

 \displaystyle \hat{\theta} = \frac{x_1/n_1}{x_2/n_2} = \frac{p_1}{p_2}

Step 3: Calculate the natural logarithm of the index  \log \hat{\theta}

Step 4: Calculate

 \displaystyle C = 1.96 \times \sqrt \left(\frac{1}{x_1} - \frac{1}{n_1} + \frac{1}{x_2} - \frac{1}{n_2}\right)

Step 5: Calculate

\displaystyle L = \log \hat{\theta} - C
\displaystyle R = \log \hat{\theta} + C

Step 6: The 95% confidence interval around your estimate \hat{\theta} is:

\displaystyle (\exp(L), \exp(R))
0
reply
Jim2835
Badges: 0
Rep:
?
#6
Report Thread starter 5 years ago
#6
This is brilliant, and it works a treat. When I've finished my project I'll have to remember to post it here
0
reply
Gregorius
Badges: 14
Rep:
?
#7
Report 5 years ago
#7
(Original post by Jim2835)
This is brilliant, and it works a treat. When I've finished my project I'll have to remember to post it here
Excellent! Look forward to seeing it.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Should the school day be extended to help students catch up?

Yes (21)
30%
No (49)
70%

Watched Threads

View All