Topic

The expected value represents the long-run average of a random variable’s possible outcomes. It’s calculated as the sum of all possible values weighted by their probabilities.

For discrete random variables:

For continuous variables:

Key properties:

  • Linearity:
  • Additivity:

The sample mean

estimates the population expected value from observed data

from numpy import array, mean
 
M = array([
[1,2,3,4,5,6],
[1,2,3,4,5,6]])
 
col_mean = mean(M, axis=0)
row_mean = mean(M, axis=1)