Professional Documents
Culture Documents
OP01 Random Variables
OP01 Random Variables
+ + +
= =
| | | |
| |
= =
| |
|
\ .
\ . \ .
( ) ( ) ( ) ( ) ( )
, / / P A B P B A P A P A B P B = =
Let us consider the random process : measure the
temperature in a room
Many measurements can be taken simultaneously using
different sensors (same sensors, same environments) and
give different signals
t
,
1
,
2
,
3
t
1
t
2
( ) , , t x
Signals obtained when
measuring temperature
using many sensors
10
Random variable and random process
The random process is represented as a function
Each signal x(t), for each sensor, is a random signal.
At an instant t, all values at this time define a random variable
( ) , , t x
11
Random variable and random process
t
,
1
,
2
,
3
t
1
t
2
( ) , , t x
Signals obtained when
measuring temperature
using many sensors
N(m, t
i
) = number of events: "x
i
= x + Ax"
x
m Ax
(m+1) Ax
N(m)
Precision of measurment
( )
( )
| |
( )
1
,
Prob m 1 lim
,
Prob lim
mes
mes
i
i
N
mes
p
i
k m
i
N
mes
N m t
m x x x
N
N k t
m x x p x
N
A s < + A = (
A s < A =
N
mes
= total number of measurments
Probability density function (PDF)
The characteristics of a random process or a random
variable can be interpreted from the histogram
12
PDF properties
x=dx, the histogram becomes continuous. In this
case we can write:
| | 0 Prob
1
= = x x
| | ( )
2
1
1 2
Prob ,
x
i i
x
x x x f x t dx s < =
}
( )
( )
mes
i
N
i
N
t x n
t x f
mes
,
lim , where
+
=
13
Histogram or PDF
Random signal
Sine wave :
Uniform PDF
14
-1
1
f(x)
x
Uniform PDF
Cumulative density function
15
Examples
16
{ } ( ) ( )
,
i i
E g g x f x t dx
+
=
}
Statistical parameters :
Average value :
Mean quadratic value:
( ) { } ( )
,
x i i i
t E x x f x t dx
+
= =
}
Variance :
( ) ( )
{ }
( )
2
2 2
2
x i i x i x i
x
t E x t m t o = =
Standard deviation :
( )
2 2
x i x x
t m o =
Expectation, variance
Every function of a random variable is a random variable. If we know the
probability distribution of a RV, we can deduce the expectation value of
the function of a random variable:
17
( ) { } ( )
2
2 2
,
i i i
x
m t E x x f x t dx
+
= =
}
Exponential random variable
18
Uniform random variable
19
a
b
f(x)
x
c
( )
( )
( )
( )
2
2
1
if
0 otherwise
0
if
1
1
2
1
12
a x b
f x
b a
x a
x a
F x a x b
b a
x b
a b
b a
s s
<
= s s
>
= +
=
20
Examples
21
Examples
22
Examples
Gaussian random variable
23
( )
2
2
1
2
1
( )
2
x m
f x e
o
o t
=
2
( ) ( ) E X m V X o = =
( ; ) (0;1)
X m
If X N m N o
o
~ ~
24
25
Examples
26
27
28
Examples
Bi-dimensional random variable
Two random variables
X and Y have a
common probability
density functions as :
(X,Y) f
XY
(x,y) is the
probability density
function of the couple
(X,Y)
2 2
( )
( , )
x y
XY
f x y ce
+
=
29
30
Bi-dimensional Random variables
Cumulative functions:
Marginal cumulative distribution functions
Marginal probability density functions
dxdy y x f y Y x X P y x F
x y
Y X Y X
} }
= < < = ) , ( ) , ( ) , (
, ,
1 ) , (
,
=
} }
+
+
dxdy y x f
Y X
y x
y x F
y x f
Y X
c c
c
=
) , (
) , (
2
,
dxdy y x f y F y F
dxdy y x f x F x F
y
Y X XY Y
x
Y X XY X
} }
} }
+
+
= + =
= + =
) , ( ) , ( ) (
) , ( ) , ( ) (
,
,
}
}
+
+
=
=
du v u f v f
dv v u f u f
XY X
XY X
) , ( ) (
) , ( ) (
31
32
33
Examples
Bi-dimensional Random variables
Moments of a random variable X
,
, ,
[ ] ( , )
[ ] ( , ) ( , ) ( )
[ ] ( )
[ ] [ ]. [ ]
n n n n
X Y
X Y X Y X
y
E x y x y f x y dxdy
E X xf x y dxdy x f x y dydx xf x dx
E Y yf y dy
E XY E X E Y
+ +
+ + + + +
+
=
(
= = =
(
=
=
} }
} } } } }
}
,
( , ) ( ). ( )
X Y X Y
f x y f x f y =
If X and Y are independents and in this case
34
35
36
37
Covariance
38
Covariance
39
Correlation coefficient
40
Correlation coefficient
41
Correlation coefficient
42
43
44
45
46
47
48
49
PDF of a transformed RV
Suppose X is a continuous RV with known PDF
Y=h(X) a function of the RV X
What is the PDF of Y?
50
51
52
PDF of a transformed RV: exercises
X is a uniform random variable between -2 and 2.
Write the expression on pdf of X
Find the PDF of Y=5X+9
53
Sum of 2 RVs
54
Sum of 2 RVs
55
Sum of 2 RVs
56
Sum of 2 RVs
57