# Hypothesis testing for non-linearity

I have $n_X$ observations of variable X, $n_Y$ of variable Y, and $n_Z$ of variable Z. I'd like to test the hypothesis that the true mean of $X$ is equal to the sum of the means of Y and Z. $$H_0: \mu_X - (\mu_Y+\mu_Z) = 0$$

Initial thoughts

I can use the sample means to define an estimator $\hat{\gamma} = \bar{y}_X - (\bar{y}_Y+\bar{y}_Z)$. Can I estimate the variance using $$\hat{\sigma}^2(\hat{\gamma}) = \sigma^2 (1/n_1+1/n_2+1/n_3)?$$ If so, is the test statistic $\hat{\gamma}/\sqrt{\hat{\sigma}^2(\hat{\gamma})}$ t-distributed?

• Your calculations suggest all $n_X+n_Y+n_Z$ observations are independent. Are you sure this is the case? (BTW, $\hat\gamma$ needs two, not one, minus signs.) What you are testing might be termed non-additivity; linearity is a much stronger condition. – whuber May 7 '14 at 18:51
• I'm sure the observations are independent. – KDM May 7 '14 at 20:27
• How does your question relate to your title? Is the aim to test that the means $\hat{\mu}_X$, $\hat{\mu}_Y$ and $\hat{\mu}_Z$ are equispaced? – Glen_b -Reinstate Monica Mar 21 '15 at 11:54

Do you know $\sigma^2$? If not then you will need to estimate it from the data (and assume that all 3 variances are equal). So your final formula will probably be a little more complicated than you show, but it can be reduced to something that is (at least approximately) t distributed (though probably done using $t^2=F$ if the 3 variables are normal or the sample sizes are large enough. One way to test this is with the General Linear Hypothesis (google for it).
• Thanks! I don't know $\sigma^2$ and was going to estimate it from the pooled sample variances (assuming the underlying variances are equal, which I think is a pretty good assumption). – KDM May 7 '14 at 20:31