MATH 156 Chapter 4 - Probability and Calculus
MATH 156 Chapter 4 - Probability and Calculus
Chapter 4
1.6
1.4
1.2
1
f(x)
0.8
0.6
0.4
0.2
0
0 0.5 a 1 b 1.5
x
97
0.6
f(x)
0.4
area = 1
0.2
2) Consider
c if x ≥ 0,
f (x) =
0 if x < 0,
for a constant c > 0. Find c such that f is a
probability density function.
3) Consider
kx3 if 0 ≤ x ≤ 2,
f (x) =
0 otherwise,
for a constant k > 0. (a) Find k such that f is a
probability density function.
(b) Let X be a random variable with this proba-
bility density function f . Find the probabilities
2.5
1.5
f(x)
0.5
area = 1
0
0 0.5 1 1.5 2 2.5
x
100
k 42 24k
Z ∞ Z 2
f (x) dx = kx3 dx = x = = 4k
−∞ 0 4 0 4
and set it equal to 1. We obtain 4k = 1 so that
k = 14 .
Rb
(b) Using P (a ≤ X ≤ b) = a f (x) dx, we com-
pute the probabilities
Z 2 Z 2
1 3
(i) P (1 ≤ X ≤ 2) = f (x) dx = x dx
1 1 4
1 42 1 15
= x = (16 − 1) = ,
16 1 16 16
Z 1 Z 1
1 3
(ii) P (−1 ≤ X ≤ 1) = f (x) dx = x dx
−1 0 4
1 41 1 1
= x = (1 − 0) = ,
16 0 16 16
Z 1 Z 1
1 3
(iii) P (X = 1) = f (x) dx = x dx
1 1 4
1 41 1
= x = (1 − 1) = 0,
16 1 16
where we used in (ii) that f (x) = 0 for all x < 0.
101
0.1
f(x)
0.05
area = 1
0
0 5 10 15 20 25 30 35 40 45 50
x
102
(b) We compute
Z ∞
P (X > 20) = f (x) dx
20
Z b
1 −x/10
= lim e dx
b→∞ 20 10 !
10 −x/10 b
= lim − e
b→∞ 10 20
−b/10 −20/10
= lim − e +e
b→∞
= e−2 ≈ 0.1353.
103
• Examples: 1) Consider
k e−x−2y if x ≥ 0 and y ≥ 0,
f (x, y ) =
0 otherwise,
for a constant k > 0. (a) Find k such that f is a
probability density function.
Let X and Y be random variables with this joint
probability density function f (x, y ).
(b) Find the probability P (X > 1, 0 ≤ Y ≤ 2).
(c) Find the probability P (−1 ≤ Y ≤ 1).
105
so that
Z 2Z ∞
P (X > 1, 0 ≤ Y ≤ 2) = 2e−x−2y dxdy
0 1
Z 2
= 2e−1−2y dy
0
2 −1−2y 2
=− e
2 0
= −e−5 + e−1
≈ 0.3611.
107
P (−1 ≤ Y ≤ 1) = P (X ≥ 0, −1 ≤ Y ≤ 1)
Z 1Z ∞
= 2e−x−2y dxdy,
0 0
where we started the y -integral at 0 because Y
does not take any negative values. We compute
Z ∞
2e−x−2y dx = 2e−2y
0
similarly to part (b). We then obtain
Z 1Z ∞
P (−1 ≤ Y ≤ 1) = 2e−x−2y dxdy
0 0
Z 1
= 2e−2y dy
0
2 −2y 1
=− e
2 0
= −e−2 + 1
≈ 0.8647.
108
2) Consider
if − 1 ≤ x ≤ 1
k(x + y 2)
f (x, y ) =
and − 1 ≤ y ≤ 1,
0 otherwise,
for a constant k > 0. Find k such that f is a
joint probability density function.
• Properties of sums:
1. Constant coefficients:
n
X
a = a + a + · · · + a = na
j=1
2. Linearity:
n
X n
X n
X
(caj + kbj ) = c aj + k bj
j=1 j=1 j=1
114
2. Linearity:
E (cX + kY ) = cE (X ) + kE (Y )
for random variables X , Y and constants c, k.
• Properties:
= c2Var(X )
117
and
q q
σ (cX ) = Var(cX ) = c2Var(X ) = |c|σ (X ).
2
4. Var(X ) = 2
E X − E (X ) :
2
Var(X ) = E X − E (X )
2
= E X 2 − 2XE (X ) + E (X )
2
= 2
E X − E 2XE (X ) + E (X )
2
= 2
E X − 2E (X )E (X ) + E (X )
2
= 2
E X − E (X ) .
118
3. Compute Var(X ):
2
4
2
Var(X ) = E X 2 − E (X ) =4− ln(4)
3
4. Compute σ (X ):
s
q 16
σ (X ) = Var(X ) = 4− (ln(4))2
9
≈ 0.7638.
• Properties:
1. Symmetry:
Cov(X, Y ) = Cov(Y, X ),
ρ(X, Y ) = ρ(Y, X ).
2. Linearity of covariance:
Var(X ) = Cov(X, X ).
4. Variance of sum:
(a + b)2 = a2 + b2 + 2ab.
121
Reason:
Var(X + Y ) = Cov(X + Y, X + Y )
= Cov(X, X + Y ) + Cov(Y, X + Y )
= Cov(X, X ) + Cov(X, Y )
+ Cov(Y, X ) + Cov(Y, Y )
= Var(X ) + Var(Y ) + 2Cov(X, Y ).
• Examples:
1. Let X be a random variable with a variance
of 2, and let Y be a random variable with a
variance of 4. Let the covariance of X and X
be equal to 1. Find the variance of 3X + Y .
We compute the variance of 3X + Y as
Cov(X, Y ) = Cov(X, aX + b)
= aCov(X, X )
= aVar(X ).
Additionally, using Var(Y ) = a2Var(X ), we
find
Cov(X, Y )
ρ(X, Y ) = q
Var(X )Var(Y )
aVar(X )
=q
Var(X )a2Var(X )
1 if a > 0,
a
= √ = DNE if a = 0,
a2
−1
if a < 0.
imizer. We compute
0.6z − 0.2 = 0,
hence
0.2 1
z= = ,
0.6 3
which means it is optimal to invest 1/3 in Apple
and 2/3 in Microsoft.