Professional Documents
Culture Documents
1. If X, Y are two discrete random variables, we define the covariance of X and Y in the
following manner:
Cov(X, Y ) = E((X E(X))(Y E(Y ))).
by linearity of expectation (i.e. Theorem 1 part (3) from class). Canceling the last term
with one of the subtracted terms yields the desired result.
(b)(1 point) Show that if X and Y are independent, then Cov(X, Y ) = 0.
If X and Y are independent, then we know from class that E(XY ) = E(X)E(Y ). Thus,
2.(2 points) What is the expected number of runs of k heads in a string of n coin flips?
Carefully prove your answer, labeling all expected values properties that you use.
Let
1 if the ith coin flip turns up heads after k 1 consecutive heads
Xi =
0 otherwise
1
Proof Assignment #4
Bonus (+2 points) We construct a random graph by flipping a fair coin to determine whether
any given pair of vertices should be connected by an edge (i.e. Pick a pair of vertices and
flip the coin. If the coin lands heads, then we draw an edge between them. If the coin lands
tails, then we dont draw an edge between them. We repeat this experiment for all possible
pairs of vertices). What is the expected number of edges in a random graph with n vertices?
What is the expected number of triangles?
First, we will compute the expected number of edges in a random graph. Let
1 if the ith pair of vertices has an edge connecting them
Xi =
0 otherwise
Note that there are n2 ways of choosing pairs of vertices out of a total of n. Then, if we
Now, P (Xi = 1) = 21 since we determine whether to connect the ith pair of vertices by
flipping a fair coin once. Thus,
X(n2 ) (n2 )
X
E(X) = E( Xi ) = E(Xi ),
i=1 i=1