You are on page 1of 57

Random variables

Lectured by Ha Hoang Kha, Ph.D.


Ho Chi Minh City University of Technology
Email: hahoangkha@gmail.com

Content
Random variables

Probability
Histogram or probability density function
Cumulative function
Mean
Variance
Moments
Some representations of random variables

Bi-dimensional random variables

Marginal distributions
Independence
Correlations
Gaussian expression of multiple random variables

Changing random variables


2

Introduction
signal = every entity which contains some physical
information
Examples:

Acoustic waves
Electric current given by
a microphone
Light waves
Current given by
a spectrometer
Number series

Photography

Music,
speech,
...
Light source
(star, )
...

Physical measurements

...
3

Typical Signals

Speech
Biomedical
Sound and Music
Video and Image
Radar

Signal Processing

Signal processing = procedure used to:


extract the information (filtering, detection,
estimation, spectral analysis...)

Adapt the signal (modulation, sampling.)


(to transmit it or save it)
pattern recognition

Classification of Signals
Dimensional classification :
Examples :

Number of free variables.

Electrical potential V(t) = Unidimensional signal


Statistic image black and white brightness B(x,y) = bi-dimensional
signal Black and white film B(x,y,t) = tri-dimensional signal
...

The signal theory is independent on the physic phenomenon and the types of
variables.
Phenomenological Classification

Random or deterministic evolution

Deterministic signal : temporal evolution can be predicted or modeled by an


appropriate mathematical mode

Random signal : the signal cannot be predicted statistical description


Every signal has a random component (external perturbation, )
6

Morphological classification:

Probability

Probability

If two events A and B occurs,

nAB
P A, B lim

N N
nAB nA
nAB
lim
Nlim

nA N
nA

nA df
Nlim
P B / A P A
N

P(B/A) is the conditional probability

P A, B P B / A P A P A / B P B

If A and B are independent, P(A,B)=P(A).P(B)

Random variable and random process


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
x t ,z
z1
z2
z3

t1

t2

t
Signals obtained when
measuring temperature
using many sensors

10

Random variable and random process


The random process is represented as a function x t ,z
Each signal x(t), for each sensor, is a random signal.
At an instant t, all values at this time define a random variable
x t ,z
z1
z2
z3

t1

t2

t
Signals obtained when
measuring temperature
using many sensors

11

Probability density function (PDF)


The characteristics of a random process or a random
variable can be interpreted from the histogram

N(m, ti) = number of events: "xi = x + Dx"


Precision of measurment

Prob mDx xi m 1 Dx lim


N mes
p 1

N(m)

Prob mDx xi pDx lim

N mes

x
m Dx

N m, ti
N mes

(m+1) Dx

N k,t
i

k m

N mes

Nmes = total number of measurments


12

PDF properties
x=dx, the histogram becomes continuous. In this
case we can write:
x2

Prob x1 xi x2 f x, ti dx
x1

Prob x x1 0

n x, t i
where f x, ti lim
N mes N
mes

13

Histogram or PDF
Random signal

Sine wave :

f(x)

x
-1

Uniform PDF
Uniform PDF

14

Cumulative density function

15

Examples

16

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:
E gi

g x f x, t dx
i

Statistical parameters :

Average value :

x ti E xi

Mean quadratic value:


Variance :
Standard deviation :

x f x, t dx
i

mx2 ti E xi2

x 2 f x, ti dx

x2 ti E xi x ti mx x ti
2

x ti mx2 x2
17

Exponential random variable

18

Uniform random variable


1
if a x b

f x b a
0 otherwise
0 x a
xa

F x
if a x b
b a
1 x b
1
a b
2
1
2
2
b a
12

f(x)

c
x
a

19

Examples

20

Examples

21

Examples

22

Gaussian random variable

1
f ( x)
e
2

1 x m

2 2

E( X ) m
If

X N (m; )

V (X )
X m

N (0;1)

23

24

Examples

25

26

27

Examples

28

Bi-dimensional random variable


Two random variables
X and Y have a
common probability
density functions as :

f XY ( x, y) ce

( x2 y 2 )

(X,Y) fXY(x,y) is the


probability density
function of the couple
(X,Y)

29

30

Bi-dimensional Random variables


Cumulative functions:
x y

FX ,Y ( x, y ) P( X x, Y y )

F ( x, y )
f X ,Y ( x, y )
xy
2

X ,Y

( x, y )dxdy

X ,Y

( x, y )dxdy 1

Marginal cumulative distribution functions


x

FX ( x) FXY ( x,)

X ,Y

( x, y )dxdy

f X (u )

FY ( y ) FXY (, y )

X ,Y

( x, y )dxdy

Marginal probability density functions f X (v)

XY

(u , v)dv

XY

(u , v)du

31

32

Examples

33

Bi-dimensional Random variables


Moments of a random variable X

E[ x n y n ]

x n y n f X ,Y ( x, y )dxdy

E[ X ] xf X ,Y ( x, y )dxdy x f X ,Y ( x, y ) dydx xf X ( x)dx



E[Y ]

yf

( y )dy

E[ XY ] E[ X ].E[Y ]

If X and Y are independents and in this case

f X ,Y ( x, y ) f X ( x). fY ( y)
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

You might also like