I'm trying to generate multivariate monomials in variables $p_1, \ldots, p_n$. Each monomial has either $p_i$ as a factor, otherwise $(1-p_i)$. I need to generate all monomials which have exactly $k$ variables in the $p_i$ form.
(Essentially there are $n$ coin tosses, the coins having probabilities $p_i$, and I want all monomials corresponding to the probabilities of different ways of getting exactly $k$ heads.)
I tried generating subsets of $\{1,\ldots, n\}$ of size $k$ and manipulating the resulting lists into monomials, but I'm too inexperienced with Mathematica.
eg. if $n=3$ and $k=1$, the list of monomials are $$\{p_1(1-p_2)(1-p_3), (1-p_1)p_2(1-p_3), (1-p_1)(1-p_2)p_3\}$$