A simple question about sampling variance 
Possible Duplicate:
A question about sampling distribution 

We defind a variance of a random variable $X$ as $E(X-X_{\text{mean}})^2$=$E(X^2)-(E(X))^2$ and the mean = $E(X)$. However, for the case of sampling , Why would find out the sample mean as $\frac{X_1+\cdots+X_n}{n}$ for the case $X_1, \dots,X_n$ are iid and the sample variance are $\frac{\sum_{i=1}^{n} (X_i-X_{\text{mean}})^2}{n-1}$.
 A: If the question is about the 
$n-1$ in the denominator, then this is a tradeoff between bias and accuracy of the estimator.  
See also Bessel's correction.
A: In your comment you concentrated your question on the why the sample mean is defined as $\dfrac{X_1+\cdots+X_n}{n}$.  There are various reasons, some better than others:


*

*It is easy to calculate, in a single pass 

*It is the mean (arithmetic average) of the sample

*If you had sampled the whole (finite) population once each then the sample mean defined this way is the population mean.

*The expectation of the sample mean is the population mean, so it is an unbiased estimator of the population mean

*By the law of large numbers, the sample mean converges in some sense to the population mean as the sample size increases

*If the population has a finite variance then by the central limit theorem the distribution of the sample mean converges towards a normal distribution with the same mean as the population mean as the sample size increases

*For some families of distributions (but not others) the sample mean is a sufficient statistic, holding the useful information the sample provides about the parameters of the distribution 

