Let $X_1, \ldots, X_n$ be an i.i.d random variables following an exponential family with parameter $\theta$, that the density is written as $$f(X_i=x_i;\theta) = h(x_i)\exp(x_i\theta - b(\theta)).$$
Now we consider $B_1, \ldots, B_n$ be an i.i.d Bernoulli random variables with parameter $p$.
We suppose that $B_i$ is independent of $X_i$. We denote by $Y_i = B_iX_i$.
The question is to calculate the likelihood of the observations $Y_i$ \begin{align*} L(Y;(p,\theta)) = \prod_{i=1}^n f(y_i;(p,\theta)). \end{align*}
Please any suggestions?
Best
As per your assumption that $B_{i}$ is independent of $X_{i}$, \begin{align} f(y_{i}; (p, \theta)) & = f(x_{i}; \theta) \times f(b_{i}; p) \\ & = h(x_{i}) \exp [x_{i}\theta - b(\theta)] p^{k} (1-p)^{1-k} \end{align}
Hence, \begin{align} L(Y; (p, \theta)) & = \prod_{i = 1}^{n} f(y_{i}; (p, \theta)) \\ & = \prod_{i = 1}^{n} h(x_{i}) \exp [x_{i}\theta - b(\theta)] p^{k} (1-p)^{1-k} \\ & = \left[\prod_{i = 1}^{n}h(x_{i})\right] \exp \left[ \left\{\sum_{i = 1}^{n}x_{i}\theta\right\}-nb(\theta)\right]p^{nk}(1-p)^{n(1-k)} \end{align}