0
$\begingroup$

I'm trying to get a grasp with Hotelling's $T^2$ test in the case of a one-sample population. This exercise is a part of a training set; it's not an homework, and I'm not looking for a complete solution, but for help to correct some mistakes.

The Problem

There's a population that can be supposed to follow a bivariate Normal law of mean $\mathbf{\mu}$ and covariance $\mathbf{\Sigma}$. The sample's size is 101, the sample mean is $\mathbf{\bar{x}} = (55.24\quad 34.97)^T$, and the sample covariance is: $$\mathbf{S} = \begin{pmatrix}210.54 & 126.99 \\\ 126.99 & 119.68\end{pmatrix}.$$ Let $\mathbf{\mu_0} = (60\quad 50)^T$; test at $\alpha=0.01$ level of confidence the following hypothesis: $$H_0 : \mathbf{\mu}=\mathbf{\mu_0} \longleftrightarrow H_1 : \mathbf{\mu}\neq\mathbf{\mu_0}.$$ Then, build a $0.99$ confidence ellipsoid for $\mu$.

What I did

Hypothesis testing

Since the true covariance matrix of the population is not known, I have to use the Hotelling's $T^2$ test. Recall that

$$t^2 = (n-1)(\mu_0-\mathbf{\bar{x}})^T \mathbf{S}^{-1}(\mu_0-\mathbf{\bar{x}})$$

follows an Hotelling's $T^2_{p,m}$ distribution of dimension $p$ (with $p=2$ here) and $m$ degrees of liberty (with $m=101$ here). Thus, $$F = \frac{n-p}{(n-1)p}t^2$$ follows an $F(p, n-p)$ distribution of parameters $p, n-p$.

The test is thereby: if $$F_{obs} = \frac{n-p}{p} (\mu_0-\mathbf{\bar{x}})^T \mathbf{S}^{-1}(\mu_0-\mathbf{\bar{x}}) > F_{1-\alpha}(p,n-p)$$ then we reject the null hypothesis $H_0$.

Doing the computations, I get $F_{obs} = 175.182$ (it's huge!) and $F_{0.99}(2,99) = 4.826189$ (computed via the R function qf(0.99, 2, 99)). Obviously, with this value of $F_{obs}$, I'm rejecting the null hypothesis.

Confidence ellipsoid

To compute the confidence ellipsoid, I know that it's given by:

$$\mathscr{E} = \{\mathbf{x}\in\mathbf{R}^2 : (\mathbf{x}-\mathbf{\bar{x}})^T \mathbf{S}^{-1} (\mathbf{x}-\mathbf{\bar{x}}) = F_{0.99}(2,99)\}$$

and is described by the eigenvalues and the eigenvectors of $\mathbf{S}^{-1}$; more precisely, the axes are given by eigenvectors of $\mathbf{S}^{-1}$, and the length of the axes are given by $\sqrt{\frac{\lambda_i}{2}F_{0.99}(2,99)}$ (with $\lambda_i$ being the eigenvalue associated with the eigenvector $\mathbf{v}_i$.)

Here, the eigenvalues are $\lambda_1 = 0.033, \lambda_2 = 0.003$ and the eigenvectors are $$\mathbf{v}_1 = (-0.576\quad 0.818)^T, \mathbf{v}_2 = (-0.818\quad -0.576)^T.$$

What's wrong

I'm feeling like the $F$-statistics is abnormally large compared to $F_{0.99}(2,99)$. Moreover, the confidence ellipsoid should be pretty big (since the confidence level is $0.99$), while the one I computed is tiny.

Can you help me to find where I'm wrong?

$\endgroup$
4
  • $\begingroup$ Welcome to Cross Validated! Do you have confirmation that you're wrong, such as from an answer key? Skimming your post (granted, not reading in detail), you seem to have done it correctly. $\endgroup$
    – Dave
    Commented Jan 4 at 20:25
  • $\begingroup$ @Dave Thanks! To answer your question: no, I've got no key to think I'm wrong other than the (what I think to be) extreme values I got :( $\endgroup$
    – Thiagals
    Commented Jan 4 at 20:29
  • $\begingroup$ If you hypothesis test each variable individually instead of the multivariate test, do you get a huge t-statistic? This isn't definitive evidence about what should happen in the multivariate test, but skimming your numbers, there appears to be enough of a difference between the theorized and observed means that a decent sample size over $100$ should emphatically reject. $\endgroup$
    – Dave
    Commented Jan 4 at 20:32
  • $\begingroup$ I didn't, but I got a clue from another student. I'll post an answer ASAP :) $\endgroup$
    – Thiagals
    Commented Jan 4 at 22:16

1 Answer 1

1
$\begingroup$

The first part of the computations are right: the null hypothesis should be rejected.

However, there are some mistakes when computing the confidence ellipse. Indeed, the confidence ellipse is described as follow:

$$\mathscr{E} = \{\mathbf{x}\in\mathbf{R}^2 : \frac{99}{2} (\mathbf{x}-\mathbf{\bar{x}})^T \mathbf{S}^{-1} (\mathbf{x}-\mathbf{\bar{x}}) \leq F_{0.99}(2, 99)\}$$

One of the mistake was to forget the $\frac{n-p}{p}$ factor (which is equal to $\frac{99}{2}$ here) in the equation. Moreover, the axes' length of the ellipse are not given by $\sqrt{\frac{\lambda_i}{2}F_{0,99}(2,99)}$, but rather by $\sqrt{\lambda_i\frac{2}{99}F_{0.99}(2,99)}$; to see this, recall that $\mathbf{S}$ is a $2\times 2$, symmetric, and positive definite matrix, and such, there exist an orthogonal matrix $\mathbf{V}$ (given by the eigenvectors of $\mathbf{S}$) so that $$\mathbf{S} = \mathbf{V}^T\mathbf{\Delta V},$$ with $\mathbf{\Delta}$ a diagonal matrix formed by the eigenvalues of $\mathbf{S}$. Taking the equation describing $\mathscr{E}$, we get:

$$\begin{align*} &\frac{99}{2} (\mathbf{x}-\mathbf{\bar{x}})^T \mathbf{S}^{-1} (\mathbf{x}-\mathbf{\bar{x}}) \leq F_{0.99}(2, 99) \\ \iff& \frac{99}{2} (\mathbf{x}-\mathbf{\bar{x}})^T \mathbf{R}^T\mathbf{\Delta}^{-1}\mathbf{R} (\mathbf{x}-\mathbf{\bar{x}}) \leq F_{0.99}(2, 99) \\ \iff& \frac{1}{\lambda_1 F_{0.99}(2, 99) \frac{2}{99}} (\mathbf{R}(\mathbf{x}-\mathbf{\bar{x}}))^2_1 + \frac{1}{\lambda_2 F_{0.99}(2, 99) \frac{2}{99}} (\mathbf{R}(\mathbf{x}-\mathbf{\bar{x}}))^2_2 \leq 1 \end{align*}$$ Recall that an ellipse is defined by: $$\frac{x^2}{a^2}+\frac{y^2}{b^2}\leq 1$$ we get that the axes' length are given by $2a = 2\sqrt{\lambda_1 F_{0.99}(2, 99) \frac{2}{99}}$ and $2b = 2\sqrt{\lambda_2 F_{0.99}(2, 99) \frac{2}{99}}$.

Putting everything together, we obtain the axes and axes' length of the confidence ellipse:

$$\begin{align*} \lambda_1 &= 299.982\\ \lambda_2 &= 30.238\\ \mathbf{v_1} &= \begin{pmatrix}-0.818\\ -0.576\end{pmatrix}\\ \mathbf{v_2} &= \begin{pmatrix}0.576\\ -0.818\end{pmatrix}\\ 2a &= 10.816\\ 2b &= 3.434 \end{align*}$$ Which should end the computations and solve the exercise. $\blacksquare$

$\endgroup$

Your Answer

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

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