Consider a random sample $\{X_1,X_2,X_3\}$ where $X_i$ are i.i.d. $Bernoulli(p)$ random variables where $p\in(0,1)$. Check if $T(X)=X_1+2X_2+X_3$ is a sufficient statistic for $p$.
Firstly, how can we find the distribution for $(X_1+2X_2+X_3)$? Or should it be broken down to $X_1+X_2+X_2+X_3$ and then will this follow $Bin(4,p)$? I think not because note that all the variables are not independent here.
Alternately, if I employ the factorization condition by just considering the joint p.m.f. of $(X_1,X_2,X_3)$ then $f(X_1,X_2,X_3)=p^{x_1+x_2+x_3}(1-p)^{3-(x_1+x_2+x_3)}=[p^{t(x)}(1-p)^{3-t(x)}]p^{-x_2}(1-p)^{x_2}$ where $t(x)=x_1+2x_2+x_3$.
This shows that $T$ is not sufficient.
But what if I want to follow the definition and want to apply $\dfrac{f(X|p)}{g(T(X)|p)}$ to check if this ratio is independent of $p$? Then I need to know the distribution of $g$. What then, is the distribution of $T(X)=X_1+2X_2+X_3$?