# How to calculate the “difference between X and Y”

I feel like this is the silliest question ever, so I apologize in advance!

Z is the difference between X and Y.

Which of these is true?

• Z = X - Y
• Z = Y - X
• Z = |X - Y|

I want to say it's the third, or whichever is larger minus whichever is smaller, but I can't be certain.

This came up in a textbook I'm studying. Attrition is the difference between the actual number of guest rooms picked up and the number of guest rooms guaranteed by the meeting sponsor in the contract.

Thanks!

(note: I have no idea how to tag this question, so if someone can help, that'd be appreciated. :) )

You're correct: given no context, then "the difference $Z$ between $X$ and $Y$ is given by $$Z = |X-Y|$$
This would be the "absolute" difference, which is appropriate here, as we are asked simply for representing the difference between $X$ and $Y$: this way, the difference is independent of which is larger $X$ or $Y$.
However, in your problem statement, if you know $X$ represents actual number...and $Y$ represents guaranteed number, then attrition $A$, if I understand your definition correctly, would be $$A = X - Y$$