0% found this document useful (0 votes)
3 views36 pages

Notes Chapter4 ContinuousRandomVariables

Chapter 4 discusses continuous random variables and their probability distributions, including key concepts such as probability density functions (pdf), cumulative distribution functions (cdf), expected value, and variance. It covers specific distributions like uniform, exponential, and normal distributions, detailing their properties and applications. The chapter also includes examples and exercises to illustrate the concepts.

Uploaded by

Alaba Okeola
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)
3 views36 pages

Notes Chapter4 ContinuousRandomVariables

Chapter 4 discusses continuous random variables and their probability distributions, including key concepts such as probability density functions (pdf), cumulative distribution functions (cdf), expected value, and variance. It covers specific distributions like uniform, exponential, and normal distributions, detailing their properties and applications. The chapter also includes examples and exercises to illustrate the concepts.

Uploaded by

Alaba Okeola
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/ 36

Chapter 4

Continuous Random Variables and


Probability Distributions

Chaoyue Liu
Department of Mathematics and Statistics

1
Outline
• Continuous Random Variables
• PDFs and CDFs of Continuous Random Variables
• Expected Value and Variance of Continuous Random
Variables

• Uniform Distribution
• Exponential Distribution

• Normal Distribution, Standardization and Z-table

2
Introduction to Continuous Random
Variables

Chaoyue Liu
Department of Mathematics and Statistics

3
Outline
• Introduction to Continuous Random Variables
• Probability Density Function (pdf)
• Cumulative Distribution Function (cdf)
• Expected Values and Variance

4
Continuous Random Variables
• Discrete Random Variables: countable values
• Continuous Random Variables: uncountable values

• A random variable X is continuous if:


- its set of possible values is an entire interval of numbers;
• Examples:
- The lifetime of a product
- The waiting time
- other measured data: length, height, weight etc…

5
Probability Density Function (pdf)
• Discrete: probability mass function (pmf)
• Continuous: probability density function (pdf)

• Let X be a continuous random variable. The probability density function (pdf) of X is a real valued function f (x) that
satisfies

- f (x) ≥ 0 for any x ∈ ℝ


b

∫a
For any two real numbers a ≤ b ∈ ℝ, P(a ≤ X ≤ b) = f (x)dx
-

∫−∞
-
f (x)dx = 1

Example:

6
Probability Density Function (pdf)
• pdf f(x) is not a probability
• The probability for a continuous random variable is given by areas under pdf,
b

∫a
P(a ≤ X ≤ b) = f(x)dx

• We only talk about the probability of a continuous rv taking the value in an


interval, not at a point.

• P(X = c) = 0 for any number c ∈ ℝ.


• Equal sign doesn’t matter to continuous rv:
b

∫a
P(a ≤ X ≤ b) = P(a < X < b) = P(a ≤ X < b) = P(a < X ≤ b) = f(x)dx

7
Cumulative Distribution Function
• Let X have pdf f(x), then the cdf F(x) is given by
x

∫−∞
F(x) = P(X ≤ x) = f(t)dt, for x ∈ℝ

- For x ∈ ℝ, F(x) is the area under the density curve to the left of x.
- F(X) is non-decreasing

- lim F(x) = 0 and lim F(x) = 1


x→−∞ x→∞

• Example:
pdf cdf

8
Relationship between PDF and CDF for
Continuous Random Variables
• cdf can be found by integrating the pdf:
x

∫−∞
F(x) = f(t)dt

• pdf can be found by differentiating the cdf:


d
f(x) = F′(x) = F(x)
dx
b

∫a
Compute probability: P(a ≤ X ≤ b) = f(x)dx = F(b) − F(a)

9
Example (pdf -> cdf)
• Given the pdf of X as below,

{ 0,
kx 2, 0 ≤ x ≤ 2
f(x) =
otherwise

1. Find the value of k

2. Find the cdf of X

3. What is the probability that X>1?


n+1
x

(hint: x ndx = + c)
n+1

10
Example (cdf -> pdf)
• Let X be a random variable with a cdf:
0, x≤0

[ ]
1 + ln ( x ) , 0 < x ≤ 4
x 4
F(x) = 4

1, 4<x

Find:

- (1) P(X ≤ 1)
- (2) P(1 ≤ X ≤ 3)
- (3) the pdf of X

11
Percentiles
• A percentile is a value below which a percentage of data falls. e.g. A
student’s test score is at the 85th percentile of the class means that 85% students
scores are lower than that score and 15% are above.

• Let p be a number between 0 and 1. The (100p)th percentile of the


distribution of a continuous rv X denoted by η(p), is defined by
η(p)

∫−∞
p = P(X ≤ η(p)) = F(η(p)) = f(u)du

• Special cases:

- Median ↔ 50th percentile.

- 1st Quantile ↔ 25th percentile.

- 3rd Quantile ↔ 75th percentile.

12
Example
• Let X be a continuous rv with the following pdf:

f(x) = 2x, 0 ≤ x ≤ 1
- Find

- (1) the 100p thpercentile of X


- (2) the median of X

13
Expected Value and Variance of
Continuous Random Variables
• The expected value or mean of a continuous rv X with pdf f(x) is

∫−∞
μ = E(X ) = xf(x)dx

• Let h(x) be a function of X, then


∫−∞
μh(X) = E(h(X )) = h(u)f(u)du

• The variance of X is

∫−∞
V(X ) = σX2 = σ 2 = E [(X − μ)2] = (x − μ)2 f(x)dx

• The standard deviation of X is σ = σ2


• Short-cut formula: σ
2
= E[(X − μ)2] = E (X 2) − μ 2

• Linear function of X:

- Mean: E[aX + b] = aE[X] + b Variance: V(aX + b) = a 2V(X )

14
Example
• Let X be a random variable with the following pdf
1

{0
x ∈ [0,1] ∪ [2,3]
f(x) = 2

otherwise

- (1) Check that f(x) is a legitimate pdf

- (2) Compute E(X) and V(X)

- (3) Compute P(0.5 ≤ X ≤ 1.5)

15
Discrete vs Continuous

Discrete Random Variables Continuous Random Variables

pmf : P(x) = P{X = x} pdf : f(x) = F′(x)

∑ ∫A
P{X ∈ A} = p(x) P{X ∈ A} = f(x)dx
x∈A

x
∑ ∫−∞
F(x) = P{X ≤ x} = p(y) F(x) = P{X ≤ x} = f(y)dy
y≤x

∑ ∫−∞
p(x) = 1 f(x)dx = 1
x



∫−∞
E(X ) = xp(x) E(X) = xf(x)dx
x

∫−∞
(x − μ)2 p(x) V(X) = (x − μ)2 f(x)dx

V(X) =
x

16
Uniform Distribution and Exponential
Distribution

Chaoyue Liu
Department of Mathematics and Statistics

17
Outline
• Uniform Distribution

• Exponential Distribution

18
Uniform Distribution
• A continuous random variable X is said to have a uniform distribution on the
interval [a, b], denoted by X ∼ uniform(a, b), if its pdf is
1

{ 0,
, a≤x≤b
f(x; a, b) = b−a
otherwise

b+a
- Mean: E(X) =
2
(b − a)2
- Variance: V(X) =
12
- The uniform distribution assigns equal probabilities to intervals of equal lengths

- For any real numbers c1, c2


∈ ℝ such that a ≤ c1 ≤ c2 ≤ b,
c2 − c1
P(c1 ≤ X ≤ c2) =
b−a

19
Exercise
• Check that f(x) for Uniform Distribution is a legitimate pdf.

• Derive the cdf of Uniform Distribution.

20
Exponential Distribution
• A random variable X follows an exponential distribution with (scale)
parameter λ > 0 , denoted by X ∼ Exp(λ), if the pdf of X is

{ 0
−λx
f(x) = λe x≥0
• otherwise

• If the number of Independent events occurring follows a Poisson distribution with rate
λ, then the distribution of waiting time between two consecutive events follows
exponential distribution with same parameter λ.

21
Properties of Exponential Distribution
• If X ∼ Exp(λ), then
1
- Mean: E(X) =
λ
1
- Variance: V(X) = 2
λ

{1 − e −λx x ≥ 0
0 x<0
cdf of X: F(x) =
-

- Memoryless Property, i.e. P(X > t + s | X > s) = P(X > t), for any
t, s ≥ 0. i.e. It "forgets" the time already spent.

22
Example
• Assume that buses arrive at a bus stop with rate α = 4 buses/hour. You
get off a bus and wait for the next bus to arrive.
- (1) What is the probability you wait between 15 to 30 minutes?
- (2) What is the 40th percentile of your waiting time
- (3) What is your expected waiting time?

23
Normal Distribution, Standardization
and Z-table

Chaoyue Liu
Department of Mathematics and Statistics

24
Outline
• Normal Distribution
• Standardization
• Z-table

25
Normal Distribution
• Normal distribution, also known as Gaussian distribution, is very important in
statistics, because it occurs naturally in many situations. e.g. height of the
population, IQ, measurement error…

• Normal distribution has a symmetric bell-shaped curve (most of values tend to


cluster around the mean, and the further a value is from the mean, the less likely it
is to occur)

26
Normal Distribution
• X follows a normal distribution with mean μ and variance σ 2 denoted by X ∼ N(μ, σ 2), if the pdf of
X is
1 − (x − μ)
2

f(x) = e 2σ 2 , −∞<x<∞
2πσ

where μ is a real number and σ 2 is a positive number

• N(μ, σ 2) is symmetric at μ
• Mean: E(X ) = μ, is a location parameter.
• Variance: V(X ) = σ 2, is a shape parameter. The larger the σ, the more the spread.

27
Standard Normal Distribution
• The normal distribution with μ = 0 and σ = 1 is called a standard normal
distribution.

2 X−μ
• If X ∼ N(μ, σ ), then the random variable Z = will follow the standard
σ
normal distribution Z ∼ N(0,1). Z is usually called Z value or Z score.

• The cdf of Z ∼ N(0,1), usually denoted by Φ(z) = P(Z ≤ z).


• Critical value zα , is a value such that P(Z ≥ zα) = α. zα is also the
100(1 − α)th percentile

e.g.
P(Z ≥ z0.05) = 0.05 ⟺ P(Z ≤ z0.05) = 1 − 0.05 = 0.95

so Z0.05 is also the 95th percentile of Z

28
Standardization
• Standardization:
2 X−μ
If X ∼ N(μ, σ ), then the random variable Z = ∼ N(0,1) , and the probability
σ
of X can be computed as

( σ σ )
a−μ b−μ
P(a ≤ X ≤ b) = P ≤Z≤

( σ ) ( σ )
b−μ a−μ
=Φ −Φ

• compute the cdf of normal distribution is hard in general


• any normal distribution can be converted to standard normal distribution
• one standard normal table (Z table) is only needed to find probabilities for
any normal random variables.

29
Z table
• Z tables are composed as follows:
1. The row label contains the integer part and the first decimal place of
Z.
2. The column lable contains the second decimal place of Z
3. The values within the table are the probabilities

Example:

P(Z ≤ −2.6 5 ) = 0.004


⏟⏟ ⏟
1 2 3

30
Examples
• given z value, find probability

e.g. what is the probability P(Z ≤ − 2.52) ?

• given probability, find z value


e.g. what is the 80th percentile of Z ?

⟺ Φ(z) = 0.8, what is the value of z ?

31
Examples
• Some useful rules for Z ∼ N(0,1)
- P(Z > a) = 1 − Φ(a) - P( | Z | > a) = 2Φ(−a), a > 0
- P(a < Z < b) = Φ(b) − Φ(a) - P( | Z | < a) = 2Φ(a) − 1,a > 0
• note that:
- | Z | ≥ a ⟺ Z ≤ − a or Z ≥ a - |Z| ≤ a ⟺ − a ≤ Z ≤ a

• given α, find the critical value zα


- equivalent to be given p, but here p =1−α

• given X ∼ N(μ, σ 2), find the probability of X


X−μ
- standardize X first: Z = ∼ N(0,1)
σ

( σ σ )
a−μ b−μ
P(a ≤ X ≤ b) = P ≤Z≤
then

( σ ) ( σ )
- b−μ a−μ
=Φ −Φ

32
Exercise
• Let Z be a standard normal random variable,
- 1) calculate P( | Z − 1 | ≤ 1.5)?

- 2) If P(0 ≤ Z ≤ c) = 0.291, what is the value of c?

- 3) determine zα for α = 0.2

33
Exercise
• Let X be the IQ of a randomly selected person. Assume X ∼ N(100,256). What is
the probability that a randomly selected person has an IQ
- above 140?

- between 92 and 114?

- Find the median of X.

34
Normal Approximation to the Binomial
Distribution
• If X
∼ Bin(n, p) with np ≥ 10 and n(1 − p) ≥ 10, then X has
approximately a normal distribution N(np, np(1 − p)),

( np(1 − p) )
x + 0.5 − np
P(X ≤ x) ≈ Φ

The term 0.5 is added as a correction term for using a continuous distribution to
approximate a discrete distribution

• Comparison:
- Poisson approximation to binomial: n is large and p is small. n > 50 and np < 5
- Normal approximation to binomial: not too skewed (enough symmetry). np ≥ 10
and n(1 − p) ≥ 10.

35
Exercise
• At a particular college, the pass rate of a course is 72%. If 500
students enroll in a semester, what is the probability that at most
375 students pass?

36

You might also like