
Covariance formula: Cov(X, Y) = E[(X - E[X])(Y - E[Y])]
Covariance formula: Cov(X, Y) = E[(X - E[X])(Y - E[Y])]
Covariance measures the joint variability of two random variables. It quantifies how much the variables X and Y change together. Covariance is calculated as the expected value of the product of their deviations from their respective means.
Example
Suppose X represents the number of hours studied and Y represents the test scores. Cov(X, Y) = E[(X - E[X])(Y - E[Y])] measures how changes in study hours are associated with changes in test scores.
Understanding covariance helps in analyzing relationships between variables, which is crucial for statistical modeling and prediction.
Cosine similarity
Cosine similarity formula: cos(θ) = (A · B) / (||A|| ||B||)
Pearson correlation coefficient
Pearson correlation coefficient formula: r = Σ[(xi - x̄)(yi - ȳ)] / [√(Σ(xi - x̄)²) * √(Σ(yi - ȳ)²)]
Expected value
Expected value formula: E[X] = Σ [x * P(x)]
Lagrangian L(x,λ) = f(x) - λg(x)
L(x,λ) = f(x) - λ(g(x) - c)
Mean squared error
Mean squared error (MSE) formula: MSE = (1/n) * Σ(y_i - ŷ_i)²
Mutual information
Mutual information formula: I(X;Y) = ∑_x∈X ∑_y∈Y p(x,y) log(p(x,y)/(p(x)p(y)))
One email a day: 5 concepts + the 5 stories that matter →
Swipe through 100 ML concepts daily
Open TickerNews