| # Mean and Covariance Matrix of a Random Variable If is a vector random variable, the mean of is , where denotes the expectation operator with respect to the distribution that follows. The covariance matrix of is defined as Note that the covariance matrix is always a positive semi-definite matrix. Assume that the distribution is discrete, with the probability that the random variable takes a certain value , . Then the expected value of is and the covariance matrix is Example: if takes the two values , with with the probability of (resp. ) being (resp. ), then the mean of is and its covariance matrix is