1
$\begingroup$

I am taking two measurements from subjects: measurement A and measurement B.

I have some strong theoretical reasons to think that my measurements of A and B should on average be the same as each other within any individual subject. However, there's considerable natural variation. Some people are high on A and low on B, and vice-versa.

I have been instructed to calculate $\log\frac{A}{B}$ for each person in the sample, and then average those $\log\frac{A}{B}$ values across the whole sample.

I know it's a mistake to assume the expected value of a ratio is the ratio of the expected values. So even if I assume that A and B are on average the same as each other, I can't assume that the expected value of $\frac{A}{B}$ is 1.

However, I thought that maybe I could get around this by taking the log. I thought that if I could assume A and B have the same expected value, then the expected value of $\log\frac{A}{B}$ really would be 0. Am I wrong about this?

If so, why? And is there any other transformation I could have done that would have created the desired effect of producing an expected value of 0 for the outcome variable?

I've repeated this process with several samples, and so far I've always ended up with a mean $\log\frac{A}{B}$ above 0.

$\endgroup$
  • 1
    $\begingroup$ Perhaps a more radical rethinking would be useful: why do you need to estimate an expectation of $A/B$ in the first place? Is it really relevant to your work? Quite possibly the expectation of $\log(A/B)$ would be more meaningful. $\endgroup$ – whuber Jul 19 '16 at 14:00
  • $\begingroup$ I strongly suspect that knowing the expectation of $\log\frac{A}{B}$ would be more meaningful for what I'm doing. Is there some easy way to work that out based on the values of A and B I observe in the data? $\endgroup$ – user1205901 - Reinstate Monica Jul 19 '16 at 14:04
  • 1
    $\begingroup$ Yes: since $\log(A/B)=\log(A)-\log(B)$, linearity of expectation implies $\mathbb{E}(\log(A/B))=\mathbb{E}(\log(A)) - \mathbb{E}(\log(B)).$ You can estimate the latter expectations by averaging the logs of the data. $\endgroup$ – whuber Jul 19 '16 at 14:10
5
$\begingroup$

It is possible to construct $A$ and $B$ that have the same expected values but for which $\log(A/B)$ has expected value very far from 0.

Consider a simple example, where $B$ always takes value 1 (expected value 1) and $A$ takes value 0.5 with probability 0.5 and takes value 1.5 with probability 0.5 (expected value 1). $A/B$ takes value 0.5 with probability 0.5 and takes value 1.5 with probability 0.5, so $\log(A/B)$ takes value $-0.693\ldots$ with probability 0.5 and value $0.405\ldots$ with probability 0.5. Therefore the expected value of $\log(A/B)$ is non-zero (negative).

Indeed the expected value of $\log(A/B)$ can be very far from 0. Consider if $A$ had instead taken value 0 with probability 0.5 and 2 with probability 0.5 (still expected value 1). Now $\log(A/B)$ takes value $-\infty$ with probability 0.5 and value $0.693\ldots$ with probability 0.5, meaning its expected value is $-\infty$. By flipping $A$ and $B$ in this example, we end up with a case where $\log(A/B)$ has expected value $\infty$.

Noting that $\log(A/B) = \log(A)-\log(B)$, $\mathbb{E}[\log(A/B)] = \mathbb{E}[\log(A)] - \mathbb{E}[\log(B)]$. Therefore, $\log(A/B)$ has expected value of 0 only when you have selected $A$ and $B$ such that $\log(A)$ and $\log(B)$ have the same expected value. This is true of some $A$ and $B$ with the same expected value but not others (as seen above).

$\endgroup$

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.