How is the expected value of a discrete random variable calculated?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In probability theory, the expected value of a discrete random variable X is the weighted average of all possible values that the variable can assume.1

It is calculated by summing the product of each possible value of the random variable and its corresponding probability. The formula is defined as:23

E(X)=∑ixif(xi)

In this formula:
* E(X) represents the expected value, also known as the mean of the distribution.21
* xi represents each individual outcome or value of the random variable.3
* f(xi) represents the probability mass function, which provides the probability of obtaining the value xi.21

For this calculation to be valid, the sum of all probabilities f(xi) must equal 1. The expected value serves as a measure of the location of the bulk of the probability distribution and represents the average outcome expected over many repeated trials of an experiment.312