# Calculate the PMF, mean and variance of X for x=-1,1

An Urn contains 7 red and 11 white balls. Draw one ball at random from the urn. Let X=1 if a red ball is drawn, and let X=-1 if a white ball is drawn. Give the pmf, mean, and Variance of X.

I know how to give the pmf, mean, and variance if X=0 or 1, but the -1 throws me off. How would i go about doing this? Thank you for any help!

Just use the formulas as you would in any other given scenario...

PMF:

• $P(X=+1)=\dfrac{7}{18}$
• $P(X=-1)=\dfrac{11}{18}$

Mean: $1\cdot\dfrac{7}{18}-1\cdot\dfrac{11}{18}=-\dfrac{2}{9}$

Variance: $(1+\dfrac{2}{9})^2+(-1+\dfrac{2}{9})^2=\dfrac{170}{81}$

Hint: If $Y=2X-1$ then:

• $\Pr(Y=2x-1)=\Pr(2X-1=2x-1)=\Pr(X=x)$
• $E[Y]=E[2X-1]= 2E[X]-1$
• $Var[Y]=Var[2X-1]=Var[2X]+Var[1]=2^2Var[X]+0=4Var[X]$

since $X$ and $1$ are independent and $1$ is a constant.

PMF: $$f(x)=\begin{cases} 7/18, & \text{if x=1}.\\ 11/18, & \text{if x=-1}. \end{cases}$$

Mean: $$E(X) = x_1P(x_1) + x_2P(x_2) = 1 * 7/18 - 1 * 11/18 = -2/9$$

Variance:

$$\sigma^2 = (x_1 - E(X))^2 * P(x_1) + (x_2 - E(X))^2 * P(x_2) = (11/9)^2 * 7/18 + (7/9)^2 * 11/18 = 77/81$$