Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let me use a simple example to illustrate my problem. First, assume we are calculating rate r at time t such that rt = xt / yt. Furthermore, each measure has two component parts: X = xa + xb and Y = ya + yb. We can thus calculate percent change c for the rate between t2 > t1 as c = (r2 - r1) / r1.

Next, I want to allocate c to measure the relative contribution of each component A and B. When the changes are in the same direction between t1 and t2 this is easy (e.g. Xa1 > Xa2 and Xb1 > Xb2 and Ya1 > Ya2 and Yb1 > Yb2). You calculate the change for each component, divide that by the absolute change and apply that "share" to the total percent change. That allows me to make a statement, e.g. when the rate changed from 10% to 15%, 75% of the 50% change was due to component A and 25% to component B.

Here's my question - how can I calculate the relative contribution of these components when the differences are in opposite directions? For example, component A decreased for X and Y (and more for Y, relatively) and component B increased for X and Y (and more for Y, relatively).

I'm sure this is simple but no amount of searching has made me the wiser. If you could point me in the right direction -- or ask questions to better illuminate my subject matter -- I would greatly appreciate your help. Thanks!

PS - I found a few resources, linked below but still aren't sure of the exact math required...

share|cite|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.