Slides 7 A
Slides 7 A
Chrysafis Vogiatzis
Lecture 7a
Random variables.
Discrete random variables.
Bernoulli, binomial, geometric;
Hypergeometric;
Poisson;
Uniform.
Random variables.
Discrete random variables.
Bernoulli, binomial, geometric;
Hypergeometric;
Poisson;
Uniform.
Random variables.
Discrete random variables.
Bernoulli, binomial, geometric;
Hypergeometric;
Poisson;
Uniform.
This lecture is divided into two smaller videos. This is the first one
focusing on continuous random variable fundamentals.
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
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
c a b c a b
c a b c a b
c a b c a b
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
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
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
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
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
1 1 1
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
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
1 1 1
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
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
1 1 1
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
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
1 1 1
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
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
1 1 1
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
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
1 1 1
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
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
1 1 1
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