How can I compute the variance of the sample mean estimator?

In summary, the conversation discusses the computation of the expected value of an estimator for a discrete random variable with unknown distribution. The estimator is defined as the mean of a set of samples, and the expected value of this estimator is equal to the expected value of the random variable. The conversation also touches on the concept of random variables and their properties, and provides insights on how to manipulate expectations for performing algebraic operations.
  • #1
mnb96
715
5
Hello,
I have a discrete random variable z whose expected value [itex]\mu[/itex] is unknown. Its distribution is also unknown.
We extract N samples [itex]z_1,\ldots,z_N[/itex], where each sample is an integer number: [itex]z_i\in \mathbb{Z}[/itex].

Now, I introduce an estimator for the expected value defined as follows:

[tex]\overline{z}=\frac{1}{N}\sum_{i=1}^N z_i[/tex]

How should I compute the expected value [itex]E[\overline{z}][/itex] of the estimator [itex]\overline{z}[/itex]?

***
In my lecture notes I read:
[tex]E[\overline{z}]=E[\frac{1}{N}\sum_{i=1}^N z_i]=\frac{1}{N}\sum_{i=1}^NE[z_i]=\mu[/tex]

This makes no sense to me, especially the term [itex]E[z_i][/itex].
What is supposed to represent the expected value of an observation?!
 
Physics news on Phys.org
  • #2
hello mnb96! :smile:

E[zi] = µ, because zi is the same random variable as z (it just has a different name) :wink:
 
  • #3
thanks! ;)
I see...so whenever I am given a sample of a random variable which is not explicitly specified, I have to replace it with the random variable itself, because it could be potentially any other sample?
 
  • #4
hi mnb9! :wink:

i'm not sure i understand your logic, but yes, a random variable and a sample of the same random variable are the same thing, you can replace one by the other :smile:
 
  • #5
Hi tiny-tim,
indeed I am struggling for trying to make sense of something that doesn't yet fully make sense to me: random variables :)

I don't seem to have solved my problems with this issue, in fact, I tried to compute an estimate for the unknown variance of the estimator [itex]\overline{z}[/itex] with no success. I'll illustrate my problem:

[tex]Var(\overline{z}) = E(\overline{z}^2)-E(\overline{z})^2 = E([\frac{1}{n}\sum_i z_i]^2) - \mu^2[/tex]

Now according to me, the random variables [itex]z_i[/itex] are all the same because they are samples coming from the same distribution of z, so [itex]z=z_1=\ldots=z_n[/itex] and I could simply conclude by (wrongly) asserting that:

[tex]E([\frac{1}{n}\sum_i z_i]^2) = E(\frac{1}{n^2}[\sum_i z]^2)=E(z^2)=Var(z)[/tex]

According to my lecture notes this is not correct; they basically do this:

[tex]E([\frac{1}{n}\sum_i z_i]^2) = E([\frac{1}{n}\sum_i z][\frac{1}{n}\sum_j z_j])=E(\frac{1}{n^2}\sum_i \sum_j z_i z_j)=\ldots[/tex]

After this, they follow their computation that ends up with [itex]\frac{n-1}{n}Var(z)[/itex].

Studying books didn't help me understand what do I have to think of whenever I write the name of a random variable. Is it a function? of course not...Is it an element of an event space? no way...is it a scalar? no...so how am I supposed to know how to perform algebraic operations between some sort of "chameleon-like entities"? :confused:

Frustration levels are rising... :smile:
 
  • #6
hi mnb96! :smile:

i don't understand this part (i've tidied it up :wink:) …
mnb96 said:
[tex]E\left(\frac{1}{n^2}\left[\sum_i z_i\right]^2\right)=E(z^2)[/tex]

E(∑ zi) = E(z),

but that doesn't mean that E(∑ zi2) = E(z2) :confused:
 
  • #7
maybe it could help a lot if you make me understand how the sum of two random variables is defined.

PS: how did you write E(∑ zi) = E(z) without using latex?
PS2: is there a keyboard short cut for latex input, analogous to ctrl+i, ctrl+b for italic/bold ?
 
  • #8
hi mnb96! :smile:
mnb96 said:
maybe it could help a lot if you make me understand how the sum of two random variables is defined.

sorry, i don't understand the question :confused:

the sum of two random variables is one random variable plus the other random variable
PS: how did you write E(∑ zi) = E(z) without using latex?
PS2: is there a keyboard short cut for latex input, analogous to ctrl+i, ctrl+b for italic/bold ?

use the X2 icon just above the Reply box for subscripts, and copy-and-paste the characters below :wink:

(and no, no keyboard short-cut, though the ∑ icon above the Reply box can be helpful)
 
  • #9
thanks for the latex hints!

Regarding my question: I just read that if X and Y are two discrete independent random variables having the same distribution, the pdf of X+Y is given by the convolution of X and Y.

If nothing else, this at least shows that Z1+...+Zn [itex]\neq[/itex] nZ, so the expression that you didn't understand is clearly wrong, and I notice that the operator + for random variables has very little to do with the + for scalars.
 
  • #10
mnb96 said:
Regarding my question: I just read that if X and Y are two discrete independent random variables having the same distribution, the pdf of X+Y is given by the convolution of X and Y.

ah, that's because the pdf is d/dx P(X≤x), or loosely speaking P(X=x) …

so, loosely speaking, the pdf for X+Y is P(X+Y=x) = ∫ P(Y=y)P(X=x-y) dy …

just set-theory, really! :wink:
 
  • #11
ok thanks!
I will do more exercises on these topics.
Hopefully practice will help understand better.
 
  • #12
mnb96 said:
Studying books didn't help me understand what do I have to think of whenever I write the name of a random variable. Is it a function? of course not...Is it an element of an event space? no way...is it a scalar? no...so how am I supposed to know how to perform algebraic operations between some sort of "chameleon-like entities"? :confused:

Frustration levels are rising... :smile:

The modern definition of random variables was several hundred years in the making, so don't worry if the underlying concepts take a while to sink in :)

Actually a r.v. can be defined as a function (that maps an event w to a real number X(w)) which is useful for doing more complicated stuff in a precise & natural way. Something to look forward to if you decide to continue your studies in probability theory.

For now, to understand the properties of the basic statistical estimators of mean and variance, it's enough to become familiar with the rules for manipulating expectation formulas.

Also be aware of the difference between "variance of the sample mean" (which equals Var(Z)/n) and "mean of the variance estimator" (which equals ((n-1)/n)*Var(Z)).
 
  • #13
Hi bpet,
thanks for your support! :)
I am now forcing myself to think of rv as functions as you said, in order to prevent trivial mistakes.

I followed your advice and I tried to compute both the variance of the mean estimator and the mean of the variance estimator. Finally, I got the correct result.

It was interesting to note that the "variance of the sample mean" converges to zero when infinite samples are provided (I guess it follows from the central limit theorem?), and to notice that the variance estimator I defined is biased, but asymptotically unbiased.
 

Related to How can I compute the variance of the sample mean estimator?

1. What is an estimator for expected value?

An estimator for expected value is a statistical method used to estimate the true expected value of a random variable based on a sample of data. It is used to make predictions about a population based on a smaller subset of data.

2. How is an estimator for expected value calculated?

An estimator for expected value is calculated by taking the sum of the values in a sample and dividing it by the number of observations in the sample. This gives an average, or sample mean, which can be used as an estimate for the true expected value.

3. What are the assumptions for using an estimator for expected value?

The assumptions for using an estimator for expected value include having a random sample from a population, independence between observations, and having a large enough sample size to accurately represent the population.

4. What is the purpose of using an estimator for expected value?

The purpose of using an estimator for expected value is to make predictions about a population based on a smaller sample of data. It allows for inference about a population without having to collect data from the entire population.

5. How accurate is an estimator for expected value?

The accuracy of an estimator for expected value depends on the sample size and the variability of the data. Generally, as the sample size increases, the accuracy of the estimator also increases. However, there may be cases where the estimator is biased or the data is highly variable, resulting in less accurate estimates.

Back
Top