Continuous Random Variables: Scott Sheffield
Continuous Random Variables: Scott Sheffield
600: Lecture 17
Continuous random variables
Scott Sheffield
MIT
Outline
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
Simple example
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
I What is P{X < 3/2}?
Simple example
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
Simple example
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
Simple example
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
I What is P{X (0, 1) (3/2, 5)}?
Simple example
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
I What is P{X (0, 1) (3/2, 5)}?
I What is F ?
Simple example
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
I What is P{X (0, 1) (3/2, 5)}?
I What is F ?
0
a0
I F (a) = FX (a) = a/2 0 < a < 2
1 a2
Simple example
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
I What is P{X (0, 1) (3/2, 5)}?
I What is F ?
0
a0
I F (a) = FX (a) = a/2 0 < a < 2
1 a2
(
1/2 x [0, 2]
I Suppose f (x) =
0 x6 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
I What is P{X (0, 1) (3/2, 5)}?
I What is F ?
0
a0
I F (a) = FX (a) = a/2 0 < a < 2
1 a2
(
x/2 x [0, 2]
I Suppose f (x) =
0 06 [0, 2].
Another example
(
x/2 x [0, 2]
I Suppose f (x) =
0 06 [0, 2].
I What is P{X < 3/2}?
Another example
(
x/2 x [0, 2]
I Suppose f (x) =
0 06 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
Another example
(
x/2 x [0, 2]
I Suppose f (x) =
0 06 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
Another example
(
x/2 x [0, 2]
I Suppose f (x) =
0 06 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
I What is F ?
Another example
(
x/2 x [0, 2]
I Suppose f (x) =
0 06 [0, 2].
I What is P{X < 3/2}?
I What is P{X = 3/2}?
I What is P{1/2 < X < 3/2}?
I What is F ?
0
a0
I FX (a) = a2 /4 0<a<2
1 a2
Outline
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) =
0 x 6 [0, 1].
Uniform random variables on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) =
0 x 6 [0, 1].
I Then for any 0 a b 1 we have P{X [a, b]} = b a.
Uniform random variables on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) =
0 x 6 [0, 1].
I Then for any 0 a b 1 we have P{X [a, b]} = b a.
I Intuition: all locations along the interval [0, 1] equally likely.
Uniform random variables on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) =
0 x 6 [0, 1].
I Then for any 0 a b 1 we have P{X [a, b]} = b a.
I Intuition: all locations along the interval [0, 1] equally likely.
I Say that X is a uniform random variable on [0, 1] or that X
is sampled uniformly from [0, 1].
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
I What is E [X ]?
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
I What is E [X ]?
I Guess 1/2 (since 1/2 is, you know, in the middle).
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
I What is E [X ]?
I Guess 1/2 (since 1/2 is, you know, in the middle).
2 1
R R1
I Indeed, f (x)xdx = 0 xdx = x2 = 1/2.
0
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
I What is E [X ]?
I Guess 1/2 (since 1/2 is, you know, in the middle).
2 1
R R1
I Indeed, f (x)xdx = 0 xdx = x2 = 1/2.
0
I What is the general moment E [X k ] for k 0?
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
I What is E [X ]?
I Guess 1/2 (since 1/2 is, you know, in the middle).
2 1
R R1
I Indeed, f (x)xdx = 0 xdx = x2 = 1/2.
0
I What is the general moment E [X k ] for k 0?
I Answer: 1/(k + 1).
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
I What is E [X ]?
I Guess 1/2 (since 1/2 is, you know, in the middle).
2 1
R R1
I Indeed, f (x)xdx = 0 xdx = x2 = 1/2.
0
I What is the general moment E [X k ] for k 0?
I Answer: 1/(k + 1).
I What would you guess the variance is? Expected square of
distance from 1/2?
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
I What is E [X ]?
I Guess 1/2 (since 1/2 is, you know, in the middle).
2 1
R R1
I Indeed, f (x)xdx = 0 xdx = x2 = 1/2.
0
I What is the general moment E [X k ] for k 0?
I Answer: 1/(k + 1).
I What would you guess the variance is? Expected square of
distance from 1/2?
I Its obviously less than 1/4, but how much less?
Properties of uniform random variable on [0, 1]
I Suppose X is a random
( variable with probability density
1 x [0, 1]
function f (x) = which implies
0 x 6 [0, 1],
0
a<0
FX (a) = a a [0, 1] .
1 a>1
I What is E [X ]?
I Guess 1/2 (since 1/2 is, you know, in the middle).
2 1
R R1
I Indeed, f (x)xdx = 0 xdx = x2 = 1/2.
0
I What is the general moment E [X k ] for k 0?
I Answer: 1/(k + 1).
I What would you guess the variance is? Expected square of
distance from 1/2?
I Its obviously less than 1/4, but how much less?
I VarE [X 2 ] E [X ]2 = 1/3 1/4 = 1/12.
Outline
I Suppose X is a random
( variable with probability density
1
x [, ]
function f (x) =
0 x 6 [, ].
Uniform random variables on [, ]
I Suppose X is a random
( variable with probability density
1
x [, ]
function f (x) =
0 x 6 [, ].
I What is E [X ]?
Uniform random variables on [, ]
I Suppose X is a random
( variable with probability density
1
x [, ]
function f (x) =
0 x 6 [, ].
I What is E [X ]?
+
I Intuitively, wed guess the midpoint 2 .
Uniform random variables on [, ]
I Suppose X is a random
( variable with probability density
1
x [, ]
function f (x) =
0 x 6 [, ].
I What is E [X ]?
+
I Intuitively, wed guess the midpoint 2 .
I Whats the cleanest way to prove this?
Uniform random variables on [, ]
I Suppose X is a random
( variable with probability density
1
x [, ]
function f (x) =
0 x 6 [, ].
I What is E [X ]?
+
I Intuitively, wed guess the midpoint 2 .
I Whats the cleanest way to prove this?
I One approach: let Y be uniform on [0, 1] and try to show that
X = ( )Y + is uniform on [, ].
Uniform random variables on [, ]
I Suppose X is a random
( variable with probability density
1
x [, ]
function f (x) =
0 x 6 [, ].
I What is E [X ]?
+
I Intuitively, wed guess the midpoint 2 .
I Whats the cleanest way to prove this?
I One approach: let Y be uniform on [0, 1] and try to show that
X = ( )Y + is uniform on [, ].
I Then expectation linearity gives
+
E [X ] = ( )E [Y ] + = (1/2)( ) + = 2 .
Uniform random variables on [, ]
I Suppose X is a random
( variable with probability density
1
x [, ]
function f (x) =
0 x 6 [, ].
I What is E [X ]?
+
I Intuitively, wed guess the midpoint 2 .
I Whats the cleanest way to prove this?
I One approach: let Y be uniform on [0, 1] and try to show that
X = ( )Y + is uniform on [, ].
I Then expectation linearity gives
+
E [X ] = ( )E [Y ] + = (1/2)( ) + = 2 .
I Using similar logic, what is the variance Var[X ]?
Uniform random variables on [, ]
I Suppose X is a random
( variable with probability density
1
x [, ]
function f (x) =
0 x 6 [, ].
I What is E [X ]?
+
I Intuitively, wed guess the midpoint 2 .
I Whats the cleanest way to prove this?
I One approach: let Y be uniform on [0, 1] and try to show that
X = ( )Y + is uniform on [, ].
I Then expectation linearity gives
+
E [X ] = ( )E [Y ] + = (1/2)( ) + = 2 .
I Using similar logic, what is the variance Var[X ]?
I Answer: Var[X ] = Var[( )Y + ] = Var[( )Y ] =
( )2 Var[Y ] = ( )2 /12.
Outline
I One of the
( very simplest probability density functions is
1 x [0, 1]
f (x) = .
0 0 6 [0, 1].
Uniform measure: is probability defined for all subsets?
I One of the
( very simplest probability density functions is
1 x [0, 1]
f (x) = .
0 0 6 [0, 1].
I If B [0, 1] is an interval, then P{X B} is the length of
that interval.
Uniform measure: is probability defined for all subsets?
I One of the
( very simplest probability density functions is
1 x [0, 1]
f (x) = .
0 0 6 [0, 1].
I If B [0, 1] is an interval, then P{X B} is the length of
that interval.
R R
I Generally, if B [0, 1] then P{X B} = B 1dx = 1B (x)dx
is the total volume or total length of the set B.
Uniform measure: is probability defined for all subsets?
I One of the
( very simplest probability density functions is
1 x [0, 1]
f (x) = .
0 0 6 [0, 1].
I If B [0, 1] is an interval, then P{X B} is the length of
that interval.
R R
I Generally, if B [0, 1] then P{X B} = B 1dx = 1B (x)dx
is the total volume or total length of the set B.
I What if B is the set of all rational numbers?
Uniform measure: is probability defined for all subsets?
I One of the
( very simplest probability density functions is
1 x [0, 1]
f (x) = .
0 0 6 [0, 1].
I If B [0, 1] is an interval, then P{X B} is the length of
that interval.
R R
I Generally, if B [0, 1] then P{X B} = B 1dx = 1B (x)dx
is the total volume or total length of the set B.
I What if B is the set of all rational numbers?
I How do we mathematically define the volume of an arbitrary
set B?
Idea behind parodox
I Hypothetical: Consider the interval [0, 1) with the two
endpoints glued together (so it looks like a circle). What if we
could partition [0, 1) into a countably infinite collection of
disjoint sets that all looked the same (up to a rotation of the
circle) and thus had to have the same probability?
Idea behind parodox
I Hypothetical: Consider the interval [0, 1) with the two
endpoints glued together (so it looks like a circle). What if we
could partition [0, 1) into a countably infinite collection of
disjoint sets that all looked the same (up to a rotation of the
circle) and thus had to have the same probability?
I If that probability was zero, then (by countable additivity)
probability of whole circle would be zero, a contradiction.
Idea behind parodox
I Hypothetical: Consider the interval [0, 1) with the two
endpoints glued together (so it looks like a circle). What if we
could partition [0, 1) into a countably infinite collection of
disjoint sets that all looked the same (up to a rotation of the
circle) and thus had to have the same probability?
I If that probability was zero, then (by countable additivity)
probability of whole circle would be zero, a contradiction.
I But if that probability were a number greater than zero the
probability of whole circle would be infinite, also a
contradiction...
Idea behind parodox
I Hypothetical: Consider the interval [0, 1) with the two
endpoints glued together (so it looks like a circle). What if we
could partition [0, 1) into a countably infinite collection of
disjoint sets that all looked the same (up to a rotation of the
circle) and thus had to have the same probability?
I If that probability was zero, then (by countable additivity)
probability of whole circle would be zero, a contradiction.
I But if that probability were a number greater than zero the
probability of whole circle would be infinite, also a
contradiction...
I Related problem: if (in a non-atomic world, where mass was
infinitely divisible) you could cut a cake into countably
infinitely many pieces all of the same weight, how much would
each piece weigh?
Idea behind parodox
I Hypothetical: Consider the interval [0, 1) with the two
endpoints glued together (so it looks like a circle). What if we
could partition [0, 1) into a countably infinite collection of
disjoint sets that all looked the same (up to a rotation of the
circle) and thus had to have the same probability?
I If that probability was zero, then (by countable additivity)
probability of whole circle would be zero, a contradiction.
I But if that probability were a number greater than zero the
probability of whole circle would be infinite, also a
contradiction...
I Related problem: if (in a non-atomic world, where mass was
infinitely divisible) you could cut a cake into countably
infinitely many pieces all of the same weight, how much would
each piece weigh?
I Question: Is it really possible to partition [0, 1) into
countably many identical (up to rotation) pieces?
Cutting things into identical slices: a warmup problem