What does this definition, $\bar{Y}= \frac{\sum^M_{i=1}\sum^{N_i}_{j=1} Y_{ij}}{\sum^{M}_{i=1} N_{i}}$, mean? I am studying the topic of cluster sampling. Within this topic I have learnt that the mean per element is defined as $$\bar{Y}= \frac{\sum^M_{i=1}\sum^{N_i}_{j=1} Y_{ij}}{\sum^{M}_{i=1} N_{i}}$$ $M$ denotes the number of clusters. $N_i$ denotes the size of each cluster. $Y_{ij}$ denotes the elements in every cluster. I do not really understand what this definition means. Can someone explain please?
 A: $Y_{i,j}$ represents the value of the $j$th element in cluster $i$. So for instance, $\sum^{N_1}_{j=1} Y_{1j}$ represents the sum of all the elements in cluster $1$. More generally, the inner sum represents the sum of all the elements in cluster $i$.
The outer sum loops over all clusters $M$. So the numerator is the sum of the elements in all clusters.
The denominator is the total number of elements in all clusters. So you're dividing the sum of all the elements by the total number of elements to get the mean value per element.
A: This is the usual notion of mean you've become accustomed to. I'm assuming the notation is what's confusing so the denominator should be easier to understand. If there are M clusters and cluster i contains $N_{i}$ elements then summing all M $N_{i} $ clusters gives you the total number of things in your dataset (the "grand N" which I'll call N with no subscript).
Then, by the same logic, the numerator is the sum of the values of Y at those N number of points (it's probably worth looking at the sums and seeing why the number of terms in the numerator is the same as the N from the denominator). 
Finally, if the numerator is a sum of N things and we divide this value by N we get back a mean.
A: The numerator is sum of all samples (all $Y$'s). The denominator is total number of samples. So this is the mean of all samples.
