In general, if I have a collection of data then mean(Expectation) and standard deviation are calculated as follows
$$\text{mean } = \mu = \mathbb{E}[X] = \sum\limits_{i = 1}^n p_ix_i $$ $$\text{Variance =}\sigma (X) = \sqrt{\sum\limits_{i = 1}^{n}p_i{(x_i - \mu)^2}{}}$$
where $X$ is a random vector having support $\{x_1, x_2, x_3, \cdots, x_n\}$.
Thus a dataset of samples have a single mean and single variance.
Now, let us discuss about the case of variational auto-encoders. They look like follows
Suppose I trained the above auto-encoder on a training set, then for each sample I will get a mean and standard deviation at latent layer. Here, we can get a new $\mu$ and $\sigma$ for each data sample. But, as we see earlier, mean and standard deviation exists for a dataset and not for each sample.
I am confused about "how can we say that mean and standard deviation are obtained at latent layer if they are not constant in nature"?