\documentclass[11pt]{article} \usepackage[margin=1in]{geometry} % Core packages \usepackage{amsmath,amssymb} \usepackage{tikz-cd} \usepackage{multicol} % Paragraphs \setlength{\parindent}{0pt} \setlength{\parskip}{1\baselineskip} \title{Arithmetic Mean} \author{algorembrant} \date{\today} \begin{document} \maketitle The average of total lookback $T$ is defined as: \[ \text{average} = \frac{1}{T} \sum_{t=0}^{T-1} x_{0-t}, \quad \text{where $t$ is $timestamp$ $indexing$ and $0$ as current time} \] which expands as \[ \frac{x_0 + x_{-1} + x_{-2} + x_{-3} + \ldots + x_{-(T-1)}}{T}, \quad \text{like} \quad \frac{x_0 + x_{-1} + x_{-2} + x_{-3}}{4} \] and other variants \[ \text{average} = \begin{cases} \text{if lookback}, & \displaystyle \frac{1}{T} \sum_{t=0}^{T-1} x_{0-t} = \frac{x_0 + x_{-1} + x_{-2} + \ldots + x_{-(T-1)}}{T} \\[10pt] \text{if lookahead}, & \displaystyle \frac{1}{T} \sum_{t=0}^{T-1} x_{0+t} = \frac{x_0 + x_{1} + x_{2} + x_{3} + \ldots + x_{T-1}}{T} \end{cases} \] or starts indexing at 1 \[ \text{average} = \begin{cases} \text{if lookback}, & \displaystyle \frac{1}{T} \sum_{t=1}^{T} x_{-t} = \frac{x_{-1} + x_{-2} + x_{-3} + \ldots + x_{-(T)}}{T} \\[10pt] \text{if lookahead}, & \displaystyle \frac{1}{T} \sum_{t=1}^{T} x_{t} = \frac{x_{1} + x_{2} + x_{3} + \ldots + x_{T}}{T} \end{cases} \] \end{document}