Recall from the setup that X_1,\ldots ,X_ n\sim X are i.i.d. random variables with density f_\theta, for some unknown \theta \in (0,1):

f_\theta (x)=\left\{ \begin{array}{ll} \theta ^2& \text {if } -1 \le x<0\\ 1- \theta ^2 & \text {if } 0\leq x\leq 1\\ 0 & \text {otherwise.} \end{array}\right.

Consider the following hypotheses:

\displaystyle \displaystyle H_0 \displaystyle : X \sim \textsf{Unif}(-1,1)
\displaystyle H_1 \displaystyle : X \text { not distributed as } \textsf{Unif}(-1,1).
Write down the test statistic \, T_ n^{\text {Wald}}\, (that is quadratic in \hat\theta ^{\text {MLE}}) for Wald's test (involving a chi-square distribution) for the above hypothesis. Use the value of \theta that defines H_0 as the argument of the asymptotic variance \, V(\theta )\,.

Hint: Rewrite the hypothesis in terms of the parameter \theta.

(Enter hattheta for \hat\theta ^{\text {MLE}}.)

(To avoid double jeopardy, you may use V for the asymptotic variance \, V(\theta )\, under H_0.)

\, T_ n^{\text {Wald}}=\quad

What is the form of this Wald's test?

\, \mathbf{1}(T_ n^{\text {Wald}}\, {\color{blue}{>}} \, C) for some C{\color{blue}{>}} 0

\, \mathbf{1}(T_ n^{\text {Wald}}\, {\color{blue}{>}} \, C) for some C{\color{blue}{<}} 0

\, \mathbf{1}(T_ n^{\text {Wald}}\, {\color{blue}{<}} \, C) for some C{\color{blue}{>}} 0

\, \mathbf{1}(T_ n^{\text {Wald}}\, {\color{blue}{<}} \, C) for some C{\color{blue}{<}} 0

The test statistic \, T_ n^{\text {Wald}}\, is quadratic in \hat\theta ^{\text {MLE}}, so we need to find the MLE of \theta.

To find the MLE, we need to maximize the likelihood function. The likelihood function is given by:

L(\theta) = \prod_{i=1}^{n} f_\theta(X_i)

Taking the logarithm of the likelihood function, we have:

\ln(L(\theta)) = \sum_{i=1}^{n} \ln(f_\theta(X_i))

= \sum_{i=1}^{n} \ln(\theta^2) + \sum_{i=1}^{n} \ln(1-\theta^2)

= 2n\ln(\theta) + n\ln(1-\theta^2)

To maximize the likelihood function, we take the derivative with respect to \theta and set it equal to zero:

\frac{d}{d\theta} \ln(L(\theta)) = \frac{2n}{\theta} - \frac{2n\theta}{1-\theta^2} = 0

Simplifying the equation, we have:

\frac{2}{\theta} - \frac{2\theta}{1-\theta^2} = 0

Multiplying through by \theta(1-\theta^2), we get:

2(1-\theta^2) - 2\theta^2 = 0

2 - 2\theta^2 - 2\theta^2 = 0

4\theta^2 = 2

\theta^2 = \frac{1}{2}

\theta = \pm\frac{1}{\sqrt{2}}

Since \theta \in (0, 1), we take \theta = \frac{1}{\sqrt{2}} as the MLE.

Now, we need to find the asymptotic variance V(\theta) using the value of \theta that defines H_0.

For H_0 : X \sim \textsf{Unif}(-1,1), \theta = \frac{1}{\sqrt{2}}.

The density function of X under H_0 is:

f_0(x) = \left\{ \begin{array}{ll} \frac{1}{2} & \text{if } -1 \leq x \leq 1 \\ 0 & \text{otherwise} \end{array} \right.

The variance of X under H_0 is given by:

V_0 = \int_{-1}^{1} (x - \mu_0)^2 f_0(x) dx

where \mu_0 is the mean of X under H_0, which is 0.

Therefore, V_0 = \int_{-1}^{1} x^2 \cdot \frac{1}{2} dx = \frac{1}{3}

Using this value of \theta and the asymptotic variance V_0, the test statistic T_n^{\text{Wald}} is given by:

T_n^{\text{Wald}} = \frac{(\hat\theta^{\text{MLE}} - \theta)^2}{V(\theta)}

T_n^{\text{Wald}} = \frac{\left(\hat\theta^{\text{MLE}} - \frac{1}{\sqrt{2}}\right)^2}{\frac{1}{3}}

The form of this Wald's test is \, \mathbf{1}(T_ n^{\text {Wald}}\, {\color{blue}{>}} \, C) for some C{\color{blue}{>}} 0.

To find the test statistic for Wald's test, we need to calculate the maximum likelihood estimator (\hat{\theta}^{MLE}) and the asymptotic variance V(\theta) under H_0.

First, let's find the maximum likelihood estimator (\hat{\theta}^{MLE}):
We have the density function f_\theta(x) with two cases:
1. If -1 \leq x < 0, then f_\theta(x) = \theta^2.
2. If 0 \leq x \leq 1, then f_\theta(x) = 1 - \theta^2.
For a random sample of n observations, the likelihood function is given by:
L(\theta) = \prod_{i=1}^n f_\theta(x_i).

To find the maximum likelihood estimator, we need to maximize the likelihood function L(\theta) with respect to \theta. However, for this specific case, we can see that the likelihood is maximized when \theta = 1, as it makes the second case (0 \leq x \leq 1) contribute the most to the likelihood. Therefore, we have \hat{\theta}^{MLE} = 1.

Next, let's find the asymptotic variance V(\theta) under H_0:
Under the null hypothesis H_0, we assume that X \sim \textsf{Unif}(-1,1), which means that \theta = 1.

The asymptotic variance is given by the inverse of the Fisher information:
V(\theta) = \left(-E\left[\frac{{d^2\ln{f_\theta(X)}}}{{d\theta^2}}\right]\right)^{-1}.

Differentiating \ln{f_\theta(x)} with respect to \theta, we get:
\frac{{d\ln{f_\theta(x)}}}{{d\theta}} = \frac{{2\theta}}{{f_\theta(x)}} \text{ for } -1 \leq x < 0,
\frac{{d\ln{f_\theta(x)}}}{{d\theta}} = \frac{{-2\theta}}{{f_\theta(x)}} \text{ for } 0 \leq x \leq 1.

Taking the second derivative, we have:
\frac{{d^2\ln{f_\theta(x)}}}{{d\theta^2}} = \frac{{-2}}{{f_\theta(x)}} \text{ for } -1 \leq x < 0,
\frac{{d^2\ln{f_\theta(x)}}}{{d\theta^2}} = \frac{{-2}}{{f_\theta(x)}} \text{ for } 0 \leq x \leq 1.

Taking the expected value under the null hypothesis H_0 (\theta = 1), we get:
E\left[\frac{{d^2\ln{f_\theta(X)}}}{{d\theta^2}}\right] = \int_{-1}^0 \frac{{-2}}{{f_\theta(x)}} f_\theta(x) dx + \int_0^1 \frac{{-2}}{{f_\theta(x)}} f_\theta(x) dx = -2 + (-2) = -4.

Therefore, the asymptotic variance under H_0 is V(\theta) = (-E\left[\frac{{d^2\ln{f_\theta(X)}}}{{d\theta^2}}\right])^{-1} = (-(-4))^{-1} = \frac{1}{4}.

Now we can find the test statistic for Wald's test:
T_n^{\text{Wald}} = (\hat{\theta}^{MLE} - \theta_0)^2 \cdot V(\theta_0),
where \theta_0 is the value that defines H_0. In this case, \theta_0 = 1.

Substituting the values, we have T_n^{\text{Wald}} = (1 - 1)^2 \cdot \frac{1}{4} = 0.

Therefore, the test statistic for Wald's test is T_n^{\text{Wald}} = 0.

The form of Wald's test is:

\mathbf{1}(T_n^{\text{Wald}} > C) for some C > 0.