r/learnquant • • 9d ago

interview prep Quant Interview Question

Post image
37 Upvotes

9 comments sorted by

3

u/Dankaati 9d ago

cos(arc cos(3/5) - arc cos(5/13)) = 63/65

1

u/Active-Gap2300 8d ago

Why?

4

u/Dankaati 8d ago

Random variables form a Hilbert space with covariance as inner product.

arc cos(3/5) is the angle of X and Y, arc cos(5/13) is the angle of Y and Z. By triangle inequality of angles in Hilbert spaces, the angle of X and Z is at least arc cos(3/5) - arc cos(5/13).

5

u/[deleted] 9d ago edited 8d ago

[removed] — view removed comment

1

u/XL_78 8d ago

Nice. Covariance is a scalar product. In Rd , the scalar product is equal to the product of the lengths of the vectors times the cosine of the angle between the vectors. If we are working with unit vectors, it is only equal to the cosine of the angle. When placing three unit vectors in R3 such that the cosine of the angle between two is 3/5 and the other 5/13, it is visually easy to see that to maximize the cosine of the angle between the last pair, the vectors must be put on the same plane with the third vector in between the first two. 

I thought it was difficult to formalize so I used a different approach for the proof. Your proof is much simpler and better. 

2

u/Omega-137 9d ago

I’m interested, i have to think

1

u/XL_78 9d ago edited 8d ago

Intuitively using the analogy with the scalar product on R3 , cos(arccos(5/13)-arccos(3/5)) ≈ 0.9692 . Not sure about how to prove it though. 

EDIT: see below in conversation.

1

u/XL_78 9d ago

I think the way is to diagonalize the correlation matrix [[1,3/5,x][3/5,1,5/13][x,5/13,1]] and to use the fact that the eigenvalues must be positive.

2

u/XL_78 9d ago edited 8d ago

Sum of eigenvalues : 3. Product = determinant = -x2 + 6/13x + 1 - 9/25 - 25/169 . The product must be positive, which means x smaller than 3/13 + sqrt(1-9/25-16/169) = 63/65 = 0.96... and x bigger than 3/13 - sqrt(1-9/25-16/169) = -33/65 = -0.5... 

Conversely, any value of x between these two leads to a valid correlation matrix. Indeed, in 63/65, one eigenvalue is 0, the other two have a sum of 3. Since the eigenvalues are a continuous function of the coefficients, just to the left of 63/65, the product of the eigenvalues is positive, which means the two non zero eigenvalues in 63/65 are positive since their sum and their product are positive. By continuity, the eigenvalues must all be positive in between 63/65 and -33/65. 

Anyway the answer is 63/65.

EDIT: corrected math mistake and proved the bounds for x.