Results 1 to 8 of 8

Math Help - Confidence Intervals of Ratios

  1. #1
    Newbie
    Joined
    Jan 2008
    Posts
    9

    Question Confidence Intervals of Ratios

    Hello,
    I'm a PhD student and I'm a little embarrassed to be asking for Maths help on here, but there is something I couldn't find out by googling, so I figured I'll ask here.

    I have been running two sets of experiments, the first is a base line, and the second is hopefully an improvement on the first. I repeat each experiment many times and get a set of values, for example:

    first = ( 2, 3, 3, 2, 4, 2 ) mean = 2.67, stddev = 0.82, 95% interval = +/- 0.65
    second = (4, 5, 6, 5, 4, 5 ) mean = 4.83, stddev = 0.75, 95% interval = +/- 0.6

    Now I can work out a 95% confidence interval for both sets of values. In my report I've been writing that the first experiment on average is 2.67 +/- 0.65, and the second is 4.83 +/- 0.6. Thus the second experiment produces values 1.81 (4.83/2.67) higher (and better) than the first experiment. However I do not know what the confidence intervals would be on this (1.81) value.

    I had thought I could divide the intervals together for example the first min value divided by the second's min value. But I have a feeling this isn't right.

    Hopefully this has explained my problem, and that someone is able to help.
    Thanks
    Andrew

    P.S These are not the real values from my experiment and some I just made up, but I hopefully want to work out the confidence intervals for both discrete and continuous data.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    GAMMA Mathematics
    colby2152's Avatar
    Joined
    Nov 2007
    From
    Alexandria, VA
    Posts
    1,172
    Awards
    1
    If you compile the two data sets into one by using a ratio, then I suggest calculating a new standard deviation and sample mean. After you have that, you can then find your confidence intervals for whatever alpha you choose.

    Good question:
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2008
    Posts
    9
    wow thanks for the quick reply.

    Could you give me a quick example of what you mean with my data?

    thank you
    Andrew
    Follow Math Help Forum on Facebook and Google+

  4. #4
    GAMMA Mathematics
    colby2152's Avatar
    Joined
    Nov 2007
    From
    Alexandria, VA
    Posts
    1,172
    Awards
    1
    Quote Originally Posted by bramp View Post
    wow thanks for the quick reply.

    Could you give me a quick example of what you mean with my data?

    thank you
    Andrew
    first = ( 2, 3, 3, 2, 4, 2 ) mean = 2.67, stddev = 0.82, 95% interval = +/- 0.65
    second = (4, 5, 6, 5, 4, 5 ) mean = 4.83, stddev = 0.75, 95% interval = +/- 0.6

    You want to use ratios, correct?

    New Data Set = (0.5, 0.6, 0.4, 1, 0.4), Mean = 0.566666667, StDev = 0.225092574

    If you simply did ratios of the separate means and standard deviations, then you would get different results, specifically: Mean = 0.551724138, StDev = 1.084652289
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jan 2008
    Posts
    9
    Quote Originally Posted by colby2152 View Post
    New Data Set = (0.5, 0.6, 0.4, 1, 0.4), Mean = 0.566666667, StDev = 0.225092574
    Ok I see you took the first value from each set, work out the ratio, and continued with the second value and so on.

    However I might have not been clear. The first value in my set does not have to directly map to the first value of the second set. So for example if I sorted my data sets:

    first = ( 2, 2, 2, 3, 3, 4 ) mean = 2.67, stddev = 0.82, 95% interval = +/- 0.65
    second = (4, 4, 5, 5, 5, 6) mean = 4.83, stddev = 0.75, 95% interval = +/- 0.6

    Their means etc are still the same, however using your method the new data set would be:
    (0.5, 0.5, 0.4, 0.6, 0.6, 0.666666667) Mean = 0.544444444, StDev = 0.095839372
    and thus give me a different mean/stdev to the results being unordered.

    I may be wrong, but I'm unsure if your method works.

    If it helps I can give details of my experiment. I am running a network simulator that simulates packets flowing through a network. Now I've written a new network protocol that aims at improving the network some how. So I run different tests using a randomly generated workload with the old and new protocols and measure the number of packets generated.

    Now I run each experiment multiple times and at the end I have a mean number of packets for the old protocol experiments, and a mean number of packets for the new protocol experiments. I can then simply say that the new protocol has mean1 / mean2 more packets on average, but I would like the confidence intervals for that value.

    thanks
    Follow Math Help Forum on Facebook and Google+

  6. #6
    GAMMA Mathematics
    colby2152's Avatar
    Joined
    Nov 2007
    From
    Alexandria, VA
    Posts
    1,172
    Awards
    1
    Okay, so the data points are not correlated. I need some more information... are these small or large samples?

    If small, use the following for a confidence interval:

    \bar{x}-\bar{y} \pm t_{\alpha/2}(n+m-2)s_p\sqrt{\frac{1}{n}+\frac{1}{m}}

    where: s_p = \sqrt{\frac{(n-1)s_x^2+(m-1)s_y^2}{n+m-2}}

    If large, you can use the less cumbersome confidence interval:

    \bar{x}-\bar{y} \pm z_{\alpha/2}\sqrt{\frac{s^2_x}{n}+\frac{s^2_y}{m}}

    n, m are the sample sizes of the data sets where \bar{x}, \bar{y} are the respected sample means, and s^2_x, s^2_y are the respected sample standard deviations.

    In these cases, you would use the sample means and standard deviations that you first calculated seperately.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jan 2008
    Posts
    9
    Thanks for all the help, but I have now found the solution here:
    GraphPad QuickCalcs: error propagation calculator
    http://graphpad.com/FAQ/images/Ci%20of%20quotient.pdf

    What I needed to use was the Fieller's method to work out the confidence intervals.

    thanks
    Andrew
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by bramp View Post
    Hello,
    I'm a PhD student and I'm a little embarrassed to be asking for Maths help on here, but there is something I couldn't find out by googling, so I figured I'll ask here.

    I have been running two sets of experiments, the first is a base line, and the second is hopefully an improvement on the first. I repeat each experiment many times and get a set of values, for example:

    first = ( 2, 3, 3, 2, 4, 2 ) mean = 2.67, stddev = 0.82, 95% interval = +/- 0.65
    second = (4, 5, 6, 5, 4, 5 ) mean = 4.83, stddev = 0.75, 95% interval = +/- 0.6

    Now I can work out a 95% confidence interval for both sets of values. In my report I've been writing that the first experiment on average is 2.67 +/- 0.65, and the second is 4.83 +/- 0.6. Thus the second experiment produces values 1.81 (4.83/2.67) higher (and better) than the first experiment. However I do not know what the confidence intervals would be on this (1.81) value.

    I had thought I could divide the intervals together for example the first min value divided by the second's min value. But I have a feeling this isn't right.

    Hopefully this has explained my problem, and that someone is able to help.
    Thanks
    Andrew

    P.S These are not the real values from my experiment and some I just made up, but I hopefully want to work out the confidence intervals for both discrete and continuous data.
    Consider computing a bootstrap confidence interval (google for bootstrap)

    You construct a sample of the ratio of mean where the means are
    constructed by resampling from the samples with replacement.

    RonL
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Confidence intervals
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: August 12th 2009, 05:38 AM
  2. Confidence Intervals
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: August 8th 2009, 06:59 AM
  3. confidence intervals
    Posted in the Statistics Forum
    Replies: 1
    Last Post: August 6th 2009, 05:29 PM
  4. confidence intervals
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: October 16th 2008, 06:18 PM
  5. Confidence Intervals
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: July 31st 2008, 05:13 AM

Search Tags


/mathhelpforum @mathhelpforum