1
$\begingroup$

I have 50 data points each with 7 variables.

              v1  v2  v3  v4  v5  v6  v7   
data point 1
data point 2
...
data point 50

These 50 data points are divided into two groups, with label a or b. Each group has 25 data points. I need to compute a final score using the 7 variables for each data point.

Since these 7 variables are not initially on the same scale, I standardize them all using z-score. So for each variable and using all 50 data points, I separately compute the mean and standard deviation and then compute the z-score. I then compute the final score in the following way:

score for data point 1 = v1 + v2 + (v3 - v4) - v5 - v6 - v7 (all v* are z-scores)

So here is my problem. After computing the scores for all data points, I compute the mean score for the two groups (I want to know the difference between the two groups). The two mean values are always exactly the same but in opposite directions. For example:

[group=a] mean of scores: 2.16
[group=b] mean of scores: -2.16

I'm pretty sure I'm missing something since it's unusual that the two groups always have the same absolute values in opposite directions. So I don't know why this happens or what I'm missing.

$\endgroup$
1
  • 1
    $\begingroup$ See comment on first answer. Standardize 1 2 3 4 5 and then compare mean scores of 1 2 and 3 4 5. $\endgroup$
    – Nick Cox
    Mar 13, 2022 at 9:17

2 Answers 2

2
$\begingroup$

The summary variable has mean zero by construction, so the issue is what happens when you compare the two groups.

A short answer is that this isn't always true. It will be true if the number of observations is equal in two subsamples, which itself implies an even number of observations $n$.

Consider any standardized variable with mean zero. It follows that the sum is also zero. Now consider any split whatsoever into two groups. If the sum of standardized values over group 1 is $S$, then the sum over group 2 must be $-S$. If the groups are of equal size, then the means are also equal in absolute value, as the means are $S / (n / 2)$ and $-S / (n / 2)$ or $2S/n$ and $-2S/n$.

To see for yourself that this depends on equal group sizes, consider as a counter-example values 1 2 3 4 5 and any split whatsoever into subsamples.

$\endgroup$
2
  • $\begingroup$ Thanks for your answer. This does clarify my confusion. Just as one more question (I know it may not directly be related to this question,) then what metric should I choose to compare the two groups to account for their labels too? Since this way, I don't truly understand the difference between groups a and b because no matter what, only if we have two groups with the same sample size regardless of their labels, their absolute mean value is always going to be the same. $\endgroup$
    – Pedram
    Mar 13, 2022 at 19:46
  • 1
    $\begingroup$ I would start with a Student t test here. The variability about each mean is going to be comparable. $\endgroup$
    – Nick Cox
    Mar 13, 2022 at 20:10
1
$\begingroup$

The variable v* all have zero mean already (because of the standardization). So a linear combination of them will still have a zero-mean. That's why the means of the two (equal size) groups add to 0.

$\endgroup$
2
  • 2
    $\begingroup$ There is extra detail if the groups are unequal in size. It is the sums of scores that are guaranteed to add to zero. $\endgroup$
    – Nick Cox
    Mar 13, 2022 at 9:15
  • 2
    $\begingroup$ This still misses the main point. The problem is in the last part of the question, which is about groupwise calculation for a variable with zero mean. The context that the final variable is based on several standardized variables is just that, context. $\endgroup$
    – Nick Cox
    Mar 13, 2022 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.