# Tag Info

0

I have known what exactly I have done wrongly. The exact solution in R is as follows: dif=(New-Old) m=mean(dif) st=sd(dif) CI=m+c(-1,1)*qt(0.975,4)*st *sqrt(1/5) ExpCI=exp(CI) # equals [0.09 2.49] MEAN=mean(ExpCI) # equals 1.29

3

You calculated the mean of logarithms of ratios, not the mean of ratios themselves. To obtain ratios from their logarithms, you have to raise $e$ to power of them. In Python and NumPy: import numpy as np logs = [1.304, -0.768, -0.473, 1.237, 2.405] # Logarithms of ratios ratios = np.exp(logs) # You omitted this! np.mean(...

3

If you have datapoints $x_1, \ldots, x_n$ and $y_1, \ldots, y_n$ and you want to find the mean ratio $\frac{1}{n} \sum_{i=1}^n \frac{x_i}{y_i}$, this is not equal to the exponentiated mean of the log ratios. In other words, this is not the same as computing $\exp\left(\frac{1}{n}\sum_{i=1}^n \log \frac{x_i}{y_i}\right)$, which is what it sounds like you are ...

Top 50 recent answers are included