Mean and variance of a probability distribution. I am confused between mean and variance of a statistical data and the probability distribution. Are both of them different to each-other? as in its simple form, the mean is given in terms of the sum of variables and its frequency divided by total no. of frequency. But when it comes to probability distribution, the mean is computed in totally different way and there is no concept of frequency etc. If both mean represents the same thing then can we conclude that the statistical variable is replaced by random variable and its frequency is substituted by the probability of accurance of the random variable ?
 A: I am not sure if I will reply correctly to your question, but here is an explanation:
You have two different things, first, for a random variable $X$ taking value in a set $\chi$ that follows a distribution $P$, you can compute $\mathbb{E}[X]$, the expected value of X, that is given by the followings equations regarding that $P$ is discrete (1) or continuous (2):
$$
\mathbb{E}[X] = \sum_{x \in \chi} xP(X=x) \ (1),
$$
$$
\mathbb{E}[X] = \int_{ \chi} xp(x)dx \ (2),
$$
where $p$ is the density function of $X$ if $P$ is continuous. Those values represent the value that you will observe on average if you do a lot observations of $X$. This means that for a $n\in \mathbb{N}$ sufficiently large such that $X_1,\cdots, X_n$ are observations of $X$, you would have $\sum_{i=1}^n X_i/n = \mathbb{E}[X]$.
So, from it, it seems natural to define $\hat{\mathbb{E}[X]}$ the estimator of $\mathbb{E}[X]$ as follows:
$$
\hat{\mathbb{E}[X]} = \sum_{i=1}^n X_i/n.
$$
You can have a look on this wikipedia page under the topic Mean of a probability distribution. (https://en.wikipedia.org/wiki/Mean#Mean_of_a_probability_distribution).
Another reason that comforts us in the idea that $\hat{\mathbb{E}[X]}$ is a good estimator of the mean is the law of large numbers, see the following link: https://en.wikipedia.org/wiki/Law_of_large_numbers .
