Course»Course 18»Fall 2009»18.440»Homepage

18.440  Probability & Random Variables

Fall 2009

Instructor: Scott Roger Sheffield

TA: Zhenqi He

Lecture:  MWF11  (4-370)        

OCW archive available

Announcements

office hours and final

I will hold office hours tomorrow in 2-180 from 11 until 1.

The practice final is online.

All problems on the final will be similar to problems on either the problem sets or the practice or actual exams on the course web page.

The best way to study is to make sure you can do all those problems (along with any possible variants you can easily conceive of).

You should know the proofs in the book for the central limits theorem and the weak/strong laws of large numbers. Otherwise, you don't need to memorize proofs from the book.

If you are able to solve the practice exam problems, then your knowledge of Black-Scholes/risk neutral probability is very probably sufficient.

Ditto for martingales (provided you can also solve the problem set problems).

Announced on 10 December 2009  9:19  a.m. by Scott Roger Sheffield

This week's office hours and Make-up Exam

For these four students who cannot take the midterm this morning and hence will take a make-up, the Room 2-131 has been reseved and the make-up is on Thursday (Nov. 19) 4-5pm.

By the way, there will be no office hours this Thursday 4-6pm.

Regards,
Zhenqi

Announced on 16 November 2009  8:30  p.m. by Zhenqi He

Midterm grades

Congrats on surviving another difficult exam.  The class average was 46 and the class high was 91, with five scores in the 80's.

Here is the grade breakdown for this exam:

55-100  A grades

25-54   B grades

15-24   C grades

If your score was below 15 and you wish to continue in the course, you should come and speak with me.

Announced on 16 November 2009  7:40  p.m. by Scott Roger Sheffield

Midterm plus solutions on webpage

The midterm and the solutions are posted on the webpage. We hope to have grades on Stellar later tonight. I will bring the exams to class on Wednesday.

Announced on 16 November 2009  6:54  p.m. by Scott Roger Sheffield

Cory's solutions

Dear Prof. Sheffield,

Here are my rough answers to the practice midterm. I'd encourage anyone looking at these to use Bayes's Theorem when interpreting their results [e.g. I was 99% sure of my answer, but...]


1. a) Like we did in class, it's binomial Choose(2,i)/2^5 = Choose(2,i)/32.
b) Probability of being at Y = y given that X = 2Y is P(Y = y & X = 2Y)/P(X = 2Y). Then sum that times y^2 for all possible y.


I got:


Sum[y^2 / (y! * (2y)!), y, 0, Infinity] / Sum[1/(i! * (2i)!],i,0,Infinity]


Had to cancel out some e^(-1)'s.


c) P(X = 2Y + i | X - 2Y > 0). Must have i > 0. Then it becomes P(X = 2*Y + i & X - 2Y > 0)/P(X - 2Y > 0) = P(X = 2*Y + i)/P(X - 2*Y > 0).


I got:


Sum[ 1/( k! * (2k + i)!),k,0,Infinity] / Sum[Sum[ 1/( k! * (2k + j)!),k,0,Infinity],j,1,Infinity]


Denominator is just like summing the numerator from 1 to infinity.


d) Sum P(X = i, Y = i) for i is 0 to infinity.


I got:


Sum[Exp[-2]/(i!)^2,i,0,Infinity]


2 a) I couldn't simplify this from the integral very much, at least not without using the cumulative distribution for a normal variable.


If the pdf for the exponential is f and the one for the normal distribution is g, then we want


Integral[f(a - x)*g(x),x,-Infinity,a]. From -Infinity to a since the exponential only goes from 0 to infinity (no negatives).


I got:


lambda/(Sqrt[2*Pi]*sigma) * Integral[Exp[-lambda*(a - x)]*Exp[ -(x - mu)^2 / (2*sigma^2) ] , x, 0, Infinity]


or you could note that this means we shift the normal over by sigma^2*lambda and play with that to get it in terms of the normal CDF.


b) E[Exp[i*t*X]] = Integral[1/5 * Exp[-i*t*X],x,0,5]


I got:


(1 - Exp[-5*i*t])/(5it)


Similarly, for the moment:


(1 - Exp[-5*t])/(5t)


c) Just as before, this as a sum of (n - 1) steps, S_i. S_1 is the time until the smallest exponential, S_2 the time between smallest and 2nd smallest... All S_i are independent. Each one is exponential with parameter (n - i + 1)*lambda.


For expectation, I got:


1/lambda * (1/n + 1/(n - 1) + ... + 1/2).


For variance, we can still add 'em up since they're independent. Variance for an exponential is 1/lambda^2 So I got:


1/lambda^2 (1/n^2 + 1/(n - 1)^2 + ... + 1/4)


3. a) To get f_X, take Integral[1,x,-Sqrt[1-x^2],Sqrt[1-x^2]] = 2Sqrt[1-x^2]. Similarly, f_Y = 2*Sqrt[1-y^2]/


b) X^2 + Y^2 is between 0 and 1. For those quantities, P(X^2 + Y^2 < a) = [area of a circle of radius a] / [area of a circle of radius 1] = a^2. Take the derivative with respect to a.


I got:


2*a [0 <= a <= 1].


Then, for the max, I also tried to calculate P(X < a,Y < a) and take the derivative. -1 <= a <= 1. You just take an integral, but you have to figure out the bounds. Say we integrate with respect to x first [x is on the outer integral]. Then x can be from -1 to a. Then, y must be larger than -1 and larger than -Sqrt[1 - x^2]. -Sqrt[1 - x^2] is always bigger. y must be <= 1, <= Sqrt[1 - x^2], and <= a. a <= 1, so ignore the one bit. Overall, it's <= min(Sqrt[1 - x^2],a).


So, we're integrating min[Sqrt[1-x^2],a] + Sqrt[1-x^2] with respect to x from -1 to a. We want to take the derivative with respect to a, so it will just be this function evaluated at a.


I got:


min[Sqrt[1 - a^2],a] + Sqrt[1-a^2] (-1 <= a <= 1). There is a kink at a = sqrt(2)/2


c) Want: f(x,y) / f_Y


I got:


1/(2*Sqrt[1-y^2]) [-Sqrt[1 - y^2] <= x <= Sqrt[1 - y^2])


d) Want integral[a*f_a] = integral[a*(2a),a,0,1]


I got:


2/3


4 a) We did this one in class. Each X_i has expected value 5/4 and all independent.


I got:


(5/4)^n


b) Need >= 55 heads (work out just by using logs: 2^(m)*(1/2)^(100 - m) > 1000). Using central limit approximation it's ~1 stdev above mean.


I got:


~16%


5. a) Integral[1*Exp[-(a - x]*2*Exp[-2*x],{x,0,a}]


I got:


2*(Exp[a] - 1)/Exp[2*a]


b) Also done in class (mostly). Get Cov(XY,X) + Cov(XY,Y). Use independence of X & Y and formula for covariance to get:


E[X^2]E[Y] - E[X]^2E[Y] + E[Y^2]E[X] - E[Y]^2E[X]


I got:


3/4


c) Call F(a) the cumulative density function. F(a) = P(X < a)*P(Y < a)*P(Z < a) = (1 - Exp[-a])*(1 - Exp[-2*a])*(1 - Exp[-3*a]). f(a) = F'(a) is the density function.


Integrate[a*f(a),a,0,Infinity]. Use integration by parts if you want to do it by hand and note that the stuff that goes to infinity cancels (in the limit).


I got:


1 + 1/2 - 1/4 - 1/5 + 1/6 = 73/60


d) We did this in class. It's just exponential with parameter 1 + 2 + 3 = 6.


I got:


1/36


e) We first wanna compute Cov(min,max). Call max = min + I, where I is some interval. If, e.g., X is the minimum, I will be the max of two exponentials of parameters 2 and 3 (because exponentials are memoryless). Because of the memorylessness of exponential variables, I and min are independent. (Note: I actually didn't believe this until I computed the covariance out exactly. I'm not sure I understand... if the minimum is larger, shouldn't I tend to be smaller because of which variables have been canceled out?).


Then cov(min,max) = var(min) = 1/36. p = 1/36 / Sqrt[(1/36*var(max))]. You can compute var(max) just like we did earlier with integration by parts.


I got:


E[max^2] = 2*(1 + 1/4 - 1/16 - 1/25 + 1/36) = 4231/1800. Var[max] = 4231/1800 - (73/60)^2 = 3133/3600.


(1/36) / Sqrt[3133 / 3600 * 1/36] = 10 / Sqrt[3133] ~0.179


6 a) For a) and b) we're given too much information.


Call M_i a variable that is 1 if X_i is a local max and 0 otherwise. We want E[sum[M_i]] = Sum[E[M_i]]. Now, at each i to be a local max just means to be the largest of three variables with the same distribution. This happens 1/3 of the time. So, E[M_i] = 1/3


I got:


8/3


b) To compute E[N^2], I just expanded using the above formula. Get Sum[E[(M_i)^2] + 2*E[M_i * M_j]]. If i and j differ by one, then M_i * M_j = 0 since they can't both be local maxes. If M_i and M_j differ by 2, we count the number of permutations/orderings of (1,2,3,4,5) where 2 comes before 1 and 3 and 4 comes before 3 and 5. I count 6 + 6 + 2 + 2 = 16. So, E[M_i*M_j] = 16/120 = 2/15. Otherwise, M_i and M_j are independent since they don't share any comparisons. 8 choose 2 = 28 total pairs.


I got:


E[N^2] = 8/3 + 2*(7*0 + 6*2/15 + (28 - 13)*1/9) = 38/5
Var[N] = 38/5 - (8/3)^2 = 22/45


c) N = Sum[M_i]. Note that X_1 is independent from all M_i except M_2. So, cov(N,X_1) = cov(M_1,X_1). We want to compute the expectation of X1 in the case where X2 = max(X1,X2,X3). For this to happen:


X3 < X2, X1 < X2. To do this, I took integrals. Note that changing the mean doesn't change anything about N and thus nothing about cov(N,X1) (cov(X + a,Y) = cov(X,Y) if a is a constant). So, assume the mean is 0. So, all we want is E[X1*M1] (E[X1]*E[M1] = 0).


Pick some value for X2, call it m. We want to integrate over m.


Integrate[f_X2(m)*P(X3 < m) * Integrate[f_X1(y)*y,y,-Infinity,m],m,-Infinity,Infinity], i.e. just integrate m over all possible values. Using a substitution for z = y^2 [or something similar], the inner integral turns into a normal distribution. Multiply the two normal distributions together, pull out constants, and use the change of variables z = Sqrt(2)*m. Pull out more constants and use the reverse of the chain rule to integrate.


I got:


cov(X1,M_1) = -sigma/(4*Sqrt[Pi])


Var(X1) = sigma^2. Var(N) = 22/45. cov(X1,N) = cov(X1,M1).


Overall:


-sigma/(4*Sqrt(Pi))
--------
Sqrt[sigma^2 * 22/45] = -3/4*Sqrt[5/(22*Pi)] `-0.202


7. We've mostly heard these before so I'll just repeat them.


a) Normal(n*mu,n*sigma^2)
b) Gamma(n,lambda)
c) Negative binomial distribution (n,p) [honestly, I found this through googling. I don't really remember us really studying the negative one]
d) Poisson (n*lambda)
e) Binomial(n,p)


Anyway, I hope these are correct enough to be helpful. I found the correlation coefficient problems pretty challenging... I could not have gotten very many points on this exam in an hour. :-/


Sincerely,
Cory Smith

Announced on 15 November 2009  8:33  a.m. by Scott Roger Sheffield

View archived announcements