Doubt around Covariance definition Given the general definition of Covariance between two random variables $x$ and $y$:
\begin{equation*}
\text{Cov}(x,y)=\frac{1}{n}\sum_{i=1}^n(x_i-\bar{x})(y_i-\bar{y})
\end{equation*}
Does the above definition implicitly assume that every bivariate observation $(x_i,y_i)$ has the same relative frequency, namely equal to $\frac{1}{n}$?
I would expect that for bivariate observations with different relative frequency, the above definition (given that the value set of component random variable $x$ has $r$ values while that of $y$ has $s$ values) would become equal to:
\begin{equation}
\text{Cov}(x,y)=\sum_{i=1}^r\sum_{j=1}^sf_{x,y}(x_i,y_i)(x_i-\bar{x})(y_i-\bar{y})
\end{equation}
with $f_{x,y}(x_i,y_i)$ denotes the relative frequency of the pair $(x_i, y_i)$.
Is my reasoning correct or am I wrong? Why?

You are confusing the estimator for covariance with covariance itself. Covariance is defined as
$$
\operatorname{cov}(X, Y) = \operatorname{E}{\big[(X - \operatorname{E}[X])(Y - \operatorname{E}[Y])\big]}
$$
Where $X$ and $Y$ are random variables and by calculating expected values we do consider their distributions and relative probabilities when calculating the integrals to obtain expected values
$$
\operatorname{E}[X] = \int x f(x)\, dx
$$
As noticed by @BigBendRegion in the comment, it's easier to show for mean as an estimator for expected value. For discrete data, the expected value is defined as
$$
E[X] = \sum_i x_i p_i
$$
If you want to estimate it from the sample, the problem is that you don't know the $P(X = x_i) = p_i$ probabilities. You can estimate them from the sample by looking at the relative frequencies $\tfrac{n_i}{n}$ where $n_i$ is the count of how many times did you observe $x_i$'th value (notice: this is not $i$-th sample, but $i$-th distinct value) in your sample, with $n = \sum_i n_i$. In such a case,
$$
\sum_i x_i \tfrac{n_i}{n}  = \sum_i \,x_i n_i \tfrac{1}{n} 
$$
it is the same as if you repeated the $\tfrac{1}{n} x_i$ operation $n_i$ times in the summation. So using arithmetic mean is the same as if you calculated the relative frequencies $\hat p_i = \tfrac{n_i}{n}$ and used them to calculate $\sum_i  x_i \hat p_i$. Exactly the same thing happens for sample covariance, but the math is just a little bit more cluttered.
