Let $Y_1, \ldots, Y_n $ be a random sample of size $n$ where each $Y_i \sim \textrm{Bernoulli}(p), $ and let $Y = \sum Y_i $ for $i = 1, \ldots, n.$
The estimator is $W= (Y+1)/(n+2). $
Is the estimator a sufficient statistics for parameter p?
I wanted to use the factorization theorem for this problem and wrote out the joint pdf, but I was stuck on rearranging the joint pdf
$$f(y_1,\ldots, y_n;p)= \prod p^{y_i}(1-p)^{1-y_i}. $$