Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Continuous Random variable - Class 3.pdf
1. Continuous Random variable
Introduction
Continuous random variables can represent any value within a specified range or
interval and can take on an infinite number of possible values.
If the image is uncountably infinite (usually an interval) then X is called a
continuous random variable. In the special case that it is absolutely continuous, its
distribution can be described by a probability density function(pdf), which assigns
probabilities to intervals; in particular, each individual point must necessarily have
probability zero for an absolutely continuous random variable
An example of a continuous random variable would be an experiment that
involves measuring the amount of rainfall in a city over a year or the average height
of a random group of 25 people.
Probability density function:
A function f, defined for all x in (−∞ ∞,) is called the probability density function of
a continuous random variable X if
i) f(x) ≥0, for all x in (−∞ ∞,)
∞
∫= 1
ii) f x dx ( )
−∞
Note:
a
∫
1. P(X < a) = ( )
f x dx
−∞
∞
∫
2. P(X > a) = ( )
f x dx
a
b
f x dx
∫
3. P ( a < X < b) = ( )
a
CDF
2. x
∫
F(x) = P(X ≤x) = ( )
f x dx
−∞
Check your progress
1
π 1+ x
, −∞ ≤x≤ ∞can be the p.d.f of a continuous RV.
1. Examine f(x) =
( )2
∞
1
π 1+ x
dx = 1
πTan-1
(x)}
∫( )2
−∞
=
1
π( 2
π
- (-2
π
))
= 1
2. If f(x) = k(1 + x) in 2 < x < 5 is the p.d.f of a continuous RV X, Find i) P(X < 4)
ii) P(3 < X < 4) iii) P(3 < X < 6)
Solution:
Since f(x) is the pdf
∞
∫= 1
f x dx ( )
−∞
∞
∫
1 = f x dx ( )
−∞
=
2
∫+
f x dx (
)
−∞
5
5
f x dx (
)
∫+
2
∞ ∫ 5
f x dx (
)
= 0 + k
(1 ) + x dx
∫+ 0
2
= k (1 + x)2
/2 }UL = 5, LL = 2
= k/2{(1+5)2
– (1 + 2)2
} = k/2{
36 – 9}
1 = (k/2)(27)
⇨ K = 2/27
4
∫
3. i) P(X < 4)
= =
f x dx ( )
−∞
2
∫+
f x dx ( )
−∞
4
4
f x dx ( )
∫ 2
= 0 + 2/27
(1 ) + x dx
∫ 2
= 2/27 { (1+x)2
/2} UL = 4, LL =2
=1/27{(1+4)2
- (1+2)2
} = 1/27 { 25 -9}
=16/27
4
ii) P(3 < X <
4)= 2/27
(1 ) + x dx
∫ 3
= 2/27 {(1+x)2
/2} UL = 4, LL = 3
= 1/27 {25 – 16}
= 9/27 = 1/3
1 2 3 4 5
2/27(1+x)
iii) P(3 < X < 6) = P(3 < X < 5) + P(5<X
<6) 5
= 2/27
(1 ) + x dx
∫ 3
= 2/27 {(1+x)2
/2}UL = 5, LL= 3
= 1/27{ 36 – 16}
= 20/27
3. The amount of bread (in hundreds of kgs) that a certain bakery is able to sell
in a day is a random variable X with a pdf by
⎧
≤ < ⎪
⎨ − ≤ <
A x if x
, 0 5
A x x
f(x) =
4. ⎪
⎩
0 ,
(10 ),
5 10
other
wise
i) Find the value of A
ii) Find the probability that in a day the sales is
(a) More than 500 kg
(b) less than 500 kgs
(c) between 250 and 750 kgs
iii) Find P(X >5/X ≤5)
iv) P(X > 5/ 2.5 <X < 7.5)
Solution:
Since f(x) is a pdf
∞
∫
1 = f x dx ( )
−∞
5
=
0
∫+
f x dx (
)
f x dx ( )
∫+10
∞
∫
f x dx ( )
∫+
f x dx ( )
−∞ 5
0
10
5
10
= 0 +A
x dx
∫+ A
0
(10 ) − x dx
∫+0
5
= A{ x2
/2] UL =5, LL=0 + (10-x)2
/2(-1)] UL =10, LL=5}
= A{ ½(25 – 0) -1/2(0 – 25)}
= A{ 25}
⇨ A = 1/25
∞
∫= P(5<X<10)+P(10<X<00)
ii) a) P(X
>5)= 5
10
f x dx ( )
=
f x dx ( )
∫+0
5
= 1/25
10
(10 ) − x dx
∫ 5
= 1/25 { (10 –x)2
/(-2)} UL = 10, LL=5 =
-1/50{ 0 – 25}
= ½