Download 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
Transcript
Continuous Random Variables
Dennis Sun
Discrete Random Variables
So far, the random variables we’ve seen take on a few, distinct set
of values. Such variables are called discrete.
Example: If we toss a coin 5 times, the number of heads is a
discrete random variable. It only takes on the values 0, 1, 2, ..., 5.
p[x]
e.g., P (number of heads = 3) = .3125
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00 0
1
2
x
3
4
5
Discrete Random Variables
p[x]
P (number of heads > 2) is represented in red below:
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00 0
1
2
x
3
4
5
Not All Random Variables are Discrete
My bus is equally likely to be delayed by any amount of time
between 0 and 10 minutes.
There are infinitely possible values for the delay of the bus.
Therefore, the probability that delay is equal to any particular
value has to be 0,
e.g., P (delay = 6.027252) = 0.
But it still makes sense to talk about the probability that the delay
is in some range,
e.g., P (delay > 5) = .5.
Continuous Random Variables
We call random variables like the one above, that can take on any
values in a range, continuous.
p(x)
We describe continuous random variables by a probability
density function (p.d.f.), denoted p(x).
0.12
0.10
0.08
0.06
0.04
0.02
0.00 2
0
2
4
6
8
bus delay (minutes)
10 12
We can find probabilities by integrating the p.d.f.
Example
The time (in hours) it takes a randomly chosen student to finish my
final exam is a random variable with p.d.f.
(
1
(x − 1) 1 < x ≤ 3
p(x) = 2
.
0
otherwise
What is the probability that the student takes longer than 2 hours?
Expected Value
p(x)
What is the expected value of a continuous random variable?
0.45
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00 4
3
2
1 0
x
1
2
3
4
Expected Value
p(x)
What is the expected value of a continuous random variable?
0.45
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00 4
3
2
E[X] ≈
1 0
x
X
1
2
xi p(xi )∆
i
↓ ∆→0
Z
∞
E[X] =
xp(x) dx
−∞
3
4
Formulas for Continuous Random Variables
You can translate any discrete formula into a continuous one by:
• replacing the sum with an integral
• replacing the p.m.f. p[x] by p(x) dx.
Discrete
d
X
P (c ≤ X ≤ d)
p[x]
E[X]
E[g(X)]
Var[X]
Continuous
Z d
p(x) dx
c
x=c
Z
∞
X
xp(x) dx
xp[x]
−∞
x
Z
∞
X
g(x)p[x]
g(x)p(x) dx
−∞
x
Z
∞
X
(x − E[X])2 p[x]
(x − E[X])2 p(x) dx
x
−∞
Example
The time at which a randomly chosen student finishes my final
exam is a random variable with p.d.f.
(
1
(x − 1) 1 < x ≤ 3
p(x) = 2
.
0
otherwise
What is the expected time it takes for a student to finish? What is
the variance?