0% found this document useful (0 votes)
7 views24 pages

Contious Random Variable - 1

The document explains the differences between discrete and continuous random variables, highlighting their respective probability distributions and functions. It details the properties of probability density functions (p.d.f.) for continuous variables, including how to calculate probabilities and the significance of area under the curve. Additionally, it covers examples of continuous random variables, their p.d.f.s, and methods for finding median, quartiles, mean, and variance.

Uploaded by

rukurlrana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views24 pages

Contious Random Variable - 1

The document explains the differences between discrete and continuous random variables, highlighting their respective probability distributions and functions. It details the properties of probability density functions (p.d.f.) for continuous variables, including how to calculate probabilities and the significance of area under the curve. Additionally, it covers examples of continuous random variables, their p.d.f.s, and methods for finding median, quartiles, mean, and variance.

Uploaded by

rukurlrana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Continuous Random Variable

Probability & Statistics 2


A Level
Discrete vs Continuous Distributions
You all know the distinction between discrete and continuous variables:
• Discrete: hair colour, shoe size, IQ, …
• Continuous: height, weight, time, …

Random variables are discrete or continuous when the outcomes are discrete or continuous.

Discrete Random Variables Continuous Random Variables

𝑝(𝑥) 𝑝(𝑥)

𝑥 𝑥
Examples: Poisson Distributed Examples: Normally Distributed
Binomially Distributed
Discrete Uniform Distribution
Properties: Area under graph is 1
Properties: σ 𝑝(𝑥) = 1 𝑝 𝑥 ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥
𝑝 𝑥 ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥
Probability Density Function (p.d.f.)
𝑓(𝑥)
𝐹𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝐷𝑒𝑛𝑠𝑖𝑡𝑦

𝑥 𝑥 (ℎ𝑒𝑖𝑔ℎ𝑡)
For continuous variables, it doesn’t In the Normal Distribution (a continuous
make sense to talk about the distribution), similarly, it doesn’t make sense
frequency of a specific value, e.g. to talk about the probability of a specific
no one will have an exact height of value.
1.7m. We would instead use 𝒇(𝒙) is known as the probability density
‘frequency density’. function (or p.d.f. for short).

we saw that for histograms, the Analogously to a histogram, we saw in


value of the frequency density is the area under the graph gives
not particularly useful in isolation. the probability.
But when we find the area under a Don’t confuse 𝑓(𝑥) with 𝑝(𝑥), which is probability in the usual sense,
bar, we get the frequency. and 𝐹(𝑥) which is the cumulative probability function.
Probability functions
A probability function P(X = x) for a DRV is an algebraic function giving
the probability of each value in the distribution taking place
Discrete Random Variable
 6x , x  1,2,3
P( X  x)   1 2 3
0, otherwise
6 6 6

You will be asked to find the value of a constant k that makes a


probability function valid, using the fact that Σ p (x )  1
 p x   1
Continuous Random Variable

1 +
, 1
x 1 ≤𝑥 ≤ 2
f (x )  2 3
0 otherwise
Probability Density Function (p.d.f.)
! If𝑋 is a continuous random variable with p.d.f. 𝑓 𝑥
then:
 𝑓 𝑥 ≥ 0 (we can’t have negative probabilities)
𝑏
 𝑃 𝑎 < 𝑋 < 𝑏 = 𝑎𝑟𝑒𝑎 𝑢𝑛𝑑𝑒𝑟 𝑔𝑟𝑎𝑝ℎ = ‫𝑥𝑑 𝑥 𝑓 𝑎׬‬

 ‫׬‬−∞ 𝑓(𝑥) 𝑑𝑥 = 1 (as total area under curve is 1)

The graph of y = f(x) never below the x – axis.

Note
 P(X = r) = 0
 P(a < X < b) = P(a ≤ X < b) = P(a < X ≤ b) = P(a ≤ X ≤ b)
Example
Sketch the following functions and decide whether they are valid pdfs.

x  2 0 x5  13 x 0 x3
(a) f  x   (b) f  x  
0 otherwise 0 otherwise

2 y

4 y
1.5

0.5
1

x
x
–1 1 2 3 4 5 6
–1 1 2 3 4

–1

–0.5

–2

–1
–3

–4
Calculation Rule
𝑏
P(a < 𝑥 < b) = ‫𝑎׬‬ 𝑓 𝑥 𝑑𝑥

P(𝑥 > 𝑎) = ‫𝑎׬‬ 𝑓 𝑥 𝑑𝑥
𝑎
P(𝑥 < 𝑎) = ‫׬‬−∞ 𝑓 𝑥 𝑑𝑥
To find integration
Definite Integral
𝑏
𝑏 𝑛 𝑥 𝑛+1
‫ 𝑥 𝑎׬‬dx = = 𝐼 𝑏 −𝐼 𝑎
𝑛+1 𝑎

𝑏
𝑏 𝑛 𝑎𝑥+𝑏 𝑛+1 1
‫𝑎׬‬ 𝑎𝑥 + 𝑏 = × =𝐼 𝑏 −𝐼 𝑎
𝑛+1 𝑎 𝑎
Example - 1: A continuous random variable X
has the probability density function given by
2
𝑥 1 ≤𝑥 ≤ 2
𝑓(𝑥) = 3
0 otherwise

(a) Show that 𝑓(𝑥) has the properties of a p.d.f

(a) Find 𝑃(1.5 ≤ 𝑥 ≤ 2)


2
a. (i) 𝑓(𝑥) ≥ 0 for all 𝑥 since 𝑥 > 0 for 𝑥 > 0
3
𝑏 22
(ii) ‫𝑓 𝑎׬‬ 𝑥 𝑑𝑥 = ‫׬‬1 3 𝑥 𝑑𝑥

𝑥2 2
=⅔ [ ]1
2
2
= ⅓ [𝑥2] 1

= ⅓ × (4 – 1)

=1
b. 𝑃(1.5 ≤ 𝑋 ≤ 2)

𝑥2 2
=⅔ [ ]1.5
2

2
=⅓ [𝑥2] 1.5

= ⅓ × (4 – 2.25)

= 0.583 (3d.p)
Example 2: The continues random variables X
has probability density function given by
2
𝑓 𝑥 = 𝑘𝑥 1 ≤ 𝑥 ≤ 4
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Where, 𝑘 is constant.
a) Find the value of 𝑘.
b) Draw a sketch of the probability density
function.
c) Calculate 𝑃(2.5 ≤ 𝑋 ≤ 3.5).
Solution:
a) Find the value of 𝑘.
Total area under the curve
𝑏 4
‫𝑓 𝑎׬‬ 𝑥 𝑑𝑥 = ‫׬‬1 𝑘𝑥 2 𝑑𝑥 =1
4
2
𝑘 න 𝑥 𝑑𝑥 = 1
1
𝑥3 4
𝑘 = 1
3 1

𝑘 4
3 = 1
𝑥
3 1
𝑘
3
43 − 13 = 1
21𝑘 = 1
1
𝑘= 21
b. Draw a sketch of the probability density
function
2 1 2
We have 𝑓 𝑥 = 𝑘𝑥 = 𝑥
21
𝒙 1 2 3 4
f 𝑥 1 4 9 16
21 21 21 21

2 y

1.5

0.5

–1 1 2 3 4

–0.5

–1
2 1 2
c) We have 𝑓 𝑥 = 𝑘𝑥 = 𝑥
21
3.5 1 2
𝑝 2.5 ≤ 𝑥 ≤ 3.5 = ‫׬‬2.5 𝑥 𝑑𝑥
21
3.5
1
= න 𝑥 2 𝑑𝑥
21 2.5
1 𝑥 3 3.5
=
21 3 2.5
1 3 3.5
= 𝑥 2.5
63
1
= 3.53 − 2.53
63
= 0.4325
= 0.433 (3 𝑠. 𝑓. )
Example 3

Solution
Example 4

Solution
Example 5
Solution
Median, Quartiles, Mean and Variance
For continuous random variable 𝑋 with p.d.f. defined by 𝑓 𝑥 for
( 𝑎 ≤ 𝑥 ≤ 𝑏).
 If ‘M’ is Median then,
𝑀 1
 P( 𝑋 ≤ 𝑀) = ‫𝑓 𝑎׬‬ 𝑥 𝑑𝑥 =
2
 If ‘Q1’ is Lower Quartile then,
𝑄 1
 P(X ≤ Q1) ‫ 𝑎׬‬1 𝑓 𝑥 𝑑𝑥 = 4
 If ‘Q3’ is Upper Quartile then,
𝑄3 3
 P(X ≤ Q3) = ‫𝑎׬‬ 𝑓 𝑥 𝑑𝑥 = 4
 If E(X) is Mean then,
𝑏
 Mean = E(X) = 𝜇 = ‫𝑎׬‬ 𝑥 𝑓 𝑥 𝑑𝑥
 If Var(X) is Variance
𝑏
 Variance = Var(X) = 𝜎 2 = ‫ 𝑥 𝑎׬‬2 𝑓 𝑥 𝑑𝑥 - 𝐸(𝑋) 2
Example – 1 The continues random variables X
has probability density function given by
1
𝑓 𝑥 = 8 𝑥 0 ≤ 𝑥 ≤ 4
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
a) Find the median of 𝑋.
b) Find the Interquartile Range
Continuous Uniform Distribution 1
 A continuous random variable where all values in a range are
equally likely is called a continuous uniform distribution.
 A sketch of the p.d.f is a rectangle, and so it is sometimes
known as a rectangular distribution. Because the area under
the p.d.f curve must equal 1, it has the following p.d.f:

 1
 a xb
f ( x)   b  a

0 otherwise
ab
EX  
2
 b  a
2

Var  X  
12
For Contionus Uniform (Triangular) Distirbution
The coordinate are (𝑎, 0) and (𝑏, 0)
1
Total Area of Tringular (A) = × 𝑏 × ℎ
2
1
1 = × (𝑏 − 𝑎) × ℎ
2
2
ℎ=
(𝑏−𝑎)
𝑦2 −𝑦1
To find slope of line 𝑙 (𝑚) =
𝑥2 −𝑥1
To find Equation of line 𝑙, 𝑦 − 𝑦1 = 𝑚(𝑥 − 𝑥1 ).
𝑚𝑥 + 𝑐 𝑎<𝑥<𝑏
𝑓 𝑥 =
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

You might also like