Hello

I am looking at a setup where I with probability $\displaystyle \frac{1}{4}$ get the outcome 2 otherwise the outcome is 6. I shall then formulate this mathematically and calculate the mean and variance.

For the mean I calculate it like this:

$\displaystyle \mu = \frac{1}{4} \cdot 2 + \frac{3}{4} \cdot 6 = 5$

And rekcon that the variance will be given as:

$\displaystyle \sigma = E\left[ X^2 \right] - \mu^2 = \left(\frac{1}{4} \cdot 2^2 + \frac{3}{4} \cdot 6^2 \right) - 5^2 =28 -25 =3 $

For the mathematical formulation I am lost but are thinking something along a Binomial distribution, and does it make sense with the variance and mean?