# Doubt in empirical distribution, sample and random variable

I have a basic doubt in sample and random variables. I have read related posts on this site but still some doubt is still left.
Suppose we have a population and we are drawing some entries from it which is called as sample. Suppose we have n entries then we say that "we have drawn a sample of size n".
Now, the doubt begins when we try to associate the random variable with it.
Suppose in the first experiment we draw a sample of size "n". The corresponding random variable is $$X_1$$ where the range($$X_1$$) is the sample itself.
Suppose we have done the experiment $$k$$ times, so we have $$X_1,\;X_2,\;...,\;X_k$$ random variables each corresponds to a sample of size $$n$$.

This is the conclusion I have made so far after reading many related posts.

Now I am reading a book on statistics and there it is written that,

Let $$X_1,\;X_2,\; . . . ,\;X_n$$ be i.i.d. random variables. The “empirical distribution” based on these is the discrete distribution with probability mass function given by
$$f(t) = \frac{1}{n} \#{\{X_i=t}\}$$
The sample mean of these is $$\bar X = \frac{X_1+X_2+...+X_n}{n}$$
$$\bar X$$ is also a random variable.

So from this I can infer that each $$X_i$$ corresponds to a particular sample from the population not the $$n$$ values of a random variable $$X$$.
But in the definition of empirical distribution there is no emphasis on the size of the sample corresponding $$X_i$$. Has it been assumed each sample also has size $$n$$ because if each sample has size $$k\neq n$$ then there should be $$k$$ in the denominator of the empirical distribution?

Also here the sample mean is basically a random variable. But by terminology, one can thought of sample mean as mean of a sample that is expectation of a particular random variable in the above context that sample mean, i.e., $$\frac{\sum_j X_{ij}}{k}$$. But here sample mean is a random variable. I have seen the same terminology in other books also as used in this book. Isn't they make the concepts confusing. I think there should be better term for this instead of sample mean. Or may be I am misunderstanding something.

Update
After reading the comments, I have found precisely what is my doubt.
In Sheldon Ross's Probability and Statistics, it is written that

If $$X_1,\;X_2,\;...,\;X_n$$ are independent random variables having a common distribution $$F$$, then we say that they constitute a sample (sometimes called a random sample) from the distribution $$F$$.

I am slightly confused with definition of sample. Suppose our population is the annual income of a person lived in a particular city. So we take say 10 people from the population record their income (so we can attribute a correspondence between people and income as a random variable) denote it by $$X_1$$.
Now we put those $$10$$ people back in the population and again take $$10$$ people from it randomly denote by $$X_2$$. We have repeated it say $$20$$ times.
So we have $$X_1,X_2,...,X_{20}$$. I have a doubt that would we call it the $$20$$ samples of $$10$$ people each or just one sample of $$200$$ people (or more precisely the $$200$$ values of incomes)?

• You go astray at the outset by not distinguishing the values of random variables from outcomes from samples. See stats.stackexchange.com/a/54894/919 for one explanation of the difference. A similar explanation at stats.stackexchange.com/a/96000/919 covers the sum of random variables, which (upon division by a constant) gives the sample mean.
– whuber
Feb 4 at 19:12
• A couple of points to remember: (a) sampling without replacement from a finite population is not the same thing as sampling from a distribution (in the former, you do not have independence between the individual observations); (b) the sample mean can used to describe the mean of the $n$ values you have observed (and so is what it is), or the mean you might observe taking a sample sized $n$ (and so would be a random variable with a distribution) Feb 4 at 19:45
• @whuber, thanks for sharing the train-in-a-model, it simplifies a lot of concepts. I have one doubt. So basically in a box we have tickets, they are basically "population". Now suppose we are drawing "$k$" tickets with replacement as our first experiment denote that sample by random variable $X_1$. We do this process say $n$ times. So we have $k$ random variables, these random variables are actually same (as the assignment is same, it is just that the values we get in the $n$ experiments are different)
– Iti
Feb 5 at 4:12
• As given in the question, the empirical distribution for any $X_i$, will it be $f(t)=\frac{1}{k}#{\{Xi=t}\}$. But in the definition, given in my question, the size of each sample is irrelevant? Or are they considering implicitly that each $X_i$ corresponds to a sample of size $n$?
– Iti
Feb 5 at 4:14
• I will repeat: a sample is not a random variable!
– whuber
Feb 5 at 14:55