Professional Documents
Culture Documents
University of Benghazi Faculty of Engineering Electrical and Electronic Engineering Department
University of Benghazi Faculty of Engineering Electrical and Electronic Engineering Department
University of Benghazi
Faculty of Engineering
Electrical and Electronic Engineering Department
.TELECOMMUNICATION LAB II
EE 496
Experment 1
Probability & Random Variable
.In MATLAB
:Experiment list
.PC & Matlab software
:Objective
Introduction to probability & random variable using MATLAB
.software
:Procedure
:part 1
density & distribution function visualization using bult-in
MATLAB commands
)continuous case: a
i- represesnt in MATLAB the following density
:function
:Uniform(a,b) -1
1
f (x=) ,a≤ x≤ b
b− a
1 1
f (x=) = − , 1≤ x≤ 1
( 1) 2
1− −
:Measured
E X( =) 0∧rav X( =5.0
)
:Theoretical
b+ a 1− 1
E X( =) = =0
2 2
2 2
b(− a ) 1[− −( 1 ) ] 1
rav X
( =) = = 3333.
=0
21 21 3
5.0
3333.0
−
RE rav %= 0∗01 =05 %
3333.0
(X )
1
σ= rav
√ (X =
√
) 775.0
3
=
:Gaussian (Normal)(μ,σ) -2
2
− (x− μ )
1 2σ
2
f (x=) e , ≤ x≤∞
−∞
σ √2π
−1 2
1 2
x
f (x=) e , 3≤ x≤ 3
−
√2π
:exponential(λ) -3
f (x=) λ e−xλ ,x≥ 0
f (x=) e− x ,0 ≤ x≤01
:Measured
E X( =) 1rav
, X
( =) 1
:Theoretical
1 1
E X( =) = = 1
λ 1
1 1
rav X
( =) = =1
λ2 1
σ= rav
√ ) 1
(X =
:Normal -1
• :Different means but same standard deviation
Consider three normal distributions with constant
standart deviation (σ=1) & three different means (μ=
.-2,0,2)
:Bernoulli(1,p) -1
p k( =) 1 p kq 1− k ,k=1,0
()
k
p k( =) 15.0 5.0
k 1− k
()
k
,k=1,0 …9,.
,
f 0( =5.0
) ∧ f 1( =5.0
)
:Measured
μ=
k5.0 rav
, K( =5.0
)
:Theoretical
μ=
k p=
5.0 rav K( =qp
) 52.0
=
5.0 52.0
−
RE rav %=
(K ) 0∗01 =
001 %
5.0
σ= rav
√ (K =
)52.0
√ =5.0
:Binomial(n,p) -2
p k( =) n p kq n− k ,k=1,0 …
k () , ,n
p k( =) 02 5.0 5.0
k 02 − k
( )
k
,k=1,0 …
, . ,n− 1
:Measured
μ =01
k rav
, 2671.0
K( =)
:Theoretical
μ =pn
k = 02( 5.0
)( =01
)
rav K( =
qpn
) = 02( 5.0
) ( 5.0
) ( =) 5
2671.0 −5
RE rav %=
(K ) 0∗01 =−
84.69 %
5
σ= rav
√ (K =
) √632.2
5=
:Poisson(λ) -3
e− λλ k
p k=
( ) ,k=1,0 …
, …… .
k!
e− 11 k
p k( =) ,k=1,0 …
, ,n− 1
k!
:Measured
μ=
k5.0 rav
, 9763.0
K( =)
:Theoretical
μ=
krav K( =) λ= 1
5.0 − 1
RE %=
μ 0∗01 =−05 %
1
9763.0 −1
RE rav %=
(K ) 0∗01 =−
12.36 %
1
σ= rav
√ (K =
) 1
:part 2
:probability distribution function user interface (disttool)
select PDF from the Function type drop-down menu to plot the
pdf of the normal distribution using the same parameter
.values
.Change the value of the location parameter μ to 1
:Part 3
:Generation of frequently used probability models
Case 1: Normal
N=100
N=10,000
Case 2: Exponential
N=100
N=10,000
:Part 4
:Statistecal average of random variables
:In a normal
2
μ= 0 ,σ= 1∧ σ = 1
:In an exponential
1 2 1
μ= = 1 ,σ = = 1∧ σ= 1
λ λ2
:Conclusion
in an uniform distribution, the axis horizontal confined •
between -1 & 1 is represent rectangular and the density
.function is equal to 0.5, the area between -1 & 1 is equal to 1
fix std & change mean, if the look the shape normal, here •
changes the place distribution of the mean (uses the shift) but
.no changes the shape distribution
fix mean & change std, if the look the shape normal, here •
changes the shape distribution of the std. The lower std,
decrease the distribution but the approaches mean & the
.higher std, increase the distribution but the away mean