# When to use Mean(X/Y) versus Mean(X)/Mean(Y)?

So, I understand that for two vectors of numbers X and Y the mean of X/Y is different from the mean of X divided by the mean of Y. But I'm not sure when it is appropriate to use each. Specifically, I need to calculate the average consumption per days active for a set of individuals, and I don't know which approach to use.

To illustrate, say there are 3 individuals: A, B, and C. Their consumption values are (1,3,7) respectively, and their days active are (3, 1, 6) respectively. If I individually calculate their consumption per days active I get 1/3, 3, and 7/6, which I can then take the mean of to get 1.5. But if I sum their consumption (11) and their active days (10) and then work out consumption per active days, I get 1.1. Which approach is 'correct'?

I hope I've expressed this ok, I wasn't really sure what the title should be which is why I've struggled to find answers because I'm not totally sure what to search. If anyone can explain the different properties of the two quantities and when using each might be appropriate I'd really appreciate it!

EDIT: I have found this question which seems to touch on a very similar issue, but I'm not totally satisfied with the answer. I think the second answer comes closest to what I'm looking for, but I'd just like to know when it's appropriate to use each (not specific to some simulation context like in the question) Usages of Mean(X/Y) vs. Mean(X) / Mean(Y)

• To the bang on (obvious but accurate) short answer of "whichever makes more sense" and to existing answers, I add the advice that sometimes neither is a good idea. Whenever anyone is tempted to average ratios it could well be that they would be better off working on log scale and dealing with geometric means. (A different kind of problem is that geometric means seem to get taught in almost no introductory courses yet to be regarded as rather obvious in more advanced courses aimed at those with more mathematical background.) Commented Nov 11, 2022 at 13:44
• @NickCox thanks for this. Do you have any links to further reading on this? I am very unfamiliar with geometric means and when their use might be appropriate Commented Nov 14, 2022 at 4:02
• Keynes JRSS 1911; any incarnation of Kendall's Theory such as Kendall and Stuart or Stuart and Ord, Volume 1. But the idea is just exp(ave(log())). Commented Nov 14, 2022 at 7:41

If $$x_i =$$ number of items consumed on active days (for person $$i$$) and $$y=$$ number of active days (for person $$i$$), then...

• $$\text{Mean}(x/y)$$ is the average number of items consumed per person on a day in which that person is active. This gives equal weight to each person's data.
• $$\frac{\text{Mean}(x)}{\text{Mean}(y)} = \frac{\text{Sum}(x)}{\text{Sum}(y)}$$ is the total number of items consumed, divided by the total number of active person-days (1 person-day = 1 person active for one day), or the average number of items consumed per active person-day. This gives more weight to more active people, since they contribute more active person-days.

Which one you want depends on your goals, but I would imagine you're almost certainly more interested in people than in person-days.

• Person-days can be relevant when you want to estimate/express the consumption of items when all people have the same amount of active days. For instance, you had an experiment where not all participants were followed every day. Commented Nov 13, 2022 at 8:46
• Thank you! This is exactly what I was looking for, specifically the clarification about one giving 'more weight to more active people'. I thought there would be this kind of 'bias' but I couldn't put my finger on it Commented Nov 14, 2022 at 3:58

I first consider $$mean(x/y)$$ versus $$mean(x)/mean(y)$$. As Eoin and dariober suggest, the more practically relevant quantity should be used, which is often the former, although the latter is not that outlandish. To illustrate both, let's modify the OP's example and imagine opening a bakery with bakers A, B and C.

1. A usecase for $$mean(x/y)$$. On the initial (test) day, A, B and C worked $$X =(3, 1, 7)$$ hrs and made $$Y=(1, 3, 6)$$ cakes, respectively; later on, each baker will work the same hours per month. The hourly productivity of worker $$i$$ is $$z_i=y_i/x_i$$, and the expected productivity $$\sum z_i/n = 1.5$$ cakes per hour/worker. If, say, A worked for 6 hrs and made 2 cakes on the test day, this expectation won't change.
2. A usecase for $$mean(x)/mean(y)$$. Suppose a single baker can work at a time, and the bakers do $$X =(3, 1, 7)$$ hrs per day. Then the bakery's expected hourly output, $$\sum y_i/\sum x_i= 1.1$$, is meaningful. Since $$\sum y_i/\sum x_i= \sum w_i z_i$$, where $$w_1 = x_1/\sum x_i$$ is the "timeshare" of worker 1, this is like the previous case, but weighted. Similar weighting could be based for example on customer expenditure.
3. Using $$mean(x)/mean(y)$$ when X and Y are not (fully) matched. Suppose we pay $$X =(3, 1, 7)$$ pounds per hour to $$(A, B, C)$$ and want to assess competing wages. This assessment is easy if the bakers moonlight for $$Y=(1, 3, 6)$$ pounds per hour at a competitor's. It is less so if only A and C do; then we have unequal samples or "missing" data. The sizes are equal but samples are still unmatched if $$Y=(1, 3, 6)$$ are randomly drawn IT wages. (Appropriate matching could be possible, but not always.)

The second ("robustness") aspect, implied by dariober and several commenters, is whether means are suitable for ratios in the first place. As suggested by @Nick Cox under the question, the geometric mean(s) might be better; see also. Alternatives include removal of outliers; the use of trimmed means; the use of $$median(x)/median(y)$$ or $$median(x/y)$$. Also, bootstrap estimation could be appropriate for ratios.

• In the first usecase we might know that the baker's are working equally hard and produce the same but have variability in their time and independently in their output. In that case mean(x)/mean(y) can makes sense. Commented Nov 13, 2022 at 8:17

In my opinion mean(X/Y) is more meaningful because your experimental unit (not sure this is the correct term) is the individual, not the aggregate. Let's try to see this with a contrived example. Consider this data set:

individual cons  act ratio
A    5    2   2.5
B    5    2   2.5
C    5    2   2.5
D    5    2   2.5
E    5    2   2.5
F    5    2   2.5
G    5    2   2.5
H    5    2   2.5
I    5    2   2.5
J    5    2   2.5
K 1000 2000   0.5


I would say that in this dataset the average ratio is just below 2.5 (~2.3 in fact) because you observe 10 individuals with ratio 2.5 and only one individual with ratio 0.5.

However, if you calculate mean(cons) / mean(act) you get an overall average ratio of ~0.52 because individual K dominates the dataset by having much higher values, but individual K is just one out 11 individuals. On the other hand, you may want to give more weight to K if you think its values are more reliable than the other individuals'.

• The contrived example is contrived to make your suggestion look sensible! One could equally advise that such an extreme mix raises quite different questions, such as whether any average should be sought for the entire dataset. Commented Nov 11, 2022 at 13:40
• @NickCox yes, I agree. I'd say my example should help reasoning about the problem rather than giving a definitive solution. In fact the last sentence (On the other hand...) is a cautionary note. I guess one has to make assumptions about the nature of the data and decide whether individual K is odd or can be explained Commented Nov 11, 2022 at 14:33
• I agree with @NickCox. It's also possible to "contrive" the example in the other direction. Suppose K has 0.1 active days. Then approximately the mean ratio (2.5*10 + 10,000)/11 = 911, whereas the ratio of means is 1050/20.1 = 52. Good example though Commented Nov 11, 2022 at 17:55
• Alternatively, the last sentence in the answer could mean K is an outlier, so should be given less weight, eg 0. Or K could be the most important client, so should have more weight, and so on. Commented Nov 11, 2022 at 18:27
• @schrödingcöder sure, the example is contrived (maybe not the best word?) in that it shows extreme values and no variation across A-J. Without more context everything is plausible (I guess the no free lunch theorem kicks in?). But again, the purpose is to help thinking about the problem in addition to abstract reasoning. Commented Nov 11, 2022 at 22:05