how to compute unbiased estimator Suppose $X_1,X_2,...,X_n$ is a random sample of size n drawn from a Poisson pdf where $\lambda$ is an unknown parameter. Show that $\hat \lambda = \bar X$ is unbiased for $\lambda$. For what type of parameter, in general, will the sample mean necessarily be an unbiased estimator? (Hint: The answer is implicit in the derivation showing that $\bar X$ is unbiased for the Poisson $\lambda$)

$$E(\bar X) = E(\frac{1}{n} \sum_{i=1}^n X_i)= \frac{1}{n} \sum_{i=1}^nE(X_i)=\frac{1}{n}\sum_{i=1}^n\lambda =\lambda$$

im totally confused by this idea of unbiasedness? what is it? and how do you compute it in the general sense, whats the first step, second step ... 
 A: Suppose we have a collection of samples $X_1,X_2,\dots,X_n$ that have been drawn from some fixed probability distribution (Poisson, exponential, normal, etc.) that depends on some unknown parameter $\mu$. 
We often want to use the samples to estimate the value of $\mu$. To this end we come up with functions that take in $X_1,X_2,\dots,X_n$ and return an estimate of $\mu$. Any such function is called an estimator.
Now, some estimators are better or worse than others. For example,
$$f(X_1,X_2,\dots,X_n) = 0$$
is clearly a terrible estimator (unless it so happens that $\mu=0$), given that it doesn't use any information provided by the samples.
A basic criteria for an estimator to be any good is that it is unbiased, that is, that on average it gets the value of $\mu$ correct. Formally, an estimator $f$ is unbiased iff
$$E[f(X_1,X_2,\dots,X_n)] =\mu.$$
In your case, the estimator is the sample average, that is,
$$f(X_1,X_2,\dots,X_n)=\frac{1}{n}\sum_{i=1}^n X_i,$$
and it is unbiased since on average it guesses the unknown parameter, $\lambda$, correctly. An example of a biased estimator would be
$$f(X_1,X_2,\dots,X_n)=1+\frac{1}{n}\sum_{i=1}^n X_i,$$
since $E[f(X_1,X_2,\dots,X_n)] = 1+\lambda$. On average it gets the value of $\lambda$ wrong by $1$; it has a bias of $1$.
Returning to the sample average, suppose that the samples are drawn from any distribution (not necessarily Poison) which has an expected value (or mean) of $\mu$. Then
$$E[f(X_1,X_2,\dots,X_n)] = E\left[\frac{1}{n}\sum_{i=1}^n X_i\right] = \frac{1}{n}\sum_{i=1}^n E[X_i] = \frac{1}{n}\sum_{i=1}^n \mu = \mu.$$
So in general, the sample average is an unbiased estimator of the expected value of the distribution from which the samples are drawn.
