author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Tue, 05 Apr 2016 18:07:34 +0300 | |
changeset 13 | 8a32b268e8bf |
parent 10 | 5a09c6837dcb |
child 16 | c48b0353e055 |
permissions | -rw-r--r-- |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
============================= |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
Continuous random variables |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
============================= |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
.. contents:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
:local: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
Probability density function |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
============================ |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
.. role:: def |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
:class: def |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
:def:`Probability density function` (PDF) for continuous random variable |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
:math:`x` is function: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
16 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
17 |
.. math:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
18 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
19 |
PDF(a ≤ X ≤ b) = P(a ≤ X ≤ b) = ∫_{a, b}\ f_X(x) \ dx |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
20 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
21 |
f_X(x) ≥ 0 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
22 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
23 |
∫_{-∞, +∞}\ f_X(x) \ dx = 1 |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
24 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
25 |
:math:`f_X(x)` funtion maps values :math:`x` from sample space to real numbers. |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
26 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
27 |
For continuous random variable: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
28 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
29 |
.. math:: P(X = a) = 0 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
30 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
31 |
Expectation |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
32 |
=========== |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
33 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
34 |
:def:`Expectation` of continuous random variable is: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
35 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
36 |
.. math:: μ = E[X] = ∫_{-∞, +∞}\ x·f_X(x) \ dx |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
37 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
38 |
Properties: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
39 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
40 |
.. math:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
41 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
42 |
E[X + Y] = E[X] + E[Y] |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
43 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
44 |
E[a·X] = a·E[X] |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
45 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
46 |
E[a·X + b] = a·E[X] + b |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
47 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
48 |
Variance |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
49 |
======== |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
50 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
51 |
:def:`Variance` of continuous random variable is: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
52 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
53 |
.. math:: var[X] = ∫_{-∞, +∞}\ (x-μ)²·f_X(x) \ dx |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
54 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
55 |
Properties: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
56 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
57 |
.. math:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
58 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
59 |
var[a·X + b] = a²·var[X] |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
60 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
61 |
var[X] = E[X²] - E²[X] |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
62 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
63 |
Standard deviation |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
64 |
================== |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
65 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
66 |
:def:`Standard deviation` of continuous random variable is: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
67 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
68 |
.. math:: σ_Χ = sqrt(var[X]) |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
69 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
70 |
Cumulative distribution functions |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
71 |
================================= |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
72 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
73 |
:def:`Cumulative distribution functions` (CDF) of random variable :math:`X` is: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
74 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
75 |
.. math:: F_X(x) = P(X ≤ x) = ∫_{-∞, x}\ f_X(t) \ dt |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
76 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
77 |
So: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
78 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
79 |
.. math:: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
80 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
81 |
P(a ≤ X ≤ b) = F_X(b) - F_X(a) + f_X(a) = ∫_{a,b}\ f_X(x) \ dx |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
82 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
83 |
F_X(-∞) = 0 |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
84 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
85 |
F_X(+∞) = 1 |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
86 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
87 |
and :math:`F_X(a) ≤ F_X(b)` for :math:`a ≤ b`. |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
88 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
89 |
Relation between CDF and PDF: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
90 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
91 |
.. math:: (d(CDF(t))/dt)(x) = PDF(x) |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
92 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
93 |
Conditional probability |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
94 |
======================= |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
95 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
96 |
:def:`Conditional probability` of continuous random variable is: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
97 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
98 |
.. math:: P(X ⊆ B | A) = ∫_{B}\ f_{X|A}(x) \ dx = ∫_{A∩B}\ f_X(x) \ dx / P(A) |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
99 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
100 |
:def:`Conditional expectation` of continuous random variable is: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
101 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
102 |
.. math:: E[X|A] = ∫_\ x·f_{X|A}(x) \ dx |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
103 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
104 |
Properties: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
105 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
106 |
.. math:: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
107 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
108 |
E[g(X)|A] = ∫_\ g(x)·f_{X|A}(x) \ dx |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
109 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
110 |
Independence |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
111 |
============ |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
112 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
113 |
Random variable :math:`X`, :math:`Y` are :def:`independent` if: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
114 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
115 |
.. math:: f_{X,Y}(x, y) = f_X(x)·f_Y(y) |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
116 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
117 |
Continuous uniform random variable |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
118 |
================================== |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
119 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
120 |
:def:`Continuous uniform random variable` is :math:`f_X(x)` that is non-zero |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
121 |
only on :math:`[a, b]` with :math:`f_X(x) = `1/(b-a)`. |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
122 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
123 |
.. math:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
124 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
125 |
E[unif(a, b)] = (b+a)/2 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
126 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
127 |
var[unif(a, b)] = (b-a)²/12 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
128 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
129 |
σ = (b-a)/sqrt(12) |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
130 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
131 |
Proofs: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
132 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
133 |
.. math:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
134 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
135 |
E[unif(a, b)] = ∫_{a, b}\ x·1/(b-a)·dx = x²/2/(b-a) |_{a, b} = (b²-a²)/(b-a)/2 = (b+a)/2 |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
136 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
137 |
E[unif²(a, b)] = ∫_{a, b} x²·1/(b-a)·dx = x³/3/(b-a) |_{a, b} = (b³-a³)/(b-a)/3 = (b²+b·a+a²)/3 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
138 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
139 |
var[unif(a, b)] = E[unif²(a, b)] - E²[unif(a, b)] = (b²+b·a+a²)/3 - (b+a)²/4 = (b-a)²/12 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
140 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
141 |
.. note:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
142 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
143 |
In maxima:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
144 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
145 |
(%i4) factor((b^2+b*a+a^2)/3 - (a+b)^2/4); |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
146 |
2 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
147 |
(b - a) |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
148 |
-------- |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
149 |
12 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
150 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
151 |
Exponential random variables |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
152 |
============================ |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
153 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
154 |
:def:`Exponential random variables` with parameter :math:`λ` is: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
155 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
156 |
.. math:: f_X(x) = λ·exp(-λ·x) |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
157 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
158 |
for :math:`x ≥ 0`, and zero otherwise. |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
159 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
160 |
Properties: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
161 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
162 |
.. math:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
163 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
164 |
E[exp(λ)] = 1/λ |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
165 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
166 |
var[exp(λ)] = 1/λ² |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
167 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
168 |
Proof: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
169 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
170 |
.. math:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
171 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
172 |
∫_{-∞, +∞}\ f_X(x) \ dx = ∫_{0, +∞}\ λ·exp(-λ·x) \ dx = -exp(-λ·x) |_{0, +∞} = 1 |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
173 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
174 |
E[exp(λ)] = ∫_{0, +∞}\ x·λ·exp(-λ·x) \ dx = 1/λ |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
175 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
176 |
E[exp²(λ)] = ∫_{0, +∞}\ x²·λ·exp(-λ·x) \ dx = 1/λ² |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
177 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
178 |
.. note:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
179 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
180 |
From maxima:: |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
181 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
182 |
(%i15) assume(lambda>0); |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
183 |
(%o15) [lambda > 0] |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
184 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
185 |
(%i16) integrate(lambda*%e^(-lambda*x),x,0,inf); |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
186 |
(%o16) 1 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
187 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
188 |
(%i17) integrate(x*lambda*%e^(-lambda*x),x,0,inf); |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
189 |
1 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
190 |
(%o17) ------ |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
191 |
lambda |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
192 |
|
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
193 |
(%i18) integrate(x^2*lambda*%e^(-lambda*x),x,0,inf); |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
194 |
2 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
195 |
(%o18) ------- |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
196 |
2 |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
197 |
lambda |
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
198 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
199 |
Normal random variables |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
200 |
======================= |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
201 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
202 |
:def:`Normal random variables` with parameters :math:`μ, σ` and :math:`σ > 0` |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
203 |
defined by PDF: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
204 |
|
7
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
205 |
.. math:: norm(μ, σ²) = 1/sqrt(2·π)/σ·exp(-(x-μ)²/σ²/2) |
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
206 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
207 |
Properties: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
208 |
|
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
209 |
.. math:: |
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
210 |
|
7
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
211 |
E[norm(μ, σ²)] = μ |
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
212 |
|
7
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
213 |
var[norm(μ, σ²)] = σ² |
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
214 |
|
8 | 215 |
Summa of two normal r.v. |
216 |
======================== |
|
217 |
||
218 |
If :math:`Z = X + Y` and X and Y is independent normal r.v. then: |
|
219 |
||
220 |
.. math:: norm(μ_z, σ_z²) = norm(μ_x+μ_y, σ_x²+σ_y²) |
|
221 |
||
222 |
Proof: |
|
4
5d6cec5fe095
Probability density function. Continuous uniform random variable. Exponential
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
223 |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
224 |
.. math:: |
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
225 |
|
8 | 226 |
norm(μ_z, σ_z²) = ∫_x\ f_X(x)·f_Y(z-x)\ dx |
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
227 |
|
8 | 228 |
= ∫_x\ 1/sqrt(2·π)/σ_x·exp(-(x-μ_x)²/σ_x²/2)·1/sqrt(2·π)/σ_y·exp(-(z-x-μ_y)²/σ_y²/2)\ dx |
229 |
||
230 |
= 1/sqrt(2·π·(σ_x² + σ_y²))·exp(-(x-μ_x-μ_y)²/(σ_x²+σ_y²)/2) |
|
6
9b4e31a03161
Normal random variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
4
diff
changeset
|
231 |
|
7
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
232 |
Linear function of distribution |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
233 |
=============================== |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
234 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
235 |
If :math:`Y = a·X + b` then :math:`f_Y(y) = 1/|a|·f_X((y-b)/a)`. |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
236 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
237 |
Proof, for :math:`y > 0`: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
238 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
239 |
.. math:: F_Y(Y ≤ y) = F_X(a·X + b ≤ y) = F_X(X ≤ (y-b)/a) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
240 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
241 |
so: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
242 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
243 |
.. 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) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
244 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
245 |
For :math:`y < 0`: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
246 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
247 |
.. math:: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
248 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
249 |
F_Y(Y > y) = F_X(a·X + b > y) = F_X(X < (y-b)/a) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
250 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
251 |
F_Y(Y <= y) = 1 - F_Y(Y > y) = 1 - F_X(X < (y-b)/a) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
252 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
253 |
d/dy\ f_Y(y) = -1/a·f_X((y-b)/a) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
254 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
255 |
Combining expression for :math:`a≠0` gives us result. |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
256 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
257 |
If X is uniform distribution with parameters :math:`c, d` then :math:`a·Y + b` |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
258 |
also is uniform distribution with parameters :math:`a·c+b, a·d+b`. |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
259 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
260 |
If X is exponential distribution with parameters :math:`λ` then :math:`a·Y` |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
261 |
also is exponential distribution with parameters :math:`λ/a` for :math:`a > 0`. |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
262 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
263 |
If X is normal distribution with parameters :math:`μ, σ²` then |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
264 |
:math:`a·Y + b` also is normal distribution with parameters :math:`a·μ+b, (a·σ)²`. |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
265 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
266 |
Proofs. |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
267 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
268 |
When :math:`Χ ~ exp(λ)` and :math:`Y = a·X` then: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
269 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
270 |
.. math:: f_Y(y) = 1/a·f_X(y/a) = λ/a·e^{-λ·y/a} ~ exp(λ/a) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
271 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
272 |
When :math:`Χ ~ norm(μ, σ²)` and :math:`Y = a·X + b` then: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
273 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
274 |
.. math:: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
275 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
276 |
f_Y(y) = 1/a·f_X(y/a) = 1/a·1/sqrt(2·π)/σ·e^{-λ·((y-b)/a - μ)²/σ²/2} |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
277 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
278 |
= 1/sqrt(2·π)/(a·σ)·e^{-λ·(y - (a·μ+b))²/(a·σ)²/2} = ~ norm(a·μ+b, a·σ) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
279 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
280 |
Monotonic function of distribution |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
281 |
================================== |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
282 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
283 |
Let's :math:`Y = g(X)` and :math:`g` is monotonic function on range :math:`[a, |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
284 |
b]`. So there is inverse function :math:`h(Y) = X` on range :math:`[g(a), g(b)]` |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
285 |
(if :math:`g` is increasing values) or on range :math:`[g(b), g(a)]` (if |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
286 |
:math:`g` is decreasing values). In that case: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
287 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
288 |
.. math:: f_Y(y) = f_X(h(y))·(d\ h(t)/dt)(y) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
289 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
290 |
Proof. Let :math:`g` is monotonically increasing function. Thus: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
291 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
292 |
.. math:: F_Y(Y ≤ y) = F_X(g(X) ≤ y) = F_X(X ≤ h(y)) = F_X(h(y)) |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
293 |
|
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
294 |
and so: |
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
295 |
|
10 | 296 |
.. 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) |
7
c9c0861c10c2
Linear function of distribution. Monotonic function of distribution.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
6
diff
changeset
|
297 |
|
8 | 298 |
Convolution formula |
299 |
=================== |
|
300 |
||
301 |
If :math:`Z = X + Y` and X and Y is independent r.v. then: |
|
302 |
||
10 | 303 |
.. math:: f_Z(z) = ∫_x\ f_X(x)·f_Y(z-x)·dx |
8 | 304 |
|
305 |
Proof: |
|
306 |
||
307 |
Consider :math:`Z` at conditional event :math:`X=x`: |
|
308 |
||
309 |
.. math:: f_{Z|X}(z|X=x) = f_{z|X=x}(z|X=x) |
|
310 |
||
311 |
Becasue of independence of :math:`X` and :math:`Y`: |
|
312 |
||
313 |
.. math:: f_{Z|X}(z|X=x) = f_{X+Y|X=x}(z|X=x) = f_{x+Y}(z) = f_Y(z-x) |
|
314 |
||
315 |
Joint PDF of :math:`X` and :math:`Z` is: |
|
316 |
||
317 |
.. math:: f_{X,Z}(x,z) = f_X(x)·f_{Z|X}(z|X=x) = f_X(x)·f_Y(z-x) |
|
318 |
||
319 |
By integrating by :math:`x` we get: |
|
320 |
||
321 |
.. math:: f_Z(z) = ∫_x\ f_{X,Z}(x,z)\ dx = ∫_x\ f_X(x)·f_Y(z-x)\ dx |
|
322 |
||
10 | 323 |
Covariance |
324 |
========== |
|
325 |
||
326 |
Covariance of two r.v. is: |
|
327 |
||
328 |
.. math:: cov(X, Y) = E[(X - E[X])·(Y - E[Y])] |
|
329 |
||
330 |
Properties: |
|
331 |
||
332 |
.. math:: cov(X, Y) = E[X·Y] - E[X]·E[Y] |
|
333 |
||
334 |
.. math:: cov(X, X) = var(X) |
|
335 |
||
336 |
.. math:: cov(a·X + b, Y) = a·cov(X, Y) |
|
337 |
||
338 |
.. math:: cov(X, Y + Z) = cov(X, Y) + cov(X, Z) |
|
339 |
||
340 |
.. math:: var(X + Y) = var(X) + var(Y) + 2·cov(X, Y) |
|
341 |
||
342 |
Covariance of two independent r.v. is zero. |
|
343 |
||
344 |
Proof: |
|
345 |
||
346 |
.. math:: |
|
347 |
||
348 |
cov(X, Y) = E[(X - E[X])·(Y - E[Y])] = E[(X - E[X])]·E[(Y - E[Y])] = 0 |
|
349 |
||
350 |
Correlation coefficient |
|
351 |
======================= |
|
352 |
||
353 |
Dimensionless version of covariance: |
|
354 |
||
355 |
.. math:: ρ(Χ, Υ) = E[(X-E[X])/σ_Χ·(Y-E[Y])/σ_Y] = cov(X, Y)/(σ_X·σ_Y) |
|
356 |
||
357 |
It is defined only for cases when :math:`σ_X ≠ 0` and :math:`σ_Y ≠ 0`. |
|
358 |
||
359 |
Obviously :math:`-1 ≤ ρ(Χ, Υ) ≤ +1` and :math:`ρ(Χ, X) = 0`. |
|
360 |
||
361 |
For independent r.v. :math:`ρ(Χ, Y) = 0`. |
|
362 |
||
363 |
If :math:`|ρ(X, Y)| = 1` then :math:`X` and :math:`Y` is have linear |
|
364 |
dependencies :math:`X = Y` or :math:`X = -Y`. |
|
365 |
||
366 |
Properties: |
|
367 |
||
368 |
.. math:: ρ(a·X + b, Y) = sign(a)·ρ(X, Y) |
|
369 |