Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
19 views26 pages

Slides 7 A

Probability
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)
19 views26 pages

Slides 7 A

Probability
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/ 26

Continuous random variables

Chrysafis Vogiatzis

Department of Industrial and Enterprise Systems Engineering


University of Illinois at Urbana-Champaign

Lecture 7a

©Chrysafis Vogiatzis. Do not distribute without permission of the author

1/7 Chrysafis Vogiatzis Continuous random variables


Last time..

Random variables.
Discrete random variables.
Bernoulli, binomial, geometric;
Hypergeometric;
Poisson;
Uniform.

2/7 Chrysafis Vogiatzis Continuous random variables


Last time..

Random variables.
Discrete random variables.
Bernoulli, binomial, geometric;
Hypergeometric;
Poisson;
Uniform.

Today, we will introduce and study continuous random variables: we


will also see the exponential distribution.

2/7 Chrysafis Vogiatzis Continuous random variables


Last time..

Random variables.
Discrete random variables.
Bernoulli, binomial, geometric;
Hypergeometric;
Poisson;
Uniform.

Today, we will introduce and study continuous random variables: we


will also see the exponential distribution.

This lecture is divided into two smaller videos. This is the first one
focusing on continuous random variable fundamentals.

2/7 Chrysafis Vogiatzis Continuous random variables


Continuous random variables

Definition
A random variable is continuous if it can take uncountably many
values such that there exists some function f (x) called a probability
density function defined over real values (−∞, +∞) such that:
f (x) ≥ 0.
+∞R
f (x)dx = 1.
−∞
R
P (X ∈ B) = f (x)dx
B

Example
What is the probability that random variable X with pdf f (x) is
between 0 and 10?
R10
Answer: P (0 ≤ X ≤ 10) = f (x)dx.
0

3/7 Chrysafis Vogiatzis Continuous random variables


Continuous random variables

Definition
A random variable is continuous if it can take uncountably many
values such that there exists some function f (x) called a probability
density function defined over real values (−∞, +∞) such that:
f (x) ≥ 0.
+∞R
f (x)dx = 1.
−∞
R
P (X ∈ B) = f (x)dx
B

Example
What is the probability that random variable X with pdf f (x) is
between 0 and 10?
R10
Answer: P (0 ≤ X ≤ 10) = f (x)dx.
0

3/7 Chrysafis Vogiatzis Continuous random variables


Continuous random variable functions
pdf: f (x): relative likelihood that random variable X is equal to some
value x.
1 f (x) = 0 implies that value x cannot happen.
2 fR(x) ≥ 0.
+∞
3 −∞
f (x)dx = 1.
Rx
cdf: F (x) = P(X ≤ x) = −∞ f (y )dy : the probability that random
variable X is up to some value x.
1 0 ≤ F (x) ≤ 1.
2 If x ≤ y , then F (x) ≤ F (y ) and also P(a ≤ X ≤ b) = F (b) − F (a).
3 By definition f (x) = F 0 (x).

c a b c a b

4/7 Chrysafis Vogiatzis Continuous random variables


Continuous random variable functions
pdf: f (x): relative likelihood that random variable X is equal to some
value x.
1 f (x) = 0 implies that value x cannot happen.
2 fR(x) ≥ 0.
+∞
3 −∞
f (x)dx = 1.
Rx
cdf: F (x) = P(X ≤ x) = −∞ f (y )dy : the probability that random
variable X is up to some value x.
1 0 ≤ F (x) ≤ 1.
2 If x ≤ y , then F (x) ≤ F (y ) and also P(a ≤ X ≤ b) = F (b) − F (a).
3 By definition f (x) = F 0 (x).

c a b c a b

4/7 Chrysafis Vogiatzis Continuous random variables


Continuous random variable functions
pdf: f (x): relative likelihood that random variable X is equal to some
value x.
1 f (x) = 0 implies that value x cannot happen.
2 fR(x) ≥ 0.
+∞
3 −∞
f (x)dx = 1.
Rx
cdf: F (x) = P(X ≤ x) = −∞ f (y )dy : the probability that random
variable X is up to some value x.
1 0 ≤ F (x) ≤ 1.
2 If x ≤ y , then F (x) ≤ F (y ) and also P(a ≤ X ≤ b) = F (b) − F (a).
3 By definition f (x) = F 0 (x).

c a b c a b

4/7 Chrysafis Vogiatzis Continuous random variables


The probability density function: a small example

Example
Assume that X is a continuous random variable with pdf
f (x) = c · (1 + 0.1 · x), for values of x such that −1 ≤ x ≤ 1. For which value
of c is this a valid pdf?

Answer: First, we observe whether f (x) ≥ 0 for all values that x can take.
The smallest value that x can take is −1, at which point we have
f (−1) = 0.9 · c. This is non-negative if c ≥ 0.
R +∞
Secondly, we know that −∞ f (x)dx = 1. Using this we get:
Z +∞ Z +∞
f (x)dx = 1 =⇒ c · (1 + 0.1 · x)dx = 1 =⇒
−∞ −∞
1
0.1 · x 2 1
=⇒ cx|1−1 + c = 1 =⇒ 2c = 1 =⇒ c =
2 −1 2

5/7 Chrysafis Vogiatzis Continuous random variables


The probability density function: a small example

Example
Assume that X is a continuous random variable with pdf
f (x) = c · (1 + 0.1 · x), for values of x such that −1 ≤ x ≤ 1. For which value
of c is this a valid pdf?

Answer: First, we observe whether f (x) ≥ 0 for all values that x can take.
The smallest value that x can take is −1, at which point we have
f (−1) = 0.9 · c. This is non-negative if c ≥ 0.
R +∞
Secondly, we know that −∞ f (x)dx = 1. Using this we get:
Z +∞ Z +∞
f (x)dx = 1 =⇒ c · (1 + 0.1 · x)dx = 1 =⇒
−∞ −∞
1
0.1 · x 2 1
=⇒ cx|1−1 + c = 1 =⇒ 2c = 1 =⇒ c =
2 −1 2

5/7 Chrysafis Vogiatzis Continuous random variables


The probability density function: a small example

Example
Assume that X is a continuous random variable with pdf
f (x) = c · (1 + 0.1 · x), for values of x such that −1 ≤ x ≤ 1. For which value
of c is this a valid pdf?

Answer: First, we observe whether f (x) ≥ 0 for all values that x can take.
The smallest value that x can take is −1, at which point we have
f (−1) = 0.9 · c. This is non-negative if c ≥ 0.
R +∞
Secondly, we know that −∞ f (x)dx = 1. Using this we get:
Z +∞ Z +∞
f (x)dx = 1 =⇒ c · (1 + 0.1 · x)dx = 1 =⇒
−∞ −∞
1
0.1 · x 2 1
=⇒ cx|1−1 + c = 1 =⇒ 2c = 1 =⇒ c =
2 −1 2

5/7 Chrysafis Vogiatzis Continuous random variables


The probability density function: a small example

Example
Assume that X is a continuous random variable with pdf
f (x) = c · (1 + 0.1 · x), for values of x such that −1 ≤ x ≤ 1. For which value
of c is this a valid pdf?

Answer: First, we observe whether f (x) ≥ 0 for all values that x can take.
The smallest value that x can take is −1, at which point we have
f (−1) = 0.9 · c. This is non-negative if c ≥ 0.
R +∞
Secondly, we know that −∞ f (x)dx = 1. Using this we get:
Z +∞ Z +∞
f (x)dx = 1 =⇒ c · (1 + 0.1 · x)dx = 1 =⇒
−∞ −∞
1
0.1 · x 2 1
=⇒ cx|1−1 + c = 1 =⇒ 2c = 1 =⇒ c =
2 −1 2

5/7 Chrysafis Vogiatzis Continuous random variables


The cumulative density function: a small example
Example
For the previous random variable X , with pdf
f (x) = 0.5 · (1 + 0.1 · x), −1 ≤ x ≤ 1, what is the cumulative distribution
function? With that in hand, what is the probability that:
a) X ≤ 0? b) X = 0? c) −0.1 ≤ X ≤ 0.1?
Rx
Answer: By definition, F (x) = −1 f (y )dy :
Z x Z x
x2
F (x) = f (y )dy = 0.5 · (1 + 0.1 · y )dy = 0.5 · x + 0.05 · + 0.475.
−1 −1 2
For the probability questions now:
1 Two ways to calculate this:
P(X ≤ 0) = F (0) = 0.475.
R0 R0
P(X ≤ 0) = −1 f (x)dx = −1 0.5 · (1 + 0.1 · x)dx = 0.475.
0 R
2 Trick question: it is zero! 0 f (x)dx = 0, or F (0) − F (0) = 0.
3 Again two ways:
P(−0.1 ≤ X ≤ 0.1) = F (0.1) − F (−0.1) = 0.1.
R 0.1 R 0.1
P(X ≤ 0) = −0.1 f (x)dx = −0.1 0.5 · (1 + 0.1 · x)dx = 0.1.
6/7 Chrysafis Vogiatzis Continuous random variables
The cumulative density function: a small example
Example
For the previous random variable X , with pdf
f (x) = 0.5 · (1 + 0.1 · x), −1 ≤ x ≤ 1, what is the cumulative distribution
function? With that in hand, what is the probability that:
a) X ≤ 0? b) X = 0? c) −0.1 ≤ X ≤ 0.1?
Rx
Answer: By definition, F (x) = −1 f (y )dy :
Z x Z x
x2
F (x) = f (y )dy = 0.5 · (1 + 0.1 · y )dy = 0.5 · x + 0.05 · + 0.475.
−1 −1 2
For the probability questions now:
1 Two ways to calculate this:
P(X ≤ 0) = F (0) = 0.475.
R0 R0
P(X ≤ 0) = −1 f (x)dx = −1 0.5 · (1 + 0.1 · x)dx = 0.475.
0 R
2 Trick question: it is zero! 0 f (x)dx = 0, or F (0) − F (0) = 0.
3 Again two ways:
P(−0.1 ≤ X ≤ 0.1) = F (0.1) − F (−0.1) = 0.1.
R 0.1 R 0.1
P(X ≤ 0) = −0.1 f (x)dx = −0.1 0.5 · (1 + 0.1 · x)dx = 0.1.
6/7 Chrysafis Vogiatzis Continuous random variables
The cumulative density function: a small example
Example
For the previous random variable X , with pdf
f (x) = 0.5 · (1 + 0.1 · x), −1 ≤ x ≤ 1, what is the cumulative distribution
function? With that in hand, what is the probability that:
a) X ≤ 0? b) X = 0? c) −0.1 ≤ X ≤ 0.1?
Rx
Answer: By definition, F (x) = −1 f (y )dy :
Z x Z x
x2
F (x) = f (y )dy = 0.5 · (1 + 0.1 · y )dy = 0.5 · x + 0.05 · + 0.475.
−1 −1 2
For the probability questions now:
1 Two ways to calculate this:
P(X ≤ 0) = F (0) = 0.475.
R0 R0
P(X ≤ 0) = −1 f (x)dx = −1 0.5 · (1 + 0.1 · x)dx = 0.475.
0 R
2 Trick question: it is zero! 0 f (x)dx = 0, or F (0) − F (0) = 0.
3 Again two ways:
P(−0.1 ≤ X ≤ 0.1) = F (0.1) − F (−0.1) = 0.1.
R 0.1 R 0.1
P(X ≤ 0) = −0.1 f (x)dx = −0.1 0.5 · (1 + 0.1 · x)dx = 0.1.
6/7 Chrysafis Vogiatzis Continuous random variables
The cumulative density function: a small example
Example
For the previous random variable X , with pdf
f (x) = 0.5 · (1 + 0.1 · x), −1 ≤ x ≤ 1, what is the cumulative distribution
function? With that in hand, what is the probability that:
a) X ≤ 0? b) X = 0? c) −0.1 ≤ X ≤ 0.1?
Rx
Answer: By definition, F (x) = −1 f (y )dy :
Z x Z x
x2
F (x) = f (y )dy = 0.5 · (1 + 0.1 · y )dy = 0.5 · x + 0.05 · + 0.475.
−1 −1 2
For the probability questions now:
1 Two ways to calculate this:
P(X ≤ 0) = F (0) = 0.475.
R0 R0
P(X ≤ 0) = −1 f (x)dx = −1 0.5 · (1 + 0.1 · x)dx = 0.475.
0 R
2 Trick question: it is zero! 0 f (x)dx = 0, or F (0) − F (0) = 0.
3 Again two ways:
P(−0.1 ≤ X ≤ 0.1) = F (0.1) − F (−0.1) = 0.1.
R 0.1 R 0.1
P(X ≤ 0) = −0.1 f (x)dx = −0.1 0.5 · (1 + 0.1 · x)dx = 0.1.
6/7 Chrysafis Vogiatzis Continuous random variables
The cumulative density function: a small example
Example
For the previous random variable X , with pdf
f (x) = 0.5 · (1 + 0.1 · x), −1 ≤ x ≤ 1, what is the cumulative distribution
function? With that in hand, what is the probability that:
a) X ≤ 0? b) X = 0? c) −0.1 ≤ X ≤ 0.1?
Rx
Answer: By definition, F (x) = −1 f (y )dy :
Z x Z x
x2
F (x) = f (y )dy = 0.5 · (1 + 0.1 · y )dy = 0.5 · x + 0.05 · + 0.475.
−1 −1 2
For the probability questions now:
1 Two ways to calculate this:
P(X ≤ 0) = F (0) = 0.475.
R0 R0
P(X ≤ 0) = −1 f (x)dx = −1 0.5 · (1 + 0.1 · x)dx = 0.475.
0 R
2 Trick question: it is zero! 0 f (x)dx = 0, or F (0) − F (0) = 0.
3 Again two ways:
P(−0.1 ≤ X ≤ 0.1) = F (0.1) − F (−0.1) = 0.1.
R 0.1 R 0.1
P(X ≤ 0) = −0.1 f (x)dx = −0.1 0.5 · (1 + 0.1 · x)dx = 0.1.
6/7 Chrysafis Vogiatzis Continuous random variables
The cumulative density function: a small example
Example
For the previous random variable X , with pdf
f (x) = 0.5 · (1 + 0.1 · x), −1 ≤ x ≤ 1, what is the cumulative distribution
function? With that in hand, what is the probability that:
a) X ≤ 0? b) X = 0? c) −0.1 ≤ X ≤ 0.1?
Rx
Answer: By definition, F (x) = −1 f (y )dy :
Z x Z x
x2
F (x) = f (y )dy = 0.5 · (1 + 0.1 · y )dy = 0.5 · x + 0.05 · + 0.475.
−1 −1 2
For the probability questions now:
1 Two ways to calculate this:
P(X ≤ 0) = F (0) = 0.475.
R0 R0
P(X ≤ 0) = −1 f (x)dx = −1 0.5 · (1 + 0.1 · x)dx = 0.475.
0 R
2 Trick question: it is zero! 0 f (x)dx = 0, or F (0) − F (0) = 0.
3 Again two ways:
P(−0.1 ≤ X ≤ 0.1) = F (0.1) − F (−0.1) = 0.1.
R 0.1 R 0.1
P(X ≤ 0) = −0.1 f (x)dx = −0.1 0.5 · (1 + 0.1 · x)dx = 0.1.
6/7 Chrysafis Vogiatzis Continuous random variables
Let’s play: cdf or not?

2 1.2
1.2

1
1
1.5
0.8
0.8

F (x)
F (x)
F (x)

0.6 1 0.6

0.4 0.4
0.5
0.2 0.2

x x x
0 0 0
2 4 6 8 10 1 2 3 4 −4 −2 0 2 4

No. F (x) has to be non-decreasing. No. F (x) has to be ≤ 1. Yes.


1.2 1.2

1 1 1

0.5 0.8 0.8


x

Ff (x)
F (x)

0 0.6 0.6
F (x)

−2 0 2 4
−0.5 0.4 0.4

−1 0.2 0.2

x x
−1.5 0 0
2 4 6 8 10 −5 0 5 10

No. F (x) has to be ≥ 0. Yes. Yes.

7/7 Chrysafis Vogiatzis Continuous random variables


Let’s play: cdf or not?

2 1.2
1.2

1
1
1.5
0.8
0.8

F (x)
F (x)
F (x)

0.6 1 0.6

0.4 0.4
0.5
0.2 0.2

x x x
0 0 0
2 4 6 8 10 1 2 3 4 −4 −2 0 2 4

No. F (x) has to be non-decreasing. No. F (x) has to be ≤ 1. Yes.


1.2 1.2

1 1 1

0.5 0.8 0.8


x

Ff (x)
F (x)

0 0.6 0.6
F (x)

−2 0 2 4
−0.5 0.4 0.4

−1 0.2 0.2

x x
−1.5 0 0
2 4 6 8 10 −5 0 5 10

No. F (x) has to be ≥ 0. Yes. Yes.

7/7 Chrysafis Vogiatzis Continuous random variables


Let’s play: cdf or not?

2 1.2
1.2

1
1
1.5
0.8
0.8

F (x)
F (x)
F (x)

0.6 1 0.6

0.4 0.4
0.5
0.2 0.2

x x x
0 0 0
2 4 6 8 10 1 2 3 4 −4 −2 0 2 4

No. F (x) has to be non-decreasing. No. F (x) has to be ≤ 1. Yes.


1.2 1.2

1 1 1

0.5 0.8 0.8


x

Ff (x)
F (x)

0 0.6 0.6
F (x)

−2 0 2 4
−0.5 0.4 0.4

−1 0.2 0.2

x x
−1.5 0 0
2 4 6 8 10 −5 0 5 10

No. F (x) has to be ≥ 0. Yes. Yes.

7/7 Chrysafis Vogiatzis Continuous random variables


Let’s play: cdf or not?

2 1.2
1.2

1
1
1.5
0.8
0.8

F (x)
F (x)
F (x)

0.6 1 0.6

0.4 0.4
0.5
0.2 0.2

x x x
0 0 0
2 4 6 8 10 1 2 3 4 −4 −2 0 2 4

No. F (x) has to be non-decreasing. No. F (x) has to be ≤ 1. Yes.


1.2 1.2

1 1 1

0.5 0.8 0.8


x

Ff (x)
F (x)

0 0.6 0.6
F (x)

−2 0 2 4
−0.5 0.4 0.4

−1 0.2 0.2

x x
−1.5 0 0
2 4 6 8 10 −5 0 5 10

No. F (x) has to be ≥ 0. Yes. Yes.

7/7 Chrysafis Vogiatzis Continuous random variables


Let’s play: cdf or not?

2 1.2
1.2

1
1
1.5
0.8
0.8

F (x)
F (x)
F (x)

0.6 1 0.6

0.4 0.4
0.5
0.2 0.2

x x x
0 0 0
2 4 6 8 10 1 2 3 4 −4 −2 0 2 4

No. F (x) has to be non-decreasing. No. F (x) has to be ≤ 1. Yes.


1.2 1.2

1 1 1

0.5 0.8 0.8


x

Ff (x)
F (x)

0 0.6 0.6
F (x)

−2 0 2 4
−0.5 0.4 0.4

−1 0.2 0.2

x x
−1.5 0 0
2 4 6 8 10 −5 0 5 10

No. F (x) has to be ≥ 0. Yes. Yes.

7/7 Chrysafis Vogiatzis Continuous random variables


Let’s play: cdf or not?

2 1.2
1.2

1
1
1.5
0.8
0.8

F (x)
F (x)
F (x)

0.6 1 0.6

0.4 0.4
0.5
0.2 0.2

x x x
0 0 0
2 4 6 8 10 1 2 3 4 −4 −2 0 2 4

No. F (x) has to be non-decreasing. No. F (x) has to be ≤ 1. Yes.


1.2 1.2

1 1 1

0.5 0.8 0.8


x

Ff (x)
F (x)

0 0.6 0.6
F (x)

−2 0 2 4
−0.5 0.4 0.4

−1 0.2 0.2

x x
−1.5 0 0
2 4 6 8 10 −5 0 5 10

No. F (x) has to be ≥ 0. Yes. Yes.

7/7 Chrysafis Vogiatzis Continuous random variables


Let’s play: cdf or not?

2 1.2
1.2

1
1
1.5
0.8
0.8

F (x)
F (x)
F (x)

0.6 1 0.6

0.4 0.4
0.5
0.2 0.2

x x x
0 0 0
2 4 6 8 10 1 2 3 4 −4 −2 0 2 4

No. F (x) has to be non-decreasing. No. F (x) has to be ≤ 1. Yes.


1.2 1.2

1 1 1

0.5 0.8 0.8


x

Ff (x)
F (x)

0 0.6 0.6
F (x)

−2 0 2 4
−0.5 0.4 0.4

−1 0.2 0.2

x x
−1.5 0 0
2 4 6 8 10 −5 0 5 10

No. F (x) has to be ≥ 0. Yes. Yes.

7/7 Chrysafis Vogiatzis Continuous random variables

You might also like