Random Variables CH2 Muqaibel
Random Variables CH2 Muqaibel
Random Variables
Dr. Ali Hussein Muqaibel
Ver. 5.3
𝑆
{𝐻 𝐻 𝑇 }
{𝐻 𝑇 𝑇 }
{𝑇 𝑇 𝑇 }
{𝐻 𝑇 𝑇 }
• Example: (numeric)
Head
• Mixed RV
• Wheel of chance
The type is based on the event not the Sample Space. Example:
Wheel of chance
In this example is continuous and the event is discrete
We will define two more distributions of the random variable which will help us finally to
calculate probability.
In our flipping the coin 3 times and counting the number of heads
3/8
1/2
3/8
1/8
1/8
𝑋
0 1 2 3
if
A right-continuous function
3/8
1/2
3/8
1/8
The stair type distribution function can be written as
1/8
𝑋
0 1 2 3
From (3),
• Properties (1) and (2) are used to prove if a certain function can be a
valid density function.
Dr. Ali Muqaibel 16
Additional Examples: Example 1
A random current is described by the sample space 𝑆 = {−4 ≤ 𝑖 ≤ 12}. A random variable is defined to by
−2 𝑖 ≤ −2 𝑥
𝑋 𝑖 = 𝑖 −2 < 𝑖 ≤ 1 6
1 1<𝑖≤4 4
6 4<𝑖
2
a. Show the mapping of the random variable. −4 −2 1
1 2 𝑖
b. What type of random variable is this? 4 6 12
−2
a. See figure
b. Mixed random variable
1/2
1/4
𝑋
0 2 5 12
2. ∫ 𝑓 𝑥 𝑑𝑥 = 1
c) Sketch 𝑋 vs. .
d) Find the value of 𝑋
Ver. 5.4
0.9 mean=0,variance=1
mean=0,variance=5
0.8 mean=-2,variance=0.5
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-6 -4 -2 0 2 4 6
𝑎
24
CDF for Gaussian R.V.
The distribution function is found from
We need and 𝑋
Example: Let 𝑥
2 and 𝑥 , then
Evaluate
Numerically
Uncountable infinite tables to
Evaluate be constructed
Numerically
Dr. Ali Muqaibel 26
Problem!
• Finally we will get a Table for various values of .
• The table will only work for Gaussian distribution with 𝑥2 and 𝑥 .
• Since the combinations of 𝑥 and 𝑥2 are infinite (uncountable infinite)
• Uncountable infinite tables to be constructed
• Unpractical method
, ,
,
• of
in the table
. .
• %
.
• MATLAB:
𝑁 = 6, 𝑝 = 0.25
Dr. Ali Hussein Muqaibel
Ver. 5.0
Probabilistic Methods for Electrical Engineers
Dr. Ali Muqaibel 34
Binomial Distribution
Let , N = 1, 2,..., then the function
• % EE315 HW 3
0.25
N=6;
0.2
pdf
• 0.15
• P=0.25; 0.1
• x=0:N; 0.05
• y=binopdf(x,N,P) 0
0 1 2 3 4 5 6 7
• figure (1)
• stem(x,y)
• xlabel('Power delivered by the Master Station') 1
• ylabel ('pdf')
0.9
0.8
• figure (2)
CDF 0.6
0.5
• stairs(x,y1) 0.4
•
0.3
0.2
• ylabel ('CDF')
• % axis ([0 0.8 0 1.2]) The following figure illustrates the binomial density and
distribution functions for 𝑁 = 6 and 𝑝 = 0.25.
37
Dr. Ali Muqaibel
Example: Binomial Distribution
A canned juice company creates an “Under the Caps” promotion whereby a
customer can win an instant cash prize of SR 1 by looking under the bottle cap
with probability of ¼ . A customer buys eight bottles of juice from this company.
a) Find the pdf (or PMF) of the number of winning bottles, and denote as .
b) Compute the probability of wining more than SR 4.
a) The random variable is binomial with parameters and
where
b) The probability of wining more than SR 4 is
Poisson 𝑏=4
𝑏=10
𝑃𝑀𝐹
• As constant
• Then , Binomial (discrete time) Poisson (Continuous
time)
• The Poisson RV has a density and distribution 𝑥
𝐶𝐷𝐹
𝑏=1
where b > 0 is a real constant. 𝑏=4
𝑏=10
40
Dr. Ali Muqaibel
Example: Poisson Distribution
• At a gasoline station, cars arrive according to Poisson distribution at a rate of 50
per hour. There is 1 gasoline pump and it takes 1 min to obtain fuel.
• What is the probability that a waiting line will occur.
•
• car per min
k
b
• FX ( x) e b u( x k )
• k 0 k!
• Probability of waiting
• Probability of waiting in a line=20.32%
k 0 k!
Let 𝑏 = 𝜆𝑇 = × × 3 sec = 1
𝑒 𝑏 𝑒
k
b 𝑃 𝑋=𝑘 = =
FX ( x) e b
k 0 k!
u( x k ) 𝑘! 𝑘!
Prob. of blocked service is=𝑃 𝑋 > 4 = 1 − 𝑃 𝑋 ≤ 4 = 1 − ∑ 𝑃(𝑋 = 𝑘)
𝑃 𝑋 = 0 = 𝑒 = 0.368
𝑒 𝑒 𝑒
Ans. 𝑃 𝑋 = 1 = 𝑒 ,𝑃 𝑋 = 2 =
2
,𝑃 𝑋 = 3 =
6
,𝑃 𝑋 = 4 =
24
1 1 1 65
𝑃 𝑋 >4 = 1−𝑒 2+ + + = 1−𝑒 = 3.66 × 10
2 6 24 24
where
where
• is the average value
• Used to represent the fluctuation of signal
strength in “radar”… rain drop size
if None Decreasing
Right continuous
(1) F (−∞|𝐵) = 0 (2) F (∞|𝐵) = 1
𝑝𝑟𝑜𝑜𝑓 𝐹 −∞ 𝐵 = P X ≤ −∞|𝐵 𝑃𝑟 𝑜 𝑜𝑓 𝐹 (∞|𝐵) = P X ≤ ∞|𝐵
𝑃 X ≤ −∞ ∩ 𝐵 0
= = =0 𝑃 X ≤ ∞∩𝐵 𝑃(𝐵)
𝑃(𝐵) 𝑃(𝐵) = = =1
𝑃(𝐵) 𝑃(𝐵)
Dr. Ali Muqaibel 50
Conditional Density Functions
, for all
+ +
+ +
•
•
𝑓 (𝑥) = 0.437𝛿(𝑥 − 1)+0.390𝛿(𝑥 − 2)+0.173𝛿(𝑥 − 3)
𝐹 (𝑥) = 0.437𝑢(𝑥 − 1)+0.390𝑢(𝑥 − 2)+0.173𝑢(𝑥 − 3)
( )
f X (x | X 2)
• Since ∫
f X (x )
10𝑚
50𝑚
Target
Bull's-eye
• Check end of chapter summary
ym=pdf('norm',xm,0,1);
[yr,xr]=ksdensity(f);
plot(x,y,xm,ym,xr,yr,':');
legend
('Hist','Model','KSDensity')
xlabel('x')
Dr. Ali Muqaibel 62