# How to test whether subgroup mean differs from overall group that includes the subgroup?

How can I test whether the mean (e.g., blood pressure) of a subgroup (e.g., those who died) differs from the whole group (e.g., everyone who had the disease including those that died)?

Clearly, the first one is a subgroup of the second one.

What hypothesis test should I use?

-
Are you testing a difference of means? – Macro Jun 16 '12 at 5:09

As Michael notes, when comparing a subgroup to an overall group, researchers typically compare the subgroup to the subset of the overall group that does not include the subgroup.

If $p$ is the proportion that died, and $p-1$ is the proportion who did not die, and

$$\bar{X}_. = p\bar{X}_d + (p-1)\bar{X}_a$$

where $\bar{X}_.$ is the overall mean, $\bar{X}_d$ is the mean of those that died, and $\bar{X}_a$ is the mean of those that are still alive. Then if

$$\bar{X}_d \neq \bar{X}_a$$ then

$$\bar{X}_d \neq \bar{X}_.$$

Thus, researchers typically test the difference between the subgroup and the subset of the overall group that does not include the subgroup. This has the effect of showing that the subgroup differs from the overall group. It also allows you use conventional methods like an independent groups t-test.

-
Re: "You should compare the subgroup to the subset of the overall group that does not include the subgroup" - yes, this is a way to do it but it asks a slightly different question - it tests dead vs. not-dead when it appears to OP wants to test the difference in means between dead and someones whose mortality status is unknown, so I'm not sure should is the right word. You can test the difference in means between the subset and the overall group as long as you account for the covariance between $\overline{X}_d$ and $\overline{X}_{.}$ in your standard error calculation. – Macro Jun 16 '12 at 14:26
@Macro good point. thanks. I changed the wording a little to "researchers typically ..." – Jeromy Anglim Jun 16 '12 at 14:32
@Marco. Thanks for the comment. But how is computed covariance of $\bar{X}_d$ and $\bar{X}$ of non paired groups (subgroup and group)? – giordano Aug 24 '15 at 12:42

The way to test here is to compare those who had the disease and died to those who had the disease and did not die. You could apply the two sample t test or the Wilcoxon rank sum test if normality cannot be assumed.

-
can you be more specific? what kind of two sample t test? unpaired t test? I thought for t test, you assume INDEPENDENCE and NORMALITY. – user1061210 Jun 16 '12 at 23:24
When the groups are separate as we suggested the samples are independent. The t test would be unpaired becuase the subgroups need not be equal and there is not a natural way to pair the samples even if the sample sizes were equal. I mentioned the Wilcoxon test because the normality assumption may not be valid and the Wilcoxon test doesn't require normality. – Michael Chernick Jun 17 '12 at 1:17

What you need to do is to test for Population proportions (large sample size). Statistics involving population proportion often have sample size that is large (n=>30), therefore the normal approximation distribution and associated statistics is used to determine a test for whether the sample proportion(blood pressure of those who died) = population proportion(everyone who had the disease including those that died).

That is, when the sample size is greater than or equal to 30 we can use the z-score statistics to compare the sample proportion against the population proportion using value of the sample standard deviation p-hat, to estimate the sample standard deviation, p if it is not known.

The sample distribution of P (proportion) is approximately normal with a mean or expected value, E(P) = p-hat and standard error, sigma(r)=sqrt(p*q/n) .

The following are the likely test hypothesis questions one may ask when comparing two proportions:

1. (Two-tailed test)

H0: p-hat = p vs H1 : p-hat not equal to p

1. (Right-tailed test)

H0: p-hat = p vs H1 : p-hat > p

1. (Left-tailed test)

H0: p-hat = p vs H1 : p-hat < p

The statistics used to test for large sample size are;

The test statistics is related to the standard normal distribution:

The z-score statistics for proportions

p-hat-p/sqrt(pq/n)

, where p = proportion estimate, q=1-p and is the population proportion.

Proportion mean is:

np/n= p-hat = x/n

Standard deviation:

= sqrt(npq/n)=sqrt(pq/n)

Decision rules:

Upper-Tailed Test (): (H0: P-hat >=P)

Accept H0 if Z<=Z(1-alpha)

Reject H0 if Z>Z(1-alpha)

Lower-Tailed Test (Ha: P-hat<=P):

Accept H0 if Z>=Z(1-alpha)

Reject H0 if Z

Two-Tailed Test (Ha:P-hat not equal to P):

Accept H0 if Z(alpha/2)<= Z <=Z(1-alpha/2)

Reject H0 if Z < Z(alpha/2) or if Z > Z(1-alpha/2)

-