# Context

Let $$Y\sim \text{Bernoulli}(p)$$ with probability mass function $$\mathbb{P}(Y = y) = p^y(1 - p)^{1-y}$$ Define a new random variable $$Z = a + bY$$. What is the probability mass function of $$Z$$?

# My Working

According to this set of notes we follow these steps:

1. Write $$Y = \frac{Z - a}{b} =:v(Z)$$
2. Find derivative $$\frac{d v(Z)}{dZ} = \frac{1}{b}$$
3. Write pmf $$\mathbb{P}(Z=z) = \left|\frac{1}{b}\right|p^{v(z)}(1 - p)^{1 - v(z)} = \left|\frac{1}{b}\right|p^{\frac{Z - a}{b}}(1 - p)^{1 - \frac{Z - a}{b}}$$

Is this correct?

$$Z$$ has two possibilities: $$a, a+b$$ with probabilities $$1-p,p$$ respectively. We can use your formulation to write it compactly, but note that we can only substitute $$a,a+b$$ into this equation: $$P_Z(z)=p^{{Z-a}\over b}(1-p)^{1-{{Z-a}\over b}}$$
Just as we can only substitute $$y\in\{0,1\}$$ in the original Bernoulli PMF. For other values, the PMF is $$0$$ because the probability is $$0$$. That set of notes assumes continuous variables by the way.
• I don’t understand what you mean by “it has two probabilities $a$ and $a+b$”. Those are just real numbers? – Euler_Salter Jan 4 '20 at 19:49