Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    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
    Offline

    13
    ReputationRep:
    (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}.
    • Thread Starter
    Offline

    0
    ReputationRep:
    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.
    • Thread Starter
    Offline

    0
    ReputationRep:
    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
    Offline

    13
    ReputationRep:
    (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))
    • Thread Starter
    Offline

    0
    ReputationRep:
    This is brilliant, and it works a treat. When I've finished my project I'll have to remember to post it here
    Offline

    13
    ReputationRep:
    (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.
 
 
 
  • 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.

  • Poll
    Have you ever participated in a Secret Santa?
    Useful resources

    Make your revision easier

    Maths

    Maths Forum posting guidelines

    Not sure where to post? Read the updated guidelines here

    Equations

    How to use LaTex

    Writing equations the easy way

    Student revising

    Study habits of A* students

    Top tips from students who have already aced their exams

    Study Planner

    Create your own Study Planner

    Never miss a deadline again

    Polling station sign

    Thinking about a maths degree?

    Chat with other maths applicants

    Can you help? Study help unanswered threads

    Groups associated with this forum:

    View associated groups
  • 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.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.