The expected value describes which result can be expected in a random experiment if it is repeated very often. The term comes from probability theory, the so-called stochastics. In the case of a dice roll, for example, the expected value provides information about the value that can be expected in the long term if the dice are rolled very often in succession.

**Note**: In general, the expected value and the arithmetic mean are two different concepts, which in most cases will also differ for the same random experiment. Only if a random experiment is repeated infinitely often, the expected value and the arithmetic mean have the same value.

### Calculation for discrete random variables

A random experiment with a discrete random variable is characterized by the fact that there is only a finite set of outcomes. In the case of a dice roll, this means that the result must be one of the six numbers between 1 and 6. The numbers of the dice have the following probabilities of occurrence:

x | 1 | 2 | 3 | 4 | 5 | 6 |

P(X = x) | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 |

For a discrete random variable X, which takes the values x_{1}, x_{2}, …, x_{n} with the probabilities P(X = x_{i} ), one calculates the expected value E(X) as follows:

\(\) \[E(X) = x_1 \cdot P(X = x_1) + x_2 \cdot P(X = x_2) + … + x_n * P(X = x_n)\]

In words: The expected value is the sum of all values of the random variables multiplied by their probabilities.

For our example, this means:

\(\) \[E(X) = 1 \cdot \frac{1}{6} + 2 \cdot \frac{1}{6} + 3 \cdot \frac{1}{6} + 4 \cdot \frac{1}{6} + 5 \cdot \frac{1}{6} + 6 \cdot \frac{1}{6} = \frac{21}{6} = 3,5 \]

This means that in the long run, you can expect a value of 3.5 when rolling a single dice.

### Calculation for Continuous Random Variables

If the random variable in the experiment can take any value within a certain interval, it is called a continuous random variable. Continuous random variables are, for example, body sizes, the average temperature in a refrigerator, or the speed of a car at a speed camera. Continuous random variables occur above all when the value comes about through a measurement process and the process is influenced by disturbance variables.

If we want to calculate the expected value for a continuous random variable, we cannot do this by summing up all possible values of the random variable multiplied by the corresponding probability, since there is theoretically an infinite number of values that the variable can assume. Therefore, the probability distribution of a random variable is described by the density function and its integral of the distribution function. We already know this from the normal distribution.

### Example Temperature Refrigerator

The refrigerator temperature varies between 0 and 4 degrees Celsius when the door is opened or because electricity is to be saved. Many modern refrigerators purposefully allow the interior to warm up a bit before starting to cool again, in order to operate as efficiently as possible and save electricity. These variations can be described by this density function:

\(\) \[f (x) = \left\{

\begin{array}{ll}

-0,125x + 0,5 & 0 \leq x \leq 4 \\

0 & \, \textrm{sonst} \\

\end{array}

\right. \]

If we calculate the interval with the limits 0 and 4, we get the expected value:

\(\) \[E(X) = \int_{0}^{4} x \cdot (-0,125x + 0,5) \text{dx} = \left[-124x³ + 14x²\right]_{0}^{4}= \frac{4}{3} – 0 = \frac{4}{3}\]

Thus, the expected temperature in the refrigerator is about 1.3 degrees Celsius.

### What can you use the Expected Value for?

The expected value is used in a wide variety of applications:

**Gambling**: To find out whether a game is fair or not, the expected value is calculated, depending on the possible outcomes of the game. If it is greater than zero, we speak of a game that is favorable for the player, since he can win money in the long run. If the expected value is less than 0, it is called an unfavorable game, since the player loses money in the long run.**Economics**: Many business decision situations involve parameters that are subject to probability. Will the machine break down in the next three months? How likely is it that a certain employee will leave the company in the next 12 months? In such situations, the expected value is calculated to determine whether an investment will yield a profit or not.**Capital Market**: Here, too, financial institutions have to reckon with many uncertainties and cannot firmly assume a price gain or loss. In portfolio creation, i.e., the compilation of various stocks into a portfolio, reliance is placed on the weighted average, among other things.

### This is what you should take with you

- The expected value and the arithmetic mean (colloquially: average) are the same only in a few borderline cases.
- The expected value expresses the result that can be expected in the long term if a random experiment is carried out frequently.
- For discrete random variables, the expected value is the sum of all values of the random variables multiplied by their probabilities.
- For continuous random variables, we use the distribution function and form the interval for the range we want to investigate.

### Other Articles on the Topic of Expected Value

- Another approach with examples can be found here.