First, my question.
I have 20 data points of a baseline ($b$) and 20 data points of a faster version ($f$).

I currently present $\frac{\bar{b}}{\bar{f}}$ in a bar graph in which I'd like to add error bars yet I'm unsure how to produce the standard error/standard deviation to show.

I tried looking around for answers but found them to be referring to slightly different questions than mine. Two posts [1, 2] here suggest Fieller's theorem, though the response to the first question suggest that there's a "simple" way to just calculate $sd(\frac{\bar{b}}{\bar{f}})$. The wikipedia page on Fieller's theorem suggests that it's necessary because the values may be in different units, suggesting to me at least that there's another, simpler way if they're both in the same units (which they are: ms).

My supervisor suggested pairing the times to calculate speedups and then taking the standard deviation of those but that feels wrong because there's no connection through which to justify the pairings.

  • 1
    $\begingroup$ The quick answer is to use bootstrap, but: 1) what happens if $\bar{f}=0$? 2) $\bar{b}/\bar{f}$ is just one number, so what are you putting in your bar graph? If there is no natural pairing, then your supervisor is dead wrong about pairing values. $\endgroup$ – Dave Mar 3 '20 at 23:30
  • $\begingroup$ 1) $\bar{f}$ will always be a time greater than zero. 2) I have multiple $\bar{f}$, I was just trying to simplify for the sake of the question. Do you have a link for bootstrap? $\endgroup$ – Braaedy Mar 3 '20 at 23:44
  • $\begingroup$ If you have multiple $\bar{f}$ then I’m very concerned about what you’re doing. What are your data? What are your goals? $\endgroup$ – Dave Mar 4 '20 at 0:10
  • $\begingroup$ if you are calculating a ratio this suggests a logarithmic transform might be appropriate anyway, and $\log(b)$ - $\log(f)$ is easier to calculate a standard error for. you could then back-transform a confidence interval if you wanted the ratio estimate on the natural scale. $\endgroup$ – George Savva Mar 4 '20 at 0:45
  • $\begingroup$ @Dave Speedup. I have a baseline process completed in $\bar{b}$ milliseconds, and then four improved versions of the process completed in $\bar{f}_1, \bar{f}_2, \bar{f}_3, \bar{f}_4$ ms. ${speedup}_i=\frac{\bar{b}}{\bar{f}_i}$. I plot ${speedup}_i$ and am looking to add error bars corresponding to $sd({speedup}_i)$ $\endgroup$ – Braaedy Mar 4 '20 at 21:41

Since your data are strictly positive (corresponding to times), and you are trying to estimate a ratio, then it is likely that a log-transformation will help you.

Estimating the log-ratio is easier than estimating the ratio, because it is estimated by the difference of the logs of the two groups. So you could use for example a standard t-test to get the estimate and its standard error.

This standard error will allow you to create a confidence interval for the log-ratio. You can then take the anti-log of the estimate and confidence interval to get an estimate and confidence interval for the ratio you were interested in. The confidence interval won't be symmetric about the estimate, but you shouldn't necessarily expect it to be.

You should check that your data satisfy the assumptions of whatever test or model you use for estimation, but in my experience using a log transform of times leads to more 'normal' residuals and more equal variances between groups than would be the case if you just used the times with no transformation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.