# HG changeset patch # User Oleksandr Gavenko # Date 1458326538 -7200 # Node ID c9c0861c10c299ba98d2af9593ef4a173d2e63fa # Parent 9b4e31a031618031b469b8c9e323ddc57ae0b28e Linear function of distribution. Monotonic function of distribution. diff -r 9b4e31a03161 -r c9c0861c10c2 probability-continuous.rst --- a/probability-continuous.rst Thu Mar 17 22:04:51 2016 +0200 +++ b/probability-continuous.rst Fri Mar 18 20:42:18 2016 +0200 @@ -202,22 +202,88 @@ :def:`Normal random variables` with parameters :math:`μ, σ` and :math:`σ > 0` defined by PDF: -.. math:: norm(μ, σ) = 1/σ/sqrt(2·π)·exp(-(x-μ)²/σ²/2) +.. math:: norm(μ, σ²) = 1/sqrt(2·π)/σ·exp(-(x-μ)²/σ²/2) Properties: .. math:: - E[norm(μ, σ)] = μ + E[norm(μ, σ²)] = μ - var[norm(μ, σ)] = σ² + var[norm(μ, σ²)] = σ² Disjoint distribution of two normal r.v. ======================================== .. math:: - norm2(μ₁, μ₂, σ₁, σ₂) = norm(μ₁, σ₁)·norm(μ₂, σ₂) + norm2(μ₁, μ₂, σ₁², σ₂²) = norm(μ₁, σ₁²)·norm(μ₂, σ₂²) = 1/(2·π·σ₁·σ₂)·exp(-(x-μ₁)²/σ₁²/2 - (x-μ₂)²/σ₂²/2) +Linear function of distribution +=============================== + +If :math:`Y = a·X + b` then :math:`f_Y(y) = 1/|a|·f_X((y-b)/a)`. + +Proof, for :math:`y > 0`: + +.. math:: F_Y(Y ≤ y) = F_X(a·X + b ≤ y) = F_X(X ≤ (y-b)/a) + +so: + +.. math:: f_Y(y) = d/dy\ F_Y(Y ≤ y) = d/dy\ F_X(x ≤ (y-b)/a) = 1/a·f_X((y-b)/a) + +For :math:`y < 0`: + +.. math:: + + F_Y(Y > y) = F_X(a·X + b > y) = F_X(X < (y-b)/a) + + F_Y(Y <= y) = 1 - F_Y(Y > y) = 1 - F_X(X < (y-b)/a) + + d/dy\ f_Y(y) = -1/a·f_X((y-b)/a) + +Combining expression for :math:`a≠0` gives us result. + +If X is uniform distribution with parameters :math:`c, d` then :math:`a·Y + b` +also is uniform distribution with parameters :math:`a·c+b, a·d+b`. + +If X is exponential distribution with parameters :math:`λ` then :math:`a·Y` +also is exponential distribution with parameters :math:`λ/a` for :math:`a > 0`. + +If X is normal distribution with parameters :math:`μ, σ²` then +:math:`a·Y + b` also is normal distribution with parameters :math:`a·μ+b, (a·σ)²`. + +Proofs. + +When :math:`Χ ~ exp(λ)` and :math:`Y = a·X` then: + +.. math:: f_Y(y) = 1/a·f_X(y/a) = λ/a·e^{-λ·y/a} ~ exp(λ/a) + +When :math:`Χ ~ norm(μ, σ²)` and :math:`Y = a·X + b` then: + +.. math:: + + f_Y(y) = 1/a·f_X(y/a) = 1/a·1/sqrt(2·π)/σ·e^{-λ·((y-b)/a - μ)²/σ²/2} + + = 1/sqrt(2·π)/(a·σ)·e^{-λ·(y - (a·μ+b))²/(a·σ)²/2} = ~ norm(a·μ+b, a·σ) + +Monotonic function of distribution +================================== + +Let's :math:`Y = g(X)` and :math:`g` is monotonic function on range :math:`[a, +b]`. So there is inverse function :math:`h(Y) = X` on range :math:`[g(a), g(b)]` +(if :math:`g` is increasing values) or on range :math:`[g(b), g(a)]` (if +:math:`g` is decreasing values). In that case: + +.. math:: f_Y(y) = f_X(h(y))·(d\ h(t)/dt)(y) + +Proof. Let :math:`g` is monotonically increasing function. Thus: + +.. math:: F_Y(Y ≤ y) = F_X(g(X) ≤ y) = F_X(X ≤ h(y)) = F_X(h(y)) + +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) +