Let $X_1,\cdots,X_n$ be i.i.d. random variables having Lebesgue p.d.f. $$f(x;\theta)=\theta I_{\{0<x\le1\}}+(1-\theta) I_{\{1<x<2\}},$$ where $0<\theta<1$. Find a minimal sufficient statistic for $\theta$.
I don't know how to solve this problem. Could anybody give some suggestions?
To use Fisher–Neyman factorization theorem, one need to find likelihood function first. Rewrite $f(x;\theta)$ in more convinient form $$f(x;\theta)=\theta^{I_{\{0<x\le1\}}}(1-\theta)^{I_{\{1<x<2\}}}I_{\{0<x<2\}}.$$
The likelihood function is $$ f(X_1,\ldots,X_n;\theta)=\underbrace{\theta^{\sum_{i=1}^nI_{\{0<X_i\le 1\}}}(1-\theta)^{\left(n-\sum_{i=1}^nI_{\{0<X_i\le 1\}}\right)}}_{g_\theta\left(\sum_{i=1}^nI_{\{0<X_i\le 1\}}\right)}\underbrace{I_{\{0<X_{(1)}\leq X_{(n)}<2\}}}_{h(X_1,\ldots,X_n)}. $$
Then $T(X_1,\ldots, X_n)=\sum\limits_{i=1}^nI_{\{0<X_i\le 1\}}$ is sufficient statistics. It is also a minimal sufficient statistics.