If $x_1, ... x_n \sim Unif(a, b)$ then the joint density can be written as:

$$
\begin{align}
p(x) & = \prod_{i=1}^n (b - a)^{-1} \textbf{1}_{\{a \le x_i \le b\}} \\
& = (b - a)^{-n} \textbf{1}_{\{x_{(1)} \ge a \}} \textbf{1}_{\{x_{(n)} \le b \}}
\end{align}
$$

where $\textbf{1}$ is the indicator function and $x_{(1)}$ is the min value and $x_{(n)}$ is the max value in the data.

(a) a = 0, b = $\theta$

The density is:

$$p(x) = \theta^{-n} \textbf{1}_{\{x_{(1)} \ge 0 \}} \textbf{1}_{\{x_{(n)} \le \theta \}}$$

and takes the form required by the factorization theorem with $h(x) = \textbf{1}_{\{0 \le x_{(1)}\}}$ and $g(t(x), \theta) = \theta^{-n} \textbf{1}_{\{x_{(n)} \le \theta \}}$. So $t(x) = x_{(n)}$ is sufficient.

(b) a = $\theta - 1$, b = $\theta + 1$

The density is:

$$
\begin{align}
p(x) & = 2^{-n} \textbf{1}_{\{x_{(1)} + 1 \ge \theta \}} \textbf{1}_{\{x_{(n)} - 1 \le \theta  \}} \\ 
& = 2^{-n} \textbf{1}_{\{-x_{(1)} - 1 \le \theta \}} \textbf{1}_{\{x_{(n)} - 1 \le \theta  \}}
\end{align}
$$

and takes the form required by the factorization theorem with $h(x) = 2^{-n}$ and $g(t(x), \theta) = \textbf{1}_{\{x_{(1)} + 1 \ge \theta \}} \textbf{1}_{\{x_{(n)} - 1 \le \theta  \}}$. So $t(x) = max\{-x_{(1)} - 1, x_{(n)} - 1 \}$ is sufficient.

(c) The density is:

$$p(x) = (\theta_2 - \theta_1)^{-n} \textbf{1}_{\{x_{(1)} \ge \theta_1 \}} \textbf{1}_{\{x_{(n)} \le \theta_2 \}} $$

and takes the form required by the factorization theorem with $h(x) = 1$ and $g(t(x), \theta) = p(x)$. So $t(x) = (x_{(1)}, x_{(n)} )$ is sufficient.

(d) a = $-\theta$, b = $\theta$

The density is:

$$
\begin{align}
p(x) & = (2 \theta)^{-n} \textbf{1}_{\{x_{(1)} \ge -\theta \}} \textbf{1}_{\{x_{(n)} \le \theta \}} \\
& = (2 \theta)^{-n} \textbf{1}_{\{-x_{(1)} \le -\theta \}} \textbf{1}_{\{x_{(n)} \le \theta \}}
\end{align}
$$

and takes the form required by the factorization theorem with $h(x) = (2 \theta)^{-n}$ and $g(t(x), \theta) = \textbf{1}_{\{x_{(1)} \ge -\theta \}} \textbf{1}_{\{x_{(n)} \le \theta \}}$. So $t(x) = max\{-x_{(1)}, x_{(n)} \}$ is sufficient.

(e) a = $\theta$, b = 2$\theta$
The density is:

$$p(x) = \theta^{-n} \textbf{1}_{\{x_{(1)} \ge \theta \}} \textbf{1}_{\{x_{(n)} / 2 \le \theta  \}} = \theta^{-n} \textbf{1}_{\{-x_{(1)} \le \theta \}} \textbf{1}_{\{x_{(n)} / 2 \le \theta  \}}$$

and takes the form required by the factorization theorem with $h(x) = \theta^{-n}$ and $g(t(x), \theta) = \textbf{1}_{\{x_{(1)} \ge \theta \}} \textbf{1}_{\{x_{(n)} / 2 \le \theta  \}}$. So $t(x) = max\{-x_{(1)}, x_{(n)/2} \}$ is sufficient.

(f) If $(x_1, y_1), ... (x_n, y_n)$ are uniform in the circle with mean (0, 0) and radius $\theta$ then the joint density and be written as:

$$p(x, y) = \prod_{i=1}^n (\pi \theta^2)^{-1} \textbf{1}_{\{x_{i}^2 + y_{i}^2 \le \theta^2 \}} = \pi^{-n} \theta^{-2n} \prod_{i=1}^n \textbf{1}_{\{x_{i}^2 + y_{i}^2 \le \theta^2 \}} $$

and takes the form required by the factorization theorem with $h(x, y) = \pi^{-n}$ and $g(t(x, y), \theta) = \theta^{-2n} \prod_{i=1}^n \textbf{1}_{\{x_{i}^2 + y_{i}^2 \le \theta^2 \}}$. So $t(x) = (x_{1}^2 + y_{1}^2, ..., x_{n}^2 + y_{n}^2)$ is sufficient.

(g) If $(x_1, y_1), ... (x_n, y_n)$ are uniform in the square $(\theta - 1, \theta + 1) \times (\theta - 1, \theta + 1)$ then the joint density and be written as:

$$
\begin{align}
p(x, y) & = \prod_{i=1}^n [\{(\theta + 1) - (\theta - 1)\}^2]^{-1} \textbf{1}_{ \{ \theta -1 \le x_i \le \theta + 1, \theta -1 \le y_i \le \theta + 1 \} } \\
        & = 4^{-n}  \prod_{i=1}^n \textbf{1}_{ \{ \theta -1 \le x_i \le \theta + 1 \} } \textbf{1}_{ \{ \theta -1 \le y_i \le \theta + 1 \} }
\end{align}
$$

and takes the form required by the factorization theorem with $h(x, y) = 4^{-n}$ and $g(t(x, y), \theta) = \prod_{i=1}^n \textbf{1}_{ \{ \theta -1 \le x_i \le \theta + 1 \} } \textbf{1}_{ \{ \theta -1 \le y_i \le \theta + 1 \} }$. Intuitively it makes sense that $t(x) = (x_1 y_1, ..., x_n y_n)$ is sufficient.

(h) If $x_1, ... x_n \sim Exp(\theta)$ then the joint density can be written as:

$$
\begin{align}
p(x) & = \prod_{i=1}^n \theta^{-1} \exp [-x_i / \theta]  \\
& = \theta^{-n} \exp \bigg[\theta^{-1}  \sum_{i=1}^n x_i \bigg] 
\end{align}
$$

and takes the form required by the factorization theorem with $h(x, y) = \theta^{-n}$ and $g(t(x, y), \theta) = \exp \bigg[\theta^{-1}  \sum_{i=1}^n x_i \bigg]$. So $t(x) =  \sum_{i=1}^n x_i$ is sufficient.

(i)  If $x_1, ... x_n \sim Gamma(\alpha, \lambda)$ then the joint density can be written as:

$$p(x) = \prod_{i=1}^n \frac{1}{\Gamma(\alpha)} \lambda^ \alpha x_i^{\alpha - 1} \exp(-\lambda x_i)$$

If $\alpha$ is known then the density is given by:

$$p(x) = \Gamma(\alpha)^{-n} \lambda^{\alpha n} \prod_{i=1}^n x_i^{\alpha - 1} \exp \bigg(-\lambda \sum_{i=1}^n x_i \bigg)$$

and takes the form required by the factorization theorem with $h(x) = \Gamma(\alpha)^{-n} \lambda^{\alpha n} \prod_{i=1}^n x_i^{\alpha - 1}$ and $g(t(x), \lambda) = \exp \big(-\lambda \sum_{i=1}^n x_i \big)$. So $t(x) =  \sum_{i=1}^n x_i$ is sufficient.

If $\lambda$ is known then the density is given by:

$$p(x) = \exp \bigg(-\lambda \sum_{i=1}^n x_i \bigg) \Gamma(\alpha)^{-n} \lambda^{\alpha n} \bigg( \prod_{i=1}^n x_i \bigg)^{\alpha - 1}  $$

and takes the form required by the factorization theorem with $h(x) = \exp \bigg(-\lambda \sum_{i=1}^n x_i \bigg) \Gamma(\alpha)^{-n} \lambda^{\alpha n}$ and $g(t(x), \alpha) = \bigg( \prod_{i=1}^n x_i \bigg)^{\alpha - 1}$. So $t(x) =  \prod_{i=1}^n x_i$ is sufficient.

If $(\alpha, \lambda)$ is unknown then the density is given by:

$$p(x) = \Gamma(\alpha)^{-n} \lambda^{\alpha n} \prod_{i=1}^n x_i^{\alpha - 1} \exp \bigg(-\lambda \sum_{i=1}^n x_i \bigg)$$

and takes the form required by the factorization theorem with $h(x) = \Gamma(\alpha)^{-n} \lambda^{\alpha n}$ and $g(t(x), (\alpha, \lambda)) = \prod_{i=1}^n x_i^{\alpha - 1} \exp \bigg(-\lambda \sum_{i=1}^n x_i \bigg)$. So $t(x) = \bigg(\prod_{i=1}^n x_i, \sum_{i=1}^n x_i\bigg)$ is sufficient.

(j) If $x_1, ... x_n \sim Weibull(\lambda, \alpha)$ then the joint density can be written as:

$$p(x) = \prod_{i=1}^n \alpha \lambda (\lambda x_i)^{\alpha - 1} \exp(-\lambda x_i)^{\alpha}$$

If $(\lambda, \alpha)$ is unknown then the density is given by:

$$p(x) = \alpha^n \lambda^{n + \alpha - 1} \bigg( \prod_{i=1}^n x_i \bigg)^{\alpha - 1} \exp \bigg(-\lambda \sum_{i=1}^n x_i^{\alpha} \bigg)$$

This does not take the form required by the factorization theorem due to the dependence on the parameter $\alpha$ in the exponential term. As a result there is no non-trivial sufficient statistic in this case. Note that the data and the order statistics are always (trivial) sufficient statistics for any data set. A more [technical explanation](https://math.stackexchange.com/questions/636146/does-the-weibull-distribution-has-a-sufficient-statistic) in terms of a ratio of densities and permutations is given that I don't really understand yet.

If $\lambda$ is known then the same argument above holds.

If $\alpha$ is known then the density takes the form required by the factorization theorem with

$h(x) = \alpha^n \lambda^{n + \alpha - 1} \bigg( \prod_{i=1}^n x_i \bigg)^{\alpha - 1}$ and $g(t(x), \lambda) = \exp \bigg(-\lambda \sum_{i=1}^n x_i^{\alpha} \bigg)$. So $t(x) = \sum_{i=1}^n x_i^{\alpha}$ is sufficient.

(k) If $x_1, ... x_n \sim Beta(\alpha, \beta)$ then the joint density can be written as:

$$
\begin{align}
p(x) & = \frac{\Gamma (\alpha, \beta)^n} {\Gamma (\alpha)^n \Gamma (\beta)^n} \prod_{i=1}^n  x_i^{\alpha - 1} (1 - x_i)^{\beta - 1} \\
& = \frac{\Gamma (\alpha, \beta)^n} {\Gamma (\alpha)^n \Gamma (\beta)^n} \bigg( \prod_{i=1}^n  x_i \bigg) ^{\alpha - 1} \bigg (\prod_{i=1}^n (1 - x_i) \bigg) ^{\beta - 1}
\end{align}
$$

If $(\alpha, \beta)$ is unknown then the density is given by the above equation and takes the form required by the factorization theorem with $h(x) = \frac{\Gamma (\alpha, \beta)^n} {\Gamma (\alpha)^n \Gamma (\beta)^n}$ and $g(t(x), (\alpha, \beta)) = \bigg( \prod_{i=1}^n  x_i \bigg) ^{\alpha - 1} \bigg (\prod_{i=1}^n (1 - x_i) \bigg) ^{\beta - 1}$. So $t(x) = \bigg(\prod_{i=1}^n x_i, \prod_{i=1}^n (1 - x_i) \bigg)$ is sufficient.

If $\alpha$ is known then the density is given by the above equation and takes the form required by the factorization theorem with $h(x) = \frac{\Gamma (\alpha, \beta)^n} {\Gamma (\alpha)^n \Gamma (\beta)^n} \bigg( \prod_{i=1}^n  x_i \bigg) ^{\alpha - 1}$ and $g(t(x), \beta) = \bigg (\prod_{i=1}^n (1 - x_i) \bigg) ^{\beta - 1}$. So $t(x) = \prod_{i=1}^n (1 - x_i)$ is sufficient.

If $\beta$ is known then the density is given by the above equation and takes the form required by the factorization theorem with $h(x) = \frac{\Gamma (\alpha, \beta)^n} {\Gamma (\alpha)^n \Gamma (\beta)^n} \bigg (\prod_{i=1}^n (1 - x_i) \bigg) ^{\beta - 1}$ and $g(t(x), \alpha) = \bigg (\prod_{i=1}^n x_i \bigg) ^{\alpha - 1}$. So $t(x) = \prod_{i=1}^n x_i$ is sufficient.

eef779c9d083079d26312e335b1e7f021f715259
ipynb
Jupyter Notebook
python/chapter-3/exercises/EX3-2.ipynb
covuworie/in-all-likelihood
6638bec8bb4dde7271adb5941d1c66e7fbe12526
MIT
python/chapter-3/exercises/EX3-2.ipynb
covuworie/in-all-likelihood
6638bec8bb4dde7271adb5941d1c66e7fbe12526
MIT
2020-03-24T17:53:04.000Z
2021-08-23T20:16:17.000Z
python/chapter-3/exercises/EX3-2.ipynb
covuworie/in-all-likelihood
6638bec8bb4dde7271adb5941d1c66e7fbe12526
MIT
2021-11-21T10:24:59.000Z
2021-11-21T10:24:59.000Z
Qwen/Qwen-72B
1. YES
2. YES