Important Random Variables

advertisement
Important Random Variables
EE570: Stochastic Processes
Dr. Muqaibel
Based on notes of Pillai
See also
http://www.math.uah.edu/stat
http://mathworld.wolfram.com
Check ‘pdf’, ‘cdf’ commands in Matlab
Continuous-type random variables
1. Normal (Gaussian): X is said to be normal or Gaussian r.v, if
1
f X ( x) 
2
2
e
( x   ) 2 / 2 2
.
This is a bell shaped curve, symmetric around the
parameter 𝜇, and its distribution function is given by
FX ( x ) 

x

1
2 2
e ( y   )
2
/ 2 2
x

dy 
G
,
  
where G( x )   21 e dy is often tabulated. Since 𝑓𝑋 𝑥
depends on two parameters 𝜇 and 𝜎 2 , the notation
𝑋~𝑁(𝜇, 𝜎 2 ) will be used to represent the above CDF
x
 y2 / 2

f X (x)
Thermal noise : Electronics,
Communications Theory

x
Normal (Gaussian)
• 𝑋~𝑁 0,1 is referred to as Standard
Normal r.v.
• Under very general conditions the limiting
distribution of the average of any number
of independent, identically distributed
random variables is norma.
2. Uniform: X  U (a, b), a  b, if
Quantization
Coding Theory
1


, a  x  b,
f X ( x)   b  a

 0, otherwise.
1
ba
f X (x)
a
x
b
FX ( x)
0
𝐹𝑋 𝑥 = (𝑥 − 𝑎)/(𝑏 − 𝑎)
1
𝑥<𝑎
𝑎≤𝑥<𝑏
𝑏≤𝑥
1
a
b
x
• 𝑋~𝜀 𝜆 𝑖𝑓
Exponential
0.8
0.6
• If occurrence of events over non-overlapping
intervals are independent, such as arrival time of
telephone calls or bus arrival times at a bus stop,
then the waiting time is exponential.
• Memoryless Property of exponential distribution
• 𝑃 𝒙>𝑡+𝑠 𝒙>𝑠 =
𝑃{𝒙>𝑡+𝑠}
𝑃 𝒙>𝑠
=
𝑒 − 𝑡+𝑠
𝑒 −𝑠
=
𝑒 −𝑡
= 𝑃{𝒙 > 𝑡}
• Memoryless property simplifies many
calculations and is mainly the reason for wide
applicability of the exponential model.
prameter=1
parameter=2
X
1

 e  x /  , x  0,
f X ( x)   

 0, otherwise.
1
f (x)
Queuing Theory
0.4
0.2
0
-2
0
2
4
x
6
8
10
% Dr. Ali Muqaibel
close all
clear all
clc
x=-1:0.01:10
y1=pdf('exp',x,1);
y2=pdf('exp',x,2);
plot(x,y1,x,y2,':');
legend ('prameter=1','parameter=2')
xlabel('x')
ylabel('f_X(x)')
Label ('Exponential Distribution')
Gamma is a generalization of the exponential distribution with
two parameters 𝛼 𝑎𝑛𝑑 𝛽. If 𝛼 = 1 , we get the exponential r.v.
4. Gamma: 𝑋~𝐺(𝛼, 𝛽) with (𝛼 > 0, 𝛽 > 0) if
Queuing Theory
f X (x )
 x 1
x / 

e
, x  0,
f X ( x )   ( )  

0, otherwise.

x
f X (x )
If 𝛼 = 𝑛 an integer then
( n )  ( n  1)!.
5. Beta: X  (a, b) if (a  0, b  0)
1

x a 1 (1  x )b1 , 0  x  1,

f X ( x )    ( a , b)

0,
otherwise.

where the Beta function  ( a , b) is defined as
1
 (a, b)   u a 1 (1  u)b1 du.
0
0
1
x
6. Chi-Square: X   2 (n), if (Fig. 3.12)
f X (x )
1

x n / 21e  x / 2 , x  0,
 n/2
f X ( x )   2 ( n / 2 )
(3-36)

0,
otherwise.

x
Fig. 3.12
Note that  2 (n) is the same as Gamma (n / 2, 2).
7. Rayleigh: X R( 2 ), if (Fig. 3.13)
2
2
x

 2 e  x / 2 , x  0,
f X ( x )  

 0, otherwise.
8. Nakagami – m distribution:
f X (x )
(3-37)
x
Fig. 3.13
In communication systems, the signal
amplitude values of a randomly received
signal usually can be modeled as a
Rayleigh distribution
 2  m m 2 m 1  mx 2 / 
x e
, x0



f X ( x )   ( m )   

0
otherwise

Wireless
Communications
Related to Gaussian, Comm. Theory
f X (x )
9. Cauchy: X C ( ,  ), if (Fig. 3.14)
f X ( x) 
 /
  (x  )
2
2

,    x  .
Fig. 3.14
10. Laplace: (Fig. 3.15)
1 |x|/ 
f X ( x) 
e
,    x  .
2
11. Student’s t-distribution with n degrees of freedom
( n  1) / 2  
t2 
1  
f T (t ) 
n
n  ( n / 2 ) 
f X ( x)
 ( n 1) / 2
,    t  .
fT ( t )
x
Fig. 3.15
t
Fig. 3.16
x
12. Fisher’s F-distribution
{( m  n ) / 2} m m / 2 n n / 2
z m / 2 1
, z0

(mn) / 2
f z ( z)  
( m / 2) ( n / 2)
( n  mz )

0
otherwise

Other distributions:
Erlang (traffic), Weibull (failure rate), Poreto ( Economics , reliability),
Maxwell (Statistical)
The exponential model works well for inter arrival times
(while the Poisson distribution describes the total number of events in
a given period)
(3-42)
Discrete-type random variables
1. Bernoulli: X takes the values (0,1), and
P( X  0)  q,
P( X  1)  p.
2. Binomial: X B(n, p), if (Fig. 3.17)
(3-43)
The total number of
favorable outcomes is
binomial r.v.
 n  k n k
P( X  k )  
, k  0,1,2,, n.
k 
p q
 
3. Poisson: X P( ) , if (Fig. 3.18)
P( X  k )  e 
k
k!
, k  0,1,2,, .
P( X  k )
P( X  k )
k
12
Fig. 3.17
n
Fig. 3.18
The number of occurrence of
a rare event in a large
number of trials: e.g number
of telephone calls at an
exchange over a fixed
duration
4. Hypergeometric:
P( X  k ) 
m
 
k 
 
 N m 


 n k 


,
N 
 
n 
 
max(0, m  n  N )  k  min( m, n )
5. Geometric: X  g ( p ) if
The number of trials needed to the
first success in repeated Bernoulli
trials is geometric
P( X  k )  pq k , k  0,1,2,, ,
6. Negative Binomial: X ~NB ( r, p), if
 k  1 r k  r
P( X  k )  
p q ,

 r 1
q  1  p.
The number of trials needed to the
𝑟𝑡ℎ success in repeated Bernoulli
trials is negative binomial
k  r, r  1,
7. Discrete-Uniform:
P( X  k ) 
1
, k  1,2,, N .
N
.
Matlab
'beta' or 'Beta',
'bino' or 'Binomial',
'chi2' or 'Chisquare',
Check ‘pdf’, ‘cdf’ commands in Matlab
'exp' or 'Exponential',
Check rand, randn
'ev' or 'Extreme Value',
'f' or 'F',
'gam' or 'Gamma',
'gev' or 'Generalized Extreme Value',
'gp' or 'Generalized Pareto',
'geo' or 'Geometric',
'hyge' or 'Hypergeometric',
'logn' or 'Lognormal',
'nbin' or 'Negative Binomial',
'ncf' or 'Noncentral F',
'nct' or 'Noncentral t',
'ncx2' or 'Noncentral Chi-square',
'norm' or 'Normal',
'poiss' or 'Poisson',
'rayl' or 'Rayleigh',
't' or 'T',
'unif' or 'Uniform',
'unid' or 'Discrete Uniform',
'wbl' or 'Weibull'.
Converting Data to PDF
0.45
% Dr. Ali Muqaibel
close all
clear all
clc
n=10000;
f=randn(1,n);
[y,x]=hist(f,10);
y=y/n/(x(2)-x(1));
Hist
Model
KSDensity
0.4
0.35
0.3
0.25
0.2
0.15
0.1
xm=-1:0.01:10;
ym=pdf('norm',xm,0,1);
0.05
0
-5
0
5
10
x
[yr,xr]=ksdensity(f);
plot(x,y,xm,ym,xr,yr,':');
legend ('Hist','Model','KSDensity')
xlabel('x')
Matlab live demo
• Impact of number of points
• Difference between histogram
and pdf ; Normalization
• Fitting
Download