A random variable is a real-valued function $X: \Omega \to \R$.
We use upper case letters $X, Y$, etc. to denote random variables, and lowercase letters $x,y$, etc. to denote possible numerical values.
A discrete random variable $X$ is a random variable $X$ whose range is either finite or countably infinite. In this case we define the probability mass function (PMF) $p_X : \R \to [0, 1] $
$$p_X(x) = \b{P}(X = x) = \b{P}(\set{ \omega \in \Omega : X(\omega)} = x) , x \in \R$$
Let $X$ be a discrete random variable. Its expected value,
$$E[X]=\sum_{x}xp_X(x)$$
Let $X$ be a discrete random variable, let $g: \R \to \R$. Then
$$E[g(X)]=\sum_xg(x)p_X(x)$$
The varience of $X$, denoted $var(X)$ is defined as
$$var(X) = E[(X-E[X])^2]$$
$\sigma_x = \sqrt{var(X)}$ is the standard deviation of $X$.