Decimation vs Mean in downsampling operation

Let's suppose I have a discrete signal $$x[n]$$ with a certain frequency $$f_x$$.

Now, due to various unimportant reason, I want to obtain a new signal $$y[m]$$ with a new frequency $$f_y = \frac{f_x}{k}$$, with, for example $$k = 10$$.

Now, there are various ways to do it, I am for the moment interested in two:

Decimation:

$$y_d[m] = x[m* k + (k - 1)]$$

Mean:

$$y_a[m] = \frac{1}{k}\sum_{i=m*k}^{m*k+k-1}{m[i]}$$

What are the differences between the two, from a theoretical standpoint? What effect on the spectrum of $$y_d$$ and $$y_a$$?

I have limited knowledge of signal processing, so sorry for if something confuses you. A brief explanation with some references for further reading would be perfect.

What you are calling decimation is in fact downsampling: keeping one of every $$k$$ samples from the original signal.
Proper decimation involves a digital low-pass filter in order to eliminate all components above $$\pi/k$$ (or $$f_s/(2k)$$ in continuous time) since these components cannot be represented at the new lower sampling frequency (and will result in aliasing).
After low-pass filtering, you downsample your signal keeping one out of every $$k$$ samples.