# HG changeset patch # User Oleksandr Gavenko # Date 1459419963 -10800 # Node ID 5a09c6837dcbfeb126cc75b2e99043ca5c9aa101 # Parent d4bed13a2c3702d6f3c9a08f3374fc6b41e5cede Covariance diff -r d4bed13a2c37 -r 5a09c6837dcb probability-continuous.rst --- a/probability-continuous.rst Thu Mar 31 00:15:20 2016 +0300 +++ b/probability-continuous.rst Thu Mar 31 13:26:03 2016 +0300 @@ -293,14 +293,14 @@ and so: -.. math:: f_Y(y) = (d\ f_Y(t)/dt)(y) = (d\ F_X(h(t))/dt)(y) = F_X(h(y))·(d\ h(t)/dt)(y) +.. math:: f_Y(y) = (d\ F_Y(t)/dt)(y) = (d\ F_X(h(t))/dt)(y) = f_X(h(y))·(d\ h(t)/dt)(y) Convolution formula =================== If :math:`Z = X + Y` and X and Y is independent r.v. then: -.. math:: f_Z(z) = ∫_x\ f_X(x)·f_Y(z-x)̣·dx +.. math:: f_Z(z) = ∫_x\ f_X(x)·f_Y(z-x)·dx Proof: @@ -320,3 +320,50 @@ .. math:: f_Z(z) = ∫_x\ f_{X,Z}(x,z)\ dx = ∫_x\ f_X(x)·f_Y(z-x)\ dx +Covariance +========== + +Covariance of two r.v. is: + +.. math:: cov(X, Y) = E[(X - E[X])·(Y - E[Y])] + +Properties: + +.. math:: cov(X, Y) = E[X·Y] - E[X]·E[Y] + +.. math:: cov(X, X) = var(X) + +.. math:: cov(a·X + b, Y) = a·cov(X, Y) + +.. math:: cov(X, Y + Z) = cov(X, Y) + cov(X, Z) + +.. math:: var(X + Y) = var(X) + var(Y) + 2·cov(X, Y) + +Covariance of two independent r.v. is zero. + +Proof: + +.. math:: + + cov(X, Y) = E[(X - E[X])·(Y - E[Y])] = E[(X - E[X])]·E[(Y - E[Y])] = 0 + +Correlation coefficient +======================= + +Dimensionless version of covariance: + +.. math:: ρ(Χ, Υ) = E[(X-E[X])/σ_Χ·(Y-E[Y])/σ_Y] = cov(X, Y)/(σ_X·σ_Y) + +It is defined only for cases when :math:`σ_X ≠ 0` and :math:`σ_Y ≠ 0`. + +Obviously :math:`-1 ≤ ρ(Χ, Υ) ≤ +1` and :math:`ρ(Χ, X) = 0`. + +For independent r.v. :math:`ρ(Χ, Y) = 0`. + +If :math:`|ρ(X, Y)| = 1` then :math:`X` and :math:`Y` is have linear +dependencies :math:`X = Y` or :math:`X = -Y`. + +Properties: + +.. math:: ρ(a·X + b, Y) = sign(a)·ρ(X, Y) +