For $\theta \in [0, 1]$, $\lambda > 0$, I have the zero-inflated Poisson distribution
$$f_{\theta,\lambda}(x)=\begin{cases} \theta+(1-\theta)e^{-\lambda} & x=0 \\ (1-\theta) \frac{\lambda^x e^{-\lambda}}{x!}& x=1,2,… \end{cases} $$
For $X_1, …, X_n$ i.i.d. observations from this distribution, I want to show that the statistic $T=(n_0,S)$ is sufficient where $n_0=\sum_{i=1}^n \mathbf{1}_{\{X_i=0\}}$, $S=\sum_{i=1}^n X_i$.
To do this, I want to show that $f_X(x | \theta,\lambda)=\Pi_{i=1}^n f_{X_i}(x_i | \theta,\lambda)$ depends on $x=(x_1,…,x_n)$ only through $n_0$ and $S$.
This is where I am having trouble, I am not sure how to calculate $f$ for this distribution - I’m not sure what the best way to handle these piecewise-given distributions would be.
Here is what I have attempted:
\begin{align*} f_X(x | \theta,\lambda)&=\Pi_{i=1}^n f_{X_i}(x_i | \theta,\lambda) \\ &=\Pi_{i=1}^n(\mathbf{1}_{\{X_i=0\}} (\theta+(1-\theta)e^{-\lambda})+ (1-\mathbf{1}_{\{X_i=0\}})(1-\theta) \frac{\lambda^x e^{-\lambda}}{x!}) \\ &= \Pi_{i=1}^n \left(\mathbf{1}_{\{X_i=0\}}(\theta+(1-\theta)e^{-\lambda}(1-\frac{\lambda^x}{x!}))+(1-\theta)\frac{\lambda^x e^{-\lambda}}{x!} \right)\\ \end{align*}
This can then be expanded out but it becomes really messy and I cannot see any link to either $n_0$ or $S$. What should I do?
Your form of the joint distribution is not very convenient for identifying a sufficient statistic.
Given the data $(x_1,x_2,\ldots,x_n)$, write the likelihood function as
$$ L(\theta,\lambda)=\prod_{i:x_i=0}\left\{\theta+(1-\theta)e^{-\lambda}\right\}\prod_{i:x_i>0}\left\{(1-\theta)\frac{e^{-\lambda}\lambda^{x_i}}{x_i!}\right\} $$
Or,
$$ L(\theta,\lambda)\propto \left(\theta+(1-\theta)e^{-\lambda}\right)^{n_0}\left\{(1-\theta)e^{-\lambda}\right\}^{n-n_0}\lambda^S\,, $$
where $n_0=\sum_{i=1}^n \mathbf1_{\{x_i=0\}}$ is the number of zeros in the sample and $$S=\sum_{i=1}^n x_i\mathbf1_{\{x_i>0\}}=\sum_{i=1}^n x_i$$
That is,
$$ L(\theta,\lambda)\propto \left\{(1-\theta)e^{-\lambda}\right\}^n\left(\frac{\theta+(1-\theta)e^{-\lambda}}{(1-\theta)e^{-\lambda}}\right)^{n_0}\lambda^S $$
This shows that a sufficient statistic is $T=(n_0,S)$.