My professor threw in the random term and never explained what it means cus he's been going on strike for 3 weeks straight.
Let us forget about filters for a moment, and think of their action as a weighted average or the computation of a center of mass. Let us fix the filter to be of length $N=3$, and call the weights $(w_1,w_2,w_3)$. There are several options in applying the weights to a signal $x[n]$ to get a filtered version $y[n]$. From the slides, I guess that the semi-infinite is a kind of causal online version. In simpler word: at index $k$, you get $x[k]$ and you obtain $y[k]$ by performing a weighted average of the last three values of $x$, including the last obtained.
Therefore, the last three values should be $(x[n-2],x[n-1],x[n])$, and you would like to compute:
$$y[n] = w_1 x[n-2]+w_2x[n-1]+w_3x[n]\,.$$
What happens then when:
- $n=1$: this first sample is the first, there is no $x$ defined before, so $x[n-1]=x[1-1]=x$ and $x[n-2]=x[1-2]=x[-1]$ have no meaning, and we don't use the values $w_1$ and $w_2$. We get $y = w_3x$
- $n=2$: this is the second sample, so the first one exists before. So $x[n-1]=x[2-1]=x$ has a meaning, but not and $x[n-2]=x[2-2]=x$. So we can compute $y = w_2x+w_3x$ and we don't use $w_1$.
- $n=3$: now all is good, we have enough samples before $x$ to use all the weights, and $y = w_1 x+w_2x+w_3x\,.$
Now, for all $n\ge 3$, the last situation happens, and we have enough samples to perform a full weighted average, until the end of $y[n]$. Finally, you have incomplete weighting for $n\le 2$, hence a edge effect, and no more after that. The above reasoning works accordingly for other filter lengths.
Nota: techniques to overcome this issue consist in providing regular extensions to the signal when it is unknown (as said in another answer) or adapt the filter length to make it shorter on the indices at the beginning.
When theory and solutions assume an infinite sequence, and you apply that solution to a finite sequence, you get «discrepancies» at the start and/or end.
For a lowpass filter/smoother that may be that the internal filter states cannot be filled because the relevant data does not exist.
You can try to «hide» this by hacking the state to satisfy some continuity requirement.
Or you can simply omitt the output along the edge. Like your example seems to do.