Download Week 11:Continuous random variables.

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Karhunen–Loève theorem wikipedia , lookup

Continuous function wikipedia , lookup

Tweedie distribution wikipedia , lookup

Non-standard calculus wikipedia , lookup

Law of large numbers wikipedia , lookup

Expected value wikipedia , lookup

Transcript
Continuous Random Variables
Arthur White∗
7th December 2016
A random variable X is said to be continuous if its behaviour is described by a continuous
probability density function (PDF), f . In particular,
Z
P(X ∈ A) =
f (x)dx.
A
Note that from this definition, it necessarily follows that P(X = x) = 0, for all x. For a
continuous random variable, it does not make meaningful sense to consider the probability
of observing an exact value to infinite precision.
R∞
For f (x) to be a valid PDF, it is required that f (x) ≥ 0 for all x, and that −∞ f (x)dx = 1.
Rx
We are often interested in P(X ≤ x) = −∞ f (t)dt = F (x). We call F the cumulative density
d
F (x).
function (CDF). Note that it then immediately follows that f (x) = dx
Expectation and Variance
R∞
For continuous distributions, the expected value of X is given as: E[X] = −∞ xf (x)dx.
This is more or less the same as the definition as for a discrete random variable that we saw
before, except that the summation had been replaced by an integral. As before, Var[X] =
E[(X − µ)2 ] = E[X 2 ] − E[X]2 .
Uniform Distribution
We say that a random variable X ∼ U(a, b) follows a uniform distribution on the interval
[a, b] if
1
a≤x≤b
b−a
f (x) =
0
otherwise.
It is straightforward to show that
Z ∞
Z
f (x)dx =
−∞
∗
a
b
1
dx = 1,
b−a
Based extensively on material previously taught by Eamonn Mullins.
1
and
Z
x
F (x) =
a
1
x−a
dt =
.
b−a
b−a
It can also be shown that
E[X] =
and
Var[X] =
b+a
,
2
(b − a)2
.
12
This is left as an exercise.
Example
Suppose that X ∼ U(0, 10). What is P(X ≤ 3)? What is P(3 ≤ X ≤ 8)?
Using the CDF F (x), we see that P(X ≤ 3) = F (3) = 3/10. Similarly, P(3 ≤ X ≤ 8) =
P(X ≤ 8) − P(≤ 3) = F (8) − F (3) = 8/10 − 3/10 = 1/2.
Monte Carlo integration
Unlike the normal distribution, it is unusual for a uniform distribution to be chosen to model
the behaviour of real life applications. Nonetheless, it has several useful properties that mean
it is regularly used to perform calculations. In particular, it is often used to perform Monte
Carlo (named after the casino in Monaco) simulations. In what follows we will assume that
we can generate y1 , . . . , yn ∼ U(0, 1).
Integral estimation
Suppose that we wish to estimate an integral
Z 1
g(x)dx,
I=
0
but that g(x) has a complicated form, making the integral intractable to compute exactly.
Let Y ∼ U(0, 1). Then f (y) = 1, for all y ∈ [0, 1], and it follows that
Z 1
Z 1
E[g(Y )] =
g(y)f (y)dy =
g(y)dy = I.
0
0
If we then generate y1 , . . . , yn ∼ U(0, 1), then the Law of Large Numbers tells us that, for
sufficiently large n,
n
X
g(yi )/n ≈ I.
ḡ =
i=1
2