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?

I interpret this to mean that you are unhappy if you have a data set like this.
$$
X, Y\\
1,1\\
2,3\\
1,1\\
0, -1
$$
In this case, the $(1,1)$ is repeated, so you want to weight it double. However, that is covered by the formula.
$$
cov(X, Y) = \frac{1}{4}\sum_{i = 1}^4 (X_i - \bar X)(Y_i-\bar Y)\\
=\dfrac{(1-1)(1-1) + (2 - 1)(3 - 1) + (1 - 1)(1 - 1) + (0 - 1)(\text{-}1 - 1)
}{4}
$$
The values get repeated in the sum, so there is no need to weight observations according to how many times they appear.
