Why is expected value of random variable equal to mean While learning about Random variables I came across the mean of random variable X.
The definition says that the expected value of random variable E(X) = Mean of Random variable X
I am not able to understand why is that so.
Can any one please help me with it  
 A: For a discrete random variable, $$\text{E}[X] = \sum_{\text{all possible } x} x\,P(X=x)$$. 
If you consider the roll of a 6-sided (fair) die, then this is just a weighted arithmetic average. If $N: \text{number of dots face up after a roll}$, then $$\text{E}[N] = 1\frac{1}{6}+2\frac{1}{6}+3\frac{1}{6}+4\frac{1}{6}+5\frac{1}{6}+6\frac{1}{6}$$.
For a continuous random variable, we use the probably density, $f_X(x)$, which is a measure of the intensity (a derivative of a probability) but it is a similar idea. 
$$E[X] = \int_{-\infty}^{\infty} x\,f_X(x)dx$$
The intuition is that both are these are conditioning on all possible values of the random variable,$X$, and weighting those possible values with the chance they occur.  So, the expected value is an arithmetic mean.
You can compare this mathematically with the geometric mean to see the difference. 
If this still isn't clear, feel free to comment.
A: Your question can be read in two ways: (1) How does expected value relate to mean of a distribution? or (2) How does expected value of a random variable relate to arithmetic mean of a sample?
In first case, the answer would be that they are the synonyms.
As about the second case, let's look at them a little bit closer. Recall that expected value of a discrete random variable is defined as $E(X) = \sum_x x\,P(x)$. Say that you take a random sample of size $N$ and observe the $x_1,x_2,\dots,x_N$ samples, that all follow the same probability distribution. It can happen that some of the observed samples have the same value, say $x_2,x_5,x_{N-3}$ all are equal to $x$, so we can say that we observed $n(x) = 3$ values $x$ in the sample. Given that the sample is random and large enough, you can expect that proportion of observing any particular value would be close to the probability of drawing this value from the distribution they follow, i.e. $\tfrac{n(x)}{N} \approx P(x)$. Now, if we calculate arithmetic mean, we get
$$
\frac{1}{N} \sum_{i=1}^N x_i = \frac{1}{N} \sum_x x\,n(x) = \sum_x x\tfrac{n(x)}{N} \ \approx \sum_x x\,P(x)
$$
Same is true for continuous random variables, where we define expected value as $E(x) = \int x\,f(x)\,dx$. Probability density is the probability per foot. Notice that $P(t_i < x \le t_{i+1}) = \int_{t_i}^{t_{i+1}} f(t)\,dt$. If we binned the continuous variable into some number of buckets, then you could take the integrals to calculate probability that some $x$ falls into some particular bucket $(t_i, t_{i+1}]$. Calculating expected value for such binned variable is the same as with discrete random variable, because by binning we discretized it. As we move from finite number of buckets, into infinite number of infinitesimally small bins, we re talking about probability densities instead of probabilities and we are talking about continuous random variables again, so there comes all the calculus, but the basic ideas are the same.
