# Why is expectation the same as the arithmetic mean?

I am a beginner in statistics and probability study. Today I came across a new topic called the Mathematical Expectation. The book I am following says expectation is the arithmetic mean of any random variable coming from any probability distribution. But it defines expectation as the product of some data and the probability of it. How can these two be same? How can the probability times the data be the average of whole distribution??

-

Informally, a probability distribution defines the relative frequency of outcomes of a random variable - the expected value can be thought of as a weighted average of those outcomes (weighted by the relative frequency). Similarly, the expected value can be thought of as the arithmetic mean of a set of numbers generated in exact proportion to their probability of occurring (in the case of a continuous random variable this isn't exactly true since specific values have probability $0$).

The connection between the expected value the arithmetic mean is most clear with a discrete random variable, where the expected value is

$$E(X) = \sum_{S} x P(X=x)$$

where $S$ is the sample space. As an example, suppose you have a discrete random variable $X$ such that:

$$X = \begin{cases} 1 & \mbox{with probability } 1/8 \\ 2 & \mbox{with probability } 3/8 \\ 3 & \mbox{with probability } 1/2 \end{cases}$$

That is, the probability mass function is $P(X=1)=1/8$, $P(X=2)=3/8$, and $P(X=3)=1/2$. Using the formula above, the expected value is

$$E(X) = 1\cdot (1/8) + 2 \cdot (3/8) + 3 \cdot (1/2) = 2.375$$

Now consider numbers generated with frequencies exactly proportional to the probability mass function - for example, the set of numbers $\{1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3\}$ - two $1$s, six $2$s and eight $3$s. Now take the arithmetic mean of these numbers:

$$\frac{1+1+2+2+2+2+2+2+3+3+3+3+3+3+3+3}{16} = 2.375$$

and you can see it's exactly equal to the expected value.

-
Thanks @Macro I can see now why is expectation the average. –  Prakash Gautam Jun 13 '12 at 11:28
You're welcome @PrakashGautam, and welcome to the site! If you consider this answer definitive, please consider accepting it (no pressure at all, by the way, if you'd prefer to wait to see whether a better answer comes up) –  Macro Jun 13 '12 at 12:13
since I am new to this great stack network I am not fully aware of such. Your answer though is definitely accepted. –  Prakash Gautam Jun 13 '12 at 12:20
Wouldn't this be better illustrated by using the simpler set of {1,2,2,2,3,3,3,3}? The expression showing arithmetic mean of that set is identical to the expression showing the expectation value of that variable (if you convert the weighted products into simple sums). –  Dancrumb Jun 13 '12 at 17:16
@Macro I did it now. All I needed to do was to click on the tick mark to make it green. :) –  Prakash Gautam Jun 14 '12 at 17:35

The expectation is the average value or mean of a random variable not a probability distribution. As such it is for discrete random variables the weighted average of the values the random variable takes on where the weighting is according to the relative frequency of occurrence of those individual values. For an absolutely continuous random variable it is the integral of values x multiplied by the probability density. Observed data can be viewed as the values of a collection of independent identically distributed random variables. The sample mean (or sample expectation) is defined as the expectation of the data with respect to the empirical distribution for the observed data. This makes it simply the arithmetic average of the data.

-
+1. Good catch re: "The expectation is the average value or mean of a random variable not a probability distribution". I didn't notice this subtle misuse of terminology. –  Macro Jun 13 '12 at 11:21