# Expectation of Bernoulli r.v. of arbitrary support $k\in\{a,b\}$?

How does one adapt the properties of Bernoulli variable to an arbitrary support $k\in\{a,b\}$, when the Bernoulli is typically defined for $k\in\{0,1\}$?

I'm specifically interested in $\mathbb{E}(X)$ for $X$~$Bernoulli$ where $k\in\{a,b\}$.

• It's called a 2 point distribution (see Wikipedia for Bernoulli) and you just calculate p. a +(1-p).b Nov 28, 2015 at 22:36
• Hint: If $Z$ is a "typical" Bernoulli with probability of success $p$, what is the distribution of the random variable $X = a+(b-a)Z$? Conclusion(s)? Nov 28, 2015 at 23:11

This is a distribution which takes the value $a$ with probability $1-p$ and $b$ with probability $p$.

Just use standard definition of expectation.

$E(X)=\sum_x x\, p(x) = a\, p(a) + b\, p(b)$ and simplify from that.

Similarly

$E(X^k)=\sum_x x^k\, p(x) = a^k\, p(a) + b^k\, p(b)$

Of course you can also do it (get mean, variance, etc) by rescaling the standard Bernoulli using basic properties of expectation and variance.

Let $Z$ be a Bernouilli random variable with success rate $p$, and let $X$ be a random variable such that $X=b$ when $Z$ is a success and $X=a$ when $Z$ is a failure. Then $X$ has the probability mass function $f(x)$ given by

$$f(x) = \begin{cases} p & \text{if } x=b \\ 1-p & \text{if } x=a. \end{cases}$$

The expected value of a random variable is defined as the weighted sum of the support, with the probabilities as weights. Then the expected value of $X$ is given by

\begin{align*} \mathbb{E}[X] &= b f(b)+ a f(a) \\ &= bp + a(1-p). \end{align*}

Note that if we simply assigned $p=\mathbb{P}\{X=b\}$ from the beginning, we would not have needed $Z$ in the formulation of $X$.

For example, suppose that we want a random variable $Y$ such that $\mathbb{P}\{Y=10\}=0.6$ and $\mathbb{P}\{Y=-5\}=0.4$. Then $\mathbb{E}[Y] = (10)(0.6)+(-5)(0.4) = 4$.

Let $(\Omega, \mathscr F, \mathbb P)$ be a probability space. Then

Bernoulli $X$:

$$X = 1 \times 1_A + 0 \times 1_{A^C}$$

where $A \in \mathscr F$, $P(A) = p = 1 - P(A^C)$

Extend:

$$X = b \times 1_A + a \times 1_{A^C}$$

for $a, b \in \mathbb R$

If $a$ = $-1$ and $b$ = $1$, then $E(X)$ = $2p - 1$. So, if $p$ = .5 then $E(X)$ = $0$.