PMF for a disscrete random variable X: $p(X)$
Mean (Expectation)
*the sum of the weighted possible values of X (sum of $p(X=x)x$ )
Tip
$$\mu = E[X] = \sum_{x} x p(X=x)$$
Variance
measure the spread of a PMF (Average Squared Distance from the mean)
Tip
$$\sigma^2 = Var[X] = E[(X-\mu)^2] = E[(X-E[X])^2] = E[X^2] - (E[X])^2$$
calculation: using the expected value rules: $$Var[X] = E[(X-\mu)^2] = E[g(x)] = \sum_x g(x)p(X=x) = \sum_x (x-\mu)^2p(X=x) $$
Info
$$Var[X] = \sum_x (x-\mu)^2p(X=x) $$
$$Var[X] = E[(X-\mu)^2] = E[X^2 - 2X\mu + \mu^2] $$ $$Var[X] = E[(X-\mu)^2] = E[X^2] - 2\mu E[X] + \mu^2 $$ $$Var[X] = E[X^2] - 2 (E[X])^2 + E[X]^2 $$
Info
$$Var[X] = E[X^2] - (E[X])^2 $$
References
[2] https://www.youtube.com/watch?v=ZWo1XgAQE5k
regarding variance: https://stats.libretexts.org/Courses/Saint_Mary's_College_Notre_Dame/MATH_345__-_Probability_(Kuter)/3%3A_Discrete_Random_Variables/3.7%3A_Variance_of_Discrete_Random_Variables