1
$\begingroup$

I'm trying to describe mean differences between two populations $x_1$ and $x_2$, which are non-zero and positive. Their distribution is approximately beta with a positive skew. For example, with R:

# x1 <- round(rbeta(10, 1, 100)*1000, 1)
# x2 <- x1 + round(rbeta(10, 1, 100)*100, 1)
x1 <- c(1.7, 12.6, 22.3, 37.3, 15.2, 7.1, 31, 4.4, 9.5, 1.9)
x2 <- c(1.9, 14.2, 25.6, 39.2, 15.9, 8.7, 32.2, 7, 9.7, 1.9)

The two ways I can think of to determine the mean relative differences yield different numbers:

mean((x2 - x1)/x1)             # 0.1365628
(mean(x2) - mean(x1))/mean(x1) # 0.09300699

Why are they different, and which method is more descriptive of what I'm looking for? I.e., is $x_2$ 13.6% or 9.3% greater than $x_1$?

$\endgroup$
5
$\begingroup$

In the first formula, mean((x1 - x2)/x1) you are describing the differences between paired members of each group, (Wikipedia). Think of individuals before and after treatment.

In the second formula, (mean(x2) - mean(x1))/mean(x1), you are describing the differences between two, presumably independent, groups as a whole. Think of two independent samples.

Perhaps if you rephrase your question the answer will become apparent.

  1. What is the mean difference between individuals?
  2. What is the difference between the means of two groups?

It's difficult to determine what you are attempting from your example since x2 is derived from x1. From your description I would lean toward #2 since you mention 2 populations. However, from your R example I would lean to #1 since it looks like you are simulating some effect on individuals.

$\endgroup$
  • $\begingroup$ Thanks for reading in-between the lines. Yes, x1 and x2 are in fact time-series results of scenarios based on the same input data. Thus the first equation is more descriptive of describing the mean differences between individual days. $\endgroup$ – Mike T Jan 24 '12 at 20:30
4
$\begingroup$

They are different because of Jensen's inequality: an expected value of a nonlinear function is not equal to the nonlinear function of expected values.

I am not sure we can answer the question of what's better for you. If x1 is close to zero, then the first method would generate Cauchy normal variates, and if the population mean is zero, so would the second method. If both population means are zeroes, then whatever you do with them in terms of their ratios will end up as 0/0.

$\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.