Continuous Random Variables I
Continuous Random Variables I
Describing Continuous Random Variables Distributions of Random Variables That Are Part Discrete and Part Continuous
There are some quantities which cannot be described accurately by a discrete random variable; for example heights, weights, or times. To handle this, continuous Some random variables may take a combination of discrete and continuous values. For example, the waiting time for a bus to come may be measured precisely for
random variables can be used. Many properties of discrete random variables are shared with continuous random variables. However, there are also some the first 15 minutes (making this part continuous) and then in 5 minutes intervals after this (making this part discrete). These variables can be handled by separating
differences. For discrete random variables, a probability can be associated to obtaining an exact value. Continuous random variables take values within an interval; the different parts and using the relevant methods on each part. So, for calculating a probability, integrate between the two endpoints for the continuous part and
so instead, the probability of the continuous random variable lying within a specified interval is considered. The probabilities of discrete random variables can be sum between the two endpoints for the discrete part. This is demonstrated in the example below.
found using a probability mass function (pmf). Similarly, the probabilities of continuous random variables can be found using a probability density function (PDF).
The probability of a continuous random variable 𝑋 with PDF 𝑓(𝑥) lying in the interval 𝑎 < 𝑋 < 𝑏 is given by integrating the PDF between the two values: Example 2: Consider the mixed random variable 𝑋. It is continuous between 𝑥 = 0 and 𝑥 = 3, and takes the discrete values 𝑥 = 4,5,6,7,8.
1 1
Its distribution is defined as: 𝑓(𝑥) = 𝑥 3 for 0 ≤ 𝑥 ≤ 3 and 𝑃(𝑋 = 𝑥) = for 𝑥 = 4,5,6,7,8.
27 20
𝑏
Find 𝑃(2.5 < 𝑥 < 6).
𝑃(𝑎 < 𝑋 < 𝑏) = ∫ 𝑓(𝑥) 𝑑𝑥
𝑎
Notice that 𝑃(𝑎 < 𝑋 < 𝑏) = 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) for all continuous random variables in all intervals since the probability of 𝑋 being exactly 𝑎 or 𝑏 is zero, this can be Split into continuous and discrete parts. Observe for the discrete part the 𝑃(2.5 < 𝑥 < 6) = 𝑃(2.5 < 𝑥 < 3) + 𝑃(3 < 𝑥 < 6)
thought of as the “area” of a vertical line being exactly zero. only bits with non-zero probability are 𝑥 = 4 and 𝑥 = 5. = 𝑃(2.5 < 𝑥 < 3) + 𝑃(𝑥 = 4) + 𝑃(𝑥 = 5)
3
1 3 1 4 3 34 (2.5)4 671
Calculate the continuous part by integrating. 𝑃(2.5 < 𝑥 < 3) = ∫ 𝑥 𝑑𝑥 = [ 𝑥 ] = − =
There are two conditions for 𝑓(𝑥) to be a probability density function: 2.5 27 108 2.5 108 108 1728
∞ 1 1 1
• ∫−∞ 𝑓(𝑥) 𝑑𝑥 = 1 Calculate the discrete part by summing. 𝑃(𝑥 = 4) + 𝑃(𝑥 = 5) = + =
20 20 10
• 𝑓(𝑥) ≥ 0 for all 𝑥 671 1 4219
Add the continuous and discrete parts to obtain the total probability. 𝑃(2.5 < 𝑥 < 6) = + = = 0.488 (3 s. f. )
In words, this means the total probability over all cases must sum to 1 and that no probability can ever be negative. Notice that the limits of −∞ and ∞ express the 1728 10 8640
fact that the continuous random variable can take any real value, but in reality, they can be replaced with the lowest and highest value the continuous random
variable takes. Also observe that as long as the probability density functions still satisfy the two conditions, they can be defined piecewise. Median and Quartiles for a Given Probability Density Function
Example 1: Consider the probability density functions below.
The median 𝑚 of a random variable 𝑋 is the point at which there is an equal probability of 𝑋 lying on either side of 𝑚. If 𝑋 has the probability density function 𝑓(𝑥)
2 𝑘 2(𝑥−2)
then 𝑚 satisfies:
1<𝑥<5
a) 𝑓(𝑥) = {𝑘𝑥 1<𝑥<3 c) 𝑓(𝑥) = { 𝑘𝑒−2(𝑥−2) 𝑥≤2 𝑚
b) 𝑓(𝑥) = {𝑥3 1
0 otherwise 0 otherwise 𝑘𝑒 𝑥>2 ∫ 𝑓(𝑥) 𝑑𝑥 =
−∞ 2
Quartiles 𝑄1 and 𝑄3 can be defined similarly, so:
i) Solve for 𝑘. 𝑄1 𝑄3
1 3
∫ 𝑓(𝑥) 𝑑𝑥 = , ∫ 𝑓(𝑥) 𝑑𝑥 =
ii) Find 𝑃(1 < 𝑥 < 2.5) −∞ 4 −∞ 4
Sketch a graph of the probability density function with the quartiles and
median to check that the answers look reasonable.
https://bit.ly/pmt-cc
https://bit.ly/pmt-edu https://bit.ly/pmt-cc