thumb|upright|The sign of the covariance of two random variables X and Y
thumb|upright|The sign of the covariance of two random variables X and Y
In probability theory and statistics, covariance is a measure of the joint variability of two random variables. The sign of the covariance shows the tendency in the linear relationship between the variables. Covariance is positive when variables tend to show similar behavior and negative when variables tend to show opposite behavior. The magnitude of the covariance is the geometric mean of the variances that are shared for the two random variables, where a larger magnitude means two variables more strongly depend on each other.
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).