\section{Introduction}
Let $f(x)$ be the common probability density function of a sequence $\{X_n\}_{n=1}^{\infty}$ of identically distributed observations. The associated Shannon entropy
\begin{align} \label{sf}
S(f) = {{\mathbb E}\,} [-\log f(X) ] = -\int f(x)\;\log f(x) \; dx
\end{align}
of such an observation was first introduced by Claude Shannon \cite{Shannon}.  In his 1948 paper, Shannon utilized this tool in his mathematical investigation of the theory of communication.  Today, entropy is widely applied in the fields of information theory, statistical classification, pattern recognition and so on, since it is a measure of the amount of uncertainty present in a probability distribution.

In the literature, several estimators for the Shannon entropy have been introduced.  See Beirlant et al. \cite{Beirlant} for an overview.  Many of these estimators have been studied in cases where the data is independent.  In 1976, Ahmad and Lin \cite{Ahmad} obtained results using the resubstitution estimator $H_n = -\frac{1}{n} \sum_{i=1}^{n} \ln f_n (X_i)$ for independent data $\{X_i\}_{i=1}^n$.  In particular, he showed consistency in the first and second mean under certain regularity conditions.  Here, $f_n(x)$ is the kernel density estimator.  Dmitriev and Tarasenko \cite{Dmitriev} reported results in 1973 for estimating functionals of the type $\int H\big(f(x), f'(x), ..., f^{k}(x)\big) dx$, where the common density $f(x)$ of the independent $X_i$ is assumed to have at least $k$ derivatives.  Plugging in kernel density estimators (see their paper and references therein) for the arguments of $H$ and integrating only over the symmetric interval $[-k_n, k_n]$, which is determined by a sequence $\{k_n\}_{n=1}^\infty$ of a certain order, they provided a result for the estimation of Shannon entropy using the estimator that Beirlant et al. \cite{Beirlant} refer to as the integral estimator.  Their results give conditions for almost sure convergence.

Interestingly enough, Dmitriev and Tarasenko \cite{Dmitriev} also provided (because their work is a more general investigation of functionals) a result for the estimation of the quadratic R\'{e}nyi entropy $Q(f)=\int f^2(x) dx$.  Conditions are provided specifically for the almost sure convergence of their estimator to the true value $Q(f)$.  The estimation of R\'{e}nyi entropy for the dependent case is challenging.  A dependent case is treated by Sang, Sang, and Xu \cite{Sang}.  They studied the estimation of the quadratic Entropy for the one-sided linear process.  Utilizing the Fourier transform along with the projection method, they demonstrate that the kernel entropy estimator satisfies a central limit theorem for short memory linear processes. 
 
To study the Shannon entropy for dependent data is also a challenging problem, and to the best of our knowledge, general results for the Shannon entropy estimation of regular time series data are still unknown.  In this paper, we study the Shannon entropy $S(f)$ for the one-sided linear process
\begin{align}\label{lp}
X_n=\sum\limits_{i=0}^\infty a_i \varepsilon_{n-i},
\end{align}
where the innovations $\varepsilon_i$ are independent and identically distributed real valued random variables on some probability space $(\Omega, \mathcal{F}, {\mathbb P})$ with mean zero and finite variance $\sigma_\varepsilon^2$ and where the collection $\{a_i : i\ge 0 \}$ of real coefficients satisfies $\sum\limits_{i=0}^\infty a_i^2 < \infty$.  Additionally, we will require that the common density $f_{\varepsilon} (x)$ of the innovations be bounded.  The estimator we utilize employs the kernel method, which was first introduced by Rosenblatt \cite{R} and Parzen \cite{Parzen}.  The kernel estimator will be denoted by
\begin{align} \label{kernel_est}
f_n(x) = \frac{1}{n h_n} \sum_{i=1}^{n} K \left( \frac{x - X_i}{h_n} \right),
\end{align}
where the sequence $ \{h_n\}_{n=1}^{\infty} $ provides the bandwidths, and $ K: {\mathbb R} \to {\mathbb R} $ is the kernel function which satisfies $\int_{\mathbb R} K(x)dx=1$.  Typically, the kernel function is a probability density function.

This method has proven to be successful in estimating probability density functions and their derivatives, regression functions, etc. in both the independent and dependent setting.  For the independent setting, see the books (Devroye and Gy\"{o}rfi \cite{DG}; Silverman \cite{Silverman}; Nadaraya \cite{Nadaraya}; Wand and Jones \cite{WJ};  Schimek \cite{Schimek}; Scott \cite{Scott}) and the references therein.  For the dependent setting, we refer the reader to (Tran \cite{Tran}; Honda \cite{Honda}; Wu and Mielniczuk \cite{WM}; Wu, Huang and Huang \cite{WHH}). Bandwidth selection is an important issue in kernel density estimation, and there is much research in this direction. See, e.g., Duin \cite{D}, Rudemo \cite{R} and Slaoui \cite{S1, S2}. 

A few remarks about notation and terms used in the paper follow.  Let $\{a_{n}\}_{n=1}^{\infty}$ and $\{b_{n}\}_{n=1}^{\infty}$ be real-valued sequences.
 By $a_{n}=o(b_{n})$ we understand that $a_{n}/b_{n}\rightarrow0$ and $a_{n}=O(b_{n})$ means that $\lim\sup|a_{n}/b_{n}|<C$ for some positive number $C$. Essentially, this is the standard Landau little oh and big oh notation.  When we write, $a_n \ll b_n$, we mean $a_n = o(b_n)$, and as one might guess, $b_n \gg a_n$ means $a_n \ll b_n$.  Also, we employ the notation $a_n \asymp b_n$ to indicate that $0 < \liminf_{n\to\infty} \frac{a_n}{b_n} \leq \limsup_{n\to\infty} \frac{a_n}{b_n} < \infty$.  
A function $l:[0,\infty)\rightarrow{\mathbb{R}}$ is referred to as \textit{slowly varying} (at $\infty$) if it is positive and measurable on $[A,\infty)$ for some $A\in{\mathbb{R}}^{+}$ such that $\lim\limits_{x\rightarrow\infty}l(\lambda x)/l(x)=1$ holds for each $\lambda\in{\mathbb{R}}^{+}$.  The set of all functions $g:{\mathbb R}\to{\mathbb R}$ which are \textit{H\"{o}lder continuous} of some order $r$ will be denoted as $\mathcal{C}^r({\mathbb R})$.  That is, for each $g\in\mathcal{C}^r({\mathbb R})$ there exists $C_g\in{\mathbb R}^+$ such that for all $x, x' \in {\mathbb R}$, we have $|g(x)-g(x')| \leq C_g |x-x'|^r$, and when $r=1$, we recognize this as the well-known \textit{Lipschitz condition}.  The notation ${\mathcal{L}}^p(E)$ with $0<p<\infty$ represents the set of all real-valued functions $f$ defined on some measure space $(E,\mathcal{A},\mu)$ having the property that $\int_E |f(x)|^p\,d\mu<\infty$.  In the case that $E={\mathbb R}$ and unless otherwise specified, the measure $\mu$ is tacitly understood to be Lebesgue measure and $\mathcal{A}$ is assumed to contain the Borel sets.  ${\mathcal{L}}^\infty(E)$ refers to the set of real-valued functions defined on $E$ which are bounded almost everywhere.  Whenever the domain space of the function is understood, we may simply write ${\mathcal{L}}^p$. 

\newpage
The following are \textit{bandwidth, kernel, and density conditions} that we shall refer to throughout this paper.
\begin{description}
	\item [\textbf{B.1}] $ h_n \asymp (n^{-1} \log n)^\frac{1}{5}$.

	\item [\textbf{K.1}] $K\in\mathcal{C}^\iota({\mathbb R})$ for some $\iota\in(0,1]$ is bounded with bounded support.
	\item [\textbf{K.2}] $ \int u K(u) \ du =0 $.
	\item [\textbf{D.1}] $ f_\varepsilon, f'_\varepsilon, f''_\varepsilon \in {\mathcal{L}}^\infty({\mathbb R}) $.
	\item [\textbf{D.2}] $ f_\varepsilon, f'_\varepsilon, f''_\varepsilon \in {\mathcal{L}}^2({\mathbb R}).$
	\item [\textbf{D.3}] $ f'' \in {\mathcal{L}}^\infty({\mathbb R}) $.
\end{description}
Notice that the bandwidth, kernel, and density conditions are prefixed using \textbf{B}, \textbf{K}, and \textbf{D}, respectively.

In this first section, we have provided an introduction to the problem, a survey of past research in this area, and the notation to be used throughout.  The main results are reported in section two.  In section three, we present the proofs of the main results. Finally,  the appendix introduces the reader to foundational results which will be required in the proof of our main results.

\section{Main Results}\label{main}
If $\{\varepsilon_{i}:\; i\in{\mathbb Z}\}$ is a sequence of independent and identically distributed random variables over a common probability space $(\Omega, \mathcal{F}, {\mathbb P})$ in ${\mathcal{L}}^{q}(\Omega)$ for some $q>0$, ${{\mathbb E}\,}\varepsilon_{i}=0$ when $q\geq 1$, and $\{a_{i}\}^{\infty}_{i=0}$ is a sequence of real coefficients such that $\sum\limits_{i=0}^{\infty}|a_{i}
|^{2\wedge q}<\infty$, then the linear process $X_n$ given in (\ref{lp}) exists and is well-defined. For the case $q\geq 2$ where the innovations have finite variance, we say that the process has \textbf{short memory (short range dependence)} if $\sum\limits_{i=0}^{\infty}|a_i|<\infty$ and $\sum\limits_{i=0}^{\infty} a_i\neq 0$ and \textbf{long memory (long range dependence)} otherwise.  Throughout, we assume that each $\varepsilon_{i}\in {\mathcal{L}}^q$ with $q\geq 2$

Let $f(x)$ be the probability density function of the linear process $X_n=\sum\limits_{i=0}^\infty a_i\varepsilon_{n-i}$, $ n \in \mathbb{N}$ defined in (\ref{lp})
\;\;In this paper, we estimate the Shannon Entropy $-\int f(x) \log f(x)\;dx$ of the linear process
\;\;To do this, we employ the integral estimator 
\begin{align} \label{IntEst}
S_n(f) = - \int_{A_n} f_n(x)\;\log f_n(x)\;dx,
\end{align}
where $ f _n(x) $ is the standard kernel density estimator defined in (\ref{kernel_est}).  The (random) sets $A_n$ are given by
\begin{align} \label{A_n}
A_n = \{ x \in {\mathbb R} : 0 < \gamma_n \leq f_n (x) \},
\end{align}
where $\{\gamma_n\}_{n=1}^{\infty}$ is an appropriately defined sequence in ${\mathbb R}^+$ that converges to zero.

Our estimator utilizes the kernel method of density estimation, and we will accordingly require adherence of the kernel to certain conditions.  In addition, we impose some conditions on the bandwidths and on some of the densities of the problem.  These conditions were listed in the previous section.  Based on these conditions, let us consider the properties of the estimator (\ref{IntEst}).  We proceed in a manner similar to the analysis done by Bouzebda and Elhattab \cite{BE} for the independent case.  

\begin{theorem} \label{thm1} 
	Let $\{X_n : n\in{\mathbb N}\}$ be the linear process given in (\ref{lp}), and assume that it has short memory.  Furthermore, assume that $S(f)$ is finite.

	If the bandwidth, kernel, and density conditions listed earlier are satisfied, then
	\begin{align*}
	\limsup_{n\to\infty}\;\bigg(\frac{n\;\gamma_n^5}{\log n}\bigg)^\frac{2}{5}\;\;\bigg|\;S_n(f) - \int_{A_n} \big(-\log f(x)\big) f(x)\;dx\;\bigg|
	\end{align*}
	is bounded almost surely whenever the condition $ \gamma_n \gg h_n $ is imposed on the sequence $\{\gamma_n\}_{n=1}^{\infty}$.
\end{theorem}
\begin{corollary} \label{cor1}
	If the conditions of Theorem \ref{thm1} hold, then we have
	\begin{align*}
	\lim_{n\to\infty} |S_n(f) - S(f)| = 0
	\end{align*}
	almost surely.
\end{corollary}

\begin{theorem} \label{thm2}
	Let $\{X_n : n\in{\mathbb N}\}$ be the linear process given in (\ref{lp}), and assume that it has short memory.  Furthermore, assume that $S(f)$ is finite.

	If the bandwidth, kernel, and density conditions listed earlier are satisfied, then
	\begin{align}
	\limsup_{n\to\infty}\;\bigg(\frac{n\;\gamma_n^5}{\log n}\bigg)^\frac{2}{5}\;\;\bigg\lVert\;S_n(f) - \int_{A_n} \big(-\log f(x)\big) f(x)\;dx\;\bigg\rVert_2
	\end{align}
	is bounded whenever the condition $ \gamma_n \gg h_n $ is imposed on the sequence $\{\gamma_n\}_{n=1}^{\infty}$.
\end{theorem}

\begin{corollary} \label{cor2}
	If the conditions of Theorem \ref{thm2} hold, then the mean squared error (MSE) satisfies 
	\begin{align*}
	\lim_{n\to\infty} \textup{MSE} (S_n(f)) = 0.
	\end{align*}
\end{corollary}

\begin{remark}
In this paper we work on the entropy estimation for short memory linear processes by applying the integral method. It is interesting to know whether the similar results hold for long memory linear processes. It is also interesting to know whether the resubstitution method works for dependent data such as linear processes. However, the research in these directions are beyond the scope of this paper. We leave the research in these directions for future work. 
\end{remark}

\begin{remark}
In a wide range of disciplines, including finance, geology, and engineering, many time series may be modeled using a linear process. In such instances, our result provides a method for estimating the associated Shannon Entropy.  One example is the discriminatory data on the arrival phases of earthquakes and explosions, which was captured at a seismic recording station.  Another example is the data about returns on the New York Stock Exchange.  See these and many other time series data in the book by Shumway and Stoffer \cite{Shumway} and other books on time series. 
\end{remark}




\section{Proofs}\label{proof}

\begin{lemma} \label{lemma1}
	If the conditions of Theorem \ref{thm1} (or \ref{thm2}) hold, then
	\begin{align} \label{lbl2}
	\sup_{x\in{\mathbb R}} \big| f_n(x)\; - f(x) \big| = O \bigg( \bigg( \frac{\log n}{n} \bigg) ^ \frac{2}{5} \; \bigg)
	\end{align}	
	almost surely.
\end{lemma}

\begin{proof}
	This lemma follows from Theorem 2 of Wu et al. \cite{WHH} (see their discussion immediately after the statement of Theorem 2 and in the penultimate paragraph of section 4.1)  Also, see the discussion in the appendix on fundamental results.

































































\end{proof}



\begin{lemma} \label{lemma3}
	If the conditions of Theorem \ref{thm1} (or \ref{thm2}) hold, then
	\begin{align} \label{lbl30}
	\gamma_n^5 \gg \frac{\log n}{n}.
	\end{align}	
\end{lemma}

\begin{proof}
	Because $h_n\asymp (n^{-1}\log n)^\frac{1}{5}$, there exists $C\in{\mathbb R}^+$ such that
	\[ \frac{h_n^5}{n^{-1} \log n} > C \] for sufficiently large $n$.  Therefore,
	\begin{align*}
	\lim_{n\to\infty} \frac{\gamma_n^5}{n^{-1} \log n} 
	& = \lim_{n\to\infty} \frac{\gamma_n^5}{h_n^5} \cdot \frac{h_n^5}{n^{-1} \log n} \\
	& \geq C  \lim_{n \to \infty} \bigg( \frac{\gamma_n}{h_n} \bigg)^5 \to \infty
	\end{align*}
	as $n\to\infty$, from which \ref{lbl30} follows.
\end{proof}

\noindent\textbf{Note.} Our use of Lemma \ref{lemma3} in the proofs of Theorems \ref{thm1} and \ref{thm2} will be tacit.
$\;$\\
\begin{lemma} \label{lemma2}
	If $\nu$ is a finite signed measure that is absolutely continuous with respect to a measure $\mu$, then corresponding to every positive number $\varepsilon$ there is a positive number $\delta$ such that $|\nu|(E)<\varepsilon$ whenever $E$ is a measurable set for which $\mu(E)<\delta$.
\end{lemma}

\begin{proof}
	This is a basic result from measure theory.  See, for example, Theorem B of Halmos \cite{Halmos} in section 30.
\end{proof}

\paragraph{Proof of Theorem \ref{thm1}.} We begin with the decomposition
\begin{align} \label{lbl4}
\begin{split}
S_n(f) -&\int_{A_n} \big(-\log f(x)\big) f(x)\;dx \\
&= -\int_{A_n} f_n(x)\;\log f_n(x)\;dx + \int_{A_n} f(x)\;\log f(x)\;dx \\
&= -\int_{A_n} f_n(x)\;\log f_n(x)\;dx + \int_{A_n} f(x)\;\log f_n(x)\;dx \\
&\ \;\;\; -\int_{A_n} f(x)\;\log f_n(x)\;dx + \int_{A_n} f(x)\;\log f(x)\;dx \\
&= I_{n,1} + I_{n,2},
\end{split}
\end{align}
where
\begin{align*}
I_{n,1} &:= -\int_{A_n} \big[ f_n(x)\; - f(x) \big]\;\log f_n(x)\;dx,
\end{align*}
and
\begin{align*}
I_{n,2} &:= -\int_{A_n} f(x) \; \big[ \log f_n(x)\; - \log f(x) \big]\;dx,
\end{align*}

First, we consider $I_{n,1}$.  Using the inequality
\begin{align*}
|\log z| \leq z + \frac{1}{z}
\end{align*}
for $z\in{\mathbb R}^+$, we notice that for all $x\in A_n$, we have
\begin{align*}
\big|\log f_n(x)\big| 
&\leq f_n(x) + \frac{1}{f_n(x)} \\
&= \bigg( 1 + \frac{1}{(f_n(x))^2} \bigg) f_n(x) \\
&\leq \bigg( 1 + \frac{1}{\gamma_n^2} \bigg) f_n(x).
\end{align*}
It follows that
\begin{align} \label{boundIn1}
\begin{split}
\big| I_{n,1} \big| 
&\leq \sup_{x\in{\mathbb R}} \big| f_n(x)\; - f(x) \big| \int_{A_n} \big|\log f_n(x)\big|\;\;dx \\
&\leq \bigg( 1 + \frac{1}{\gamma_n^2} \bigg) \sup_{x\in{\mathbb R}} \big| f_n(x)\; - f(x) \big|,
\end{split}
\end{align}
since $f_n(x)$ integrates to unity over the real line.

Next, we consider $I_{n,2}$.  Since the set over which we are integrating may be changed to $A_n \cap \{x : f(x) > 0\}$ without affecting the value of $I_{n,2}$, we may assume that $f$ is positive on $A_n$.  Using the inequality
\begin{align*}
\log z \leq |z-1| + |z^{-1}-1|
\end{align*}
for $z\in{\mathbb R}^+$, we notice that for all $x\in A_n$, we have
\begin{align} \label{lblineq}
\begin{split}
\big|\log f_n(x)\; - \log f(x) \big| 
&= \bigg| \ln \bigg( \frac{f_n(x)}{f(x)} \bigg) \bigg| \\
&\leq \bigg| \frac{f_n(x)}{f(x)} -1 \bigg| + \bigg| \frac{f(x)}{f_n(x)} -1 \bigg| \\
&= \bigg| \frac{f_n(x)-f(x)}{f(x)} \bigg| + \bigg| \frac{f(x)-f_n(x)}{f_n(x)} \bigg| \\
&= \bigg(1+\frac{f_n(x)}{f(x)}\bigg)  \bigg| \frac{f_n(x)-f(x)}{f_n(x)} \bigg| \\
&\leq \frac{C}{\gamma_n}  \big| f_n(x)-f(x) \big|,
\end{split}
\end{align}
if we can justify the existence of $C\in{\mathbb R}^+$.  To that end, define
\begin{align*}
\varepsilon_n = \sup_{x\in A_n} \big| f_n(x)\; - f(x) \big|,
\end{align*}
and note that for all $x\in A_n$, we have
\begin{align*}
\bigg| 1 - \frac{f(x)}{f_n(x)} \bigg| \leq \frac{\varepsilon_n}{f_n(x)} \leq \frac{\varepsilon_n}{\gamma_n}.
\end{align*}
Taking the supremem over $A_n$ yields
\begin{align*}
\sup_{x\in A_n} \bigg| 1 - \frac{f(x)}{f_n(x)} \bigg| &\leq \frac{\varepsilon_n}{\gamma_n} = \gamma_n^{-1}\;\varepsilon_n \\
&\leq C \gamma_n^{-1}\bigg/\bigg(\frac{n}{\log n}\bigg)^{\frac{2}{5}},
\end{align*}
by Lemma \ref{lemma1}.  Note that
\begin{align*}
\gamma_n^{-1}=o\bigg( \bigg( \frac{n}{\log n} \bigg)^\frac{2}{5} \bigg),
\end{align*}
since
\begin{align*}
\lim_{n\to\infty} \frac{\gamma_n^{-1}}{ \big(\frac{n}{\log n}\big)^\frac{2}{5}}
&= \lim_{n\to\infty} \frac{ \big(\frac{\log n}{n}\big)^\frac{2}{5}}{\gamma_n} \\
&= \lim_{n\to\infty} \bigg(\frac{ \frac{\log n}{n}}{\gamma_n^5}\;\frac{ \frac{\log n}{n}}{1} \bigg)^\frac{1}{5} \\
&= 0.
\end{align*}
This guarantees the existence we sought to establish.  We continue with
\begin{align} \label{boundIn2}
\begin{split}
\big| I_{n,2}  \big| 
&\leq \frac{C}{\gamma_n}\ \sup_{x\in{\mathbb R}} \big| f_n(x)\; - f(x) \big| \int_{A_n} f(x)\;dx \\
&\leq \frac{C}{\gamma_n}\ \sup_{x\in{\mathbb R}} \big| f_n(x)\; - f(x) \big|,
\end{split}
\end{align}
since $f_n(x)$ integrates to unity over the real line.

In view of (\ref{lbl4}), (\ref{boundIn1}), and (\ref{boundIn2}), we have shown that
\begin{align} \label{lbl1}
\bigg|S_n(f) - &\int_{A_n} \big(-\log f(x)\big) f(x)\;dx \bigg| \\
&\leq \bigg(\frac{1}{\gamma_n^2} + \frac{C}{\gamma_n} + 1 \bigg) \sup_{x\in{\mathbb R}} \big| f_n(x)\; - f(x) \big|.
\end{align}
Therefore,
\begin{align*}
\limsup_{n\to\infty}\;&\bigg(\frac{n\;\gamma_n^5}{\log n}\bigg)^\frac{2}{5}\;\;\bigg|S_n(f) - \int_{A_n} \big(-\log f(x)\big) f(x)\;dx\ \bigg| \\
&\leq \limsup_{n\to\infty}\; \bigg(\frac{n}{\log n}\bigg)^\frac{2}{5}\gamma_n^2 \bigg(\frac{1}{\gamma_n^2} + \frac{C}{\gamma_n} + 1 \bigg) \sup_{x\in{\mathbb R}} \big| f_n(x)\; - f(x) \big| \\
&= \limsup_{n\to\infty}\; \big( \gamma_n^2 + C \gamma_n + 1 \big) \bigg(\frac{n}{\log n}\bigg)^\frac{2}{5} \sup_{x\in{\mathbb R}} \big| f_n(x)\; - f(x) \big|,
\end{align*}
where the last expression is constant almost surely by Lemma \ref{lemma1} and since $\gamma_n\to 0$.
{\hfill $\square$ \bigskip}

\paragraph{Proof of Corollary \ref{cor1}.}
By the triangle inequality
\begin{align*}
|S_n(f) - S(f)| \leq J_{n,1} + J_{n,2},
\end{align*}
where
\begin{align*}
J_{n,1} = \bigg|S_n(f) - \int_{A_n} \big(-\log f(x)\big) f(x)\;dx\ \bigg|
\end{align*}
and
\begin{align*}
J_{n,2} = \bigg|\int_{A_n} \big(-\log f(x)\big) f(x)\;dx - S(f) \bigg|.
\end{align*}
Since $J_{n,1}\to 0$ almost surely by Theorem \ref{thm1}, we only need to contend with $J_{n,2}$.  That is, we need to show that
\begin{align} \label{lbl3}
\int_{A_n^\mathsf{c}} f(x) \log f(x)\;dx \to 0
\end{align}
almost surely as $n\to\infty$.

For any Borel measurable set $E$, consider
\begin{align*}
P(E) = \int_E f(x)\;dx,
\end{align*}
and define the signed measure
\begin{align*}
\nu (E) = -\int_E \log f(x)\;dP.
\end{align*}
Since $|S(f)|<\infty$, both $\nu^+$ and $\nu^-$ are finite measures, and thus, $\nu$ is a finite signed measure that is absolutely continuous with respect to $P$.  Because of Lemma \ref{lemma2}, it suffices for us to demonstrate that
\begin{align*}
P(A_n^\mathsf{c}) \to 0
\end{align*}
almost surely.  For any $x\in A_n^\mathsf{c}$, we have $f_n(x) < \gamma_n$.  By Lemma \ref{lemma1}, there exists $C\in{\mathbb R}^+$ such that $f(x) \leq f_n(x) + |f_n(x)-f(x)| < \gamma_n + C \big( \frac{\log n}{n} \big)^{\frac{2}{5}}$ almost surely, and hence, we have shown that $A_n^\mathsf{c}\subseteq B_n$ almost surely, where
\[ B_n := \bigg\{x: f(x) < \gamma_n + C \bigg( \frac{\log n}{n} \bigg)^{\frac{2}{5}} \bigg\}. \]
It is easy to see that
\begin{align*}
0 \leq P(A_n^\mathsf{c}) \leq P(B_n) \to 0
\end{align*}
almost surely, since $\gamma_n + C \big( \frac{\log n}{n} \big)^{\frac{2}{5}} \to 0$ as $n\to\infty $.
{\hfill $\square$ \bigskip}

\paragraph{Proof of Theorem \ref{thm2}.}
We start with
\begin{align*}
\bigg\lVert S_n(f)-&\int_{A_n} \big(-\log f(x)\big) f(x)\;dx\ \bigg\rVert_2 \\
&\leq \bigg\lVert S_n(f) + \int_{A_n} f_n(x) \log f(x)\;dx \bigg\rVert_2 \\
&\;\;\;\;\;+ \bigg\lVert \int_{A_n} f_n(x) \log f(x)\;dx - \int_{A_n} f(x) \log f(x)\;dx \bigg\rVert_2 \\
& =: K_{n,1} + K_{n,2}.
\end{align*}
Recall inequality (\ref{lblineq}) in the proof of Theorem \ref{thm1}.  Arguing in a similar manner as before, we can demonstrate the existence of $C_1\in{\mathbb R}^+$ so that
\begin{align*}
K_{n,1} &= \bigg\lVert \int_{A_n} f_n(x)\big[\log f(x) - \log f_n(x)\big]\;dx \bigg\rVert_2 \\
&= \bigg\lVert \int_{A_n} f_n(x) \log \frac{f(x)}{f_n(x)}\;dx \bigg\rVert_2 \\
& \leq \bigg\lVert \int_{A_n} f_n(x) \bigg| \log \frac{f(x)}{f_n(x)}\bigg|\;dx \bigg\rVert_2 \\
& \leq \bigg\lVert \int_{A_n} \frac{C_1}{\gamma_n} |f_n(x)-f(x)| f_n(x) \;dx \bigg\rVert_2\\
& \leq \frac{C_1}{\gamma_n} \; \bigg( \frac{\log n}{n} \bigg)^\frac{2}{5} \bigg\lVert  \int_{x\in A_n}\;f_n(x)\;dx \bigg\rVert_2\\
& \leq \frac{C_1}{\gamma_n} \; \bigg( \frac{\log n}{n} \bigg)^\frac{2}{5}.
\end{align*}
Also, notice that
\begin{align*}
K_{n,2} &= \bigg\lVert \int_{A_n} [f_n(x) - f(x)] \log f(x)\;dx \bigg\rVert_2 \\
&\leq \bigg\lVert \int_{A_n} \big|f_n(x)-f(x)\big| \log f(x)\;dx\bigg\rVert_2 \\
&\leq C_2 \bigg(\frac{\log n}{n}\bigg)^\frac{2}{5} \bigg\lVert \int_{A_n} \bigg( f(x)+\frac{1}{f(x)} \bigg) \;dx\bigg\rVert_2\\
&\leq C_2 \bigg(\frac{\log n}{n}\bigg)^\frac{2}{5} \bigg[1+ \bigg\lVert \int_{A_n} \frac{f_n(x)}{f(x)}\frac{1}{f_n^2(x)}f_n(x)\;dx\bigg\rVert_2\bigg]\\
&\leq C_2 \bigg(\frac{\log n}{n}\bigg)^\frac{2}{5} \bigg(1+ \frac{C_3}{\gamma_n^2}\bigg).
\end{align*}
Therefore,
\begin{align*}
\bigg(\frac{n\;\gamma_n^5}{\log n}\bigg)^\frac{2}{5}&\bigg\lVert S_n(f) - \int_{A_n} \big(-\log f(x)\big) f(x)\;dx\ \bigg\rVert_2 \\
& \leq \bigg(\frac{n}{\log n}\bigg)^\frac{2}{5}\gamma_n^2\;\bigg[\frac{C_1}{\gamma_n}\bigg(\frac{\log n}{n}\bigg)^\frac{2}{5} + C_2 \bigg(\frac{\log n}{n}\bigg)^\frac{2}{5}\bigg(1+\frac{C_3}{\gamma_n^2}\bigg)\bigg] \\
&= C_1 \gamma_n + C_2 \gamma_n^2 + C_2 C_3,
\end{align*}
from which the result follows.
{\hfill $\square$ \bigskip}

\paragraph{Proof of Corollary \ref{cor2}.}
Note the decomposition
\begin{align*}
\sqrt{\textup{MSE}(S_n(f))}&=\big\lVert S_n(f)-S(f) \big\rVert_2 \\
&\leq \bigg\lVert S_n(f) - \int_{A_n} \big(-\log f(x)\big) f(x)\;dx\ \bigg\rVert_2 \\
&\;+  \bigg\lVert \int_{A_n} \big(-\log f(x)\big) f(x)\;dx - S(f) \bigg\rVert_2 \\
&=: M_{n,1} + M_{n,2}.
\end{align*}
By Theorem \ref{thm2}, $M_{n,1}\to 0$.  Now, let
\begin{align*}
W_n = \int_{x\in{\mathbb R}} \int_{y\in{\mathbb R}} f(x) f(y) \log f(x) \log f(y)\;{\mathcal{I}}\big((x,y)\in A_n^\mathsf{c}\times A_n^\mathsf{c}\big)\;dx\;dy
\end{align*}
and
\begin{align*}
W = \int_{x\in{\mathbb R}} \int_{y\in{\mathbb R}} f(x) f(y) \big| \log f(x) \log f(y) \big| \;dx\;dy.
\end{align*}
Recall from (\ref{lbl3}) in the proof of Corollary \ref{cor1} that $W_n \to 0$ almost surely.  Because $|S(f)|<\infty$, it follows that
$W<\infty$, and moreover, $|W_n| \leq W$. Hence,
\begin{align}
\begin{split}
M_{n,2}^2&= \bigg\lVert  \int_{A_n^{\mathsf{c}}} f(x) \log f(x) \;dx\ \bigg\rVert_2^2 \\
&= \bigg\lVert \int_{{\mathbb R}} f(x) \log f(x)\;{\mathcal{I}}(x\in A_n^\mathsf{c})\;dx \bigg\rVert_2^2 \\
&= {{\mathbb E}\,} [W_n],
\end{split}
\end{align}
and the Lebesgue Dominated Convergence Theorem guarantees that 
\begin{align*}
\lim_{n\to\infty} M_{n,2}^2 = \lim_{n\to\infty} {{\mathbb E}\,} [W_n] = {{\mathbb E}\,} \bigg[\lim_{n\to\infty} W_n \bigg] = {{\mathbb E}\,} [0] = 0,
\end{align*}
thereby proving the corollary.
{\hfill $\square$ \bigskip}

\section{Appendix}

In the paper \cite{WHH}, Wu et al. establish results that are very useful in the proof section.  Here, we briefly survey their definitions and results which show that the kernel density estimator for one-sided linear processes enjoys properties similar to the independent case---see Stute \cite{Stute}. Their work identifies conditions under which the kernel density estimator enjoys strong uniform consistency for a wide class of time series.  Included is the linear process in (\ref{lp}).

As is common in analysis of time series, we allude to an independent and identically distributed collection $\{\varepsilon_i : i\in{\mathbb Z}\}$ of random variables, typically referred to as the innovations.  Note that many time series models fit the form
\begin{align} \label{J_filter}
X_n = J(\cdots,\varepsilon_{n-1},\varepsilon_{n}),
\end{align}
which regards the $X_n$ as a system dependent on the innovations.  Note here that $J$ is some measurable function which is referred to as the filter.  In this context, we also need to define the sigma algebras
\begin{align*}
\mathcal{F}_n=\sigma\{\varepsilon_{n}, \varepsilon_{n-1}, \cdots\},
\end{align*}
where $n\in{\mathbb Z}$.  In addition. let $\varepsilon_{0}'$ be an independent and identical copy of $\varepsilon_{0}$ which is, of course, independent of all the $\varepsilon_{i}$.  For $n\geq0$, define 
\[
\mathcal{F}_n^*=\sigma\{\varepsilon_{n}, \varepsilon_{n-1},\cdots,\varepsilon_{1}, \varepsilon_{0}', \varepsilon_{-1},\cdots \},
\]
and for $n<0$, put $\mathcal{F}_n^*=\mathcal{F}_n$.

Define the $l$-step ahead conditional distribution by
\[
F_l(x|\mathcal{F}_k)=P(X_{l+k} \leq x | \mathcal{F}_k),
\]
where $l\in{\mathbb N}$ and $k\in{\mathbb Z}$.  When it exists, the $l$-step ahead conditional density is
\[
f_l(x|\mathcal{F}_k)=\frac{d}{dx} F_l(x|\mathcal{F}_k).
\]
As Wu et al. \cite{WHH} notes, a sufficient condition for the existence of a marginal density of (\ref{J_filter}) is that $f_1(x|{\cal F}_0)$ exists and is uniformly bounded almost surely by some $M\in{\mathbb R}^+$.  We shall refer to this as the \textbf{marginal condition}.  Similarly, $F_l(x|{\cal F}_k^*)=P(X_{l+k}^*\leq x|{\cal F}_k^*)$, where $X_{l+k}^*=X_{l+k}-a_{l+k}\varepsilon_{0} + a_{l+k}\varepsilon'_{0}$ if $l+k\geq 0$ and $X_{l+k}^*=X_{l+k}$ if $l+k<0$.  Also, $f_l(x|{\cal F}^*)=\frac{d}{dx}F_l(x|{\cal F}_k^*)$.

With this setup, the authors introduce the following measures of the dependence present in the system (\ref{J_filter}).  Now, for $k\geq 0$, define a pointwise measure of difference by
\begin{align*}
\theta_k(x)=\lVert f_{1+k}(x|\mathcal{F}_0)-f_{1+k}(x|\mathcal{F}_0^*)\rVert_2
\end{align*}
and an ${\mathcal{L}}^2$-integral measure of difference over ${\mathbb R}$ by
\begin{align*}
\theta(k)=\bigg[\int_{\mathbb R}\theta_k^2(x)\;dx\bigg]^\frac{1}{2}.
\end{align*}
Finally, define an overall measure of difference by
\begin{align*}
\Theta(n)=\sum_{j\in{\mathbb Z}} \bigg(\sum_{k=1-j}^{n-j}\big|\theta(k)\big|\bigg)^2.
\end{align*}
The distances on the derivatives are defined similarly, as given below.
\begin{align*}
\psi_k(x)&=\lVert f_{1+k}'(x|\mathcal{F}_0)-f_{1+k}'(x|\mathcal{F}_0^*)\rVert_2, \\
\psi(k)&=\bigg[\int_{\mathbb R}\psi_k^2(x)\;dx\bigg]^\frac{1}{2}, \;\;\;\text{ and}\\
\Psi(n)&=\sum_{j\in{\mathbb Z}} \bigg(\sum_{k=1-j}^{n-j}\big|\psi(k)\big|\bigg)^2.
\end{align*}

\noindent With this setup, we can now report the following result of Wu et al. \cite[Theorem 2]{WHH}.

\begin{theorem}
	Assume that, for some positive $r$ and $s$, we have that $K\in\mathcal{C}^r$ is a bounded function with bounded support and that $X_n\in{\mathcal{L}}^s$.  Further, assume the marginal condition, and assume that $ \Theta(n) + \Psi(n)=O(n^\alpha\; \tilde{l}(n))$, where $\alpha \geq 1$ and where $\tilde{l}$ is a slowly varying function.  If  $\log n=o(n h_n)$, then
	\begin{align*}
	\sup_{x\in{\mathbb R}} \big|f_n(x)-{{\mathbb E}\,} f_n(x)\big|=O\bigg(\sqrt{\frac{\log n}{n h_n}} + n^{-\frac{1}{2}}\;l(n)\bigg),
	\end{align*}
	where $l(n)$ is another slowly-varying function.
\end{theorem}

Now consider our particular case when the filter is the linear process of (\ref{lp}).  In view of our assumption that the innovations have finite variance and because we assume the coefficients are square summable, $X_n\in {\mathcal{L}}^2$.  Moreover, we assume all of the bandwidth, kernel, and density conditions listed earlier, from which it easily follows that the marginal condition is satisfied.  For the short memory linear process (under the aforementioned assumptions), Wu et al. \cite{WHH} demonstrated that $\Theta(n) + \Psi(n) = O(n)$.  Also, notice that condition \textbf{B.1} implies that $\log n = o(n h_n)$.  Therefore, the theorem of Wu et al. \cite{WHH} applies to (\ref{lp}).

In addition, the well-known Taylor series argument under the conditions \textbf{K.2} and \textbf{K.3}, as well as \textbf{D.3}, yields
\begin{align*}
\sup_{x\in{\mathbb R}} \big|{{\mathbb E}\,}[f_n(x)]-f(x)\big|=O(h_n^2),
\end{align*}
so collectively, we see that
\begin{align*}
\sup_{x\in{\mathbb R}} \big|f_n(x)-f(x)\big|=O\bigg(\sqrt{\frac{\log n}{n h_n}} + n^{-\frac{1}{2}}\;l(n)+h_n^2\bigg).
\end{align*}
Basic methods of differential calculus show that $\sqrt{\frac{\log n}{n h_n}} + h_n^2$ is minimized when $h_n$ satisfies \textbf{B.1}.  Indeed, the optimum value of  $h_n$ has the exact order of  $\bigg(\frac{\log n}{n} \bigg)^\frac{1}{5}$.

\textbf{Acknowledgement} 
The authors are grateful to the referees and Professor Daniel J. Henderson for carefully reading the paper and for insightful suggestions that significantly
improved the presentation of the paper.  
The research is supported in part by
the Simons Foundation Grant 586789 and the College of Liberal Arts
Faculty Grants for Research and Creative Achievement at the University of Mississippi. 
\newpage
