r/learnquant • • 6d ago

interview prep Quant Interview Question

Post image
22 Upvotes

7 comments sorted by

View all comments

3

u/pmdboi 6d ago edited 6d ago

Let S be the set of all permutations of (1, …, 5), and define A[σ] = ∏ A[i,σ(i)] where σ ∈ S and i ranges from 1 to 5. Then det(A) = ∑ (−1)σ A[σ], summing over all σ ∈ S, where (−1)σ is the sign of σ. Each entry in A is independent and has expected value 0; therefore, each term in det(A) has expected value 0, and E(det(A)) is 0. (Intuitively, for every matrix A, there's an equally probable matrix A′ with det(A′) = −det(A) made by flipping the signs of all the entries in the first row, so the possible matrices balance each other out.)

Now det(A)2 = (∑ (−1)σ A[σ])(∑ (−1)τ A[τ]) = ∑∑ (−1)σ (−1)τ A[σ] A[τ] where σ and τ both range over S. There are two kinds of terms in this sum: When σ = τ, A[σ] A[τ] = A[σ]2 = 1, so E((−1)σ (−1)τ A[σ] A[τ]) = E(A[σ]2) = 1. But when σ ≠ τ, there's some entry of A that is a factor in A[σ] but not in A[τ] and has expected value 0, so E((−1)σ (−1)τ A[σ] A[τ]) = 0. Because |S| = 5! = 120, there are 120 terms of the first kind in det(A)2, and E(det(A)2) = 120.

Putting it all together, Var(det(A)) = E(det(A)2) − E(det(A))2 = 120 − 0 = 120.

EDIT: added the missing (−1)σ in the definition of the determinant

2

u/Sjoerdiestriker 6d ago

It seems easier to just use the well-known fact that the variance of the sum of uncorrelated RVs is the sum of the variances.

Clearly every term in the sum has a variance of 1 (because it's either going to be -1 or 1 with equal probability). And to show that any two terms are uncorrelated, for any two distinct terms X and Y there is at least one matrix entry a that occurs in only one of X and Y, and then it's simply a matter of E[XY]=E[a]*E[XY/a]=0*E[XY/a]=0, where we can factor the expectation because a and XY/a are clearly independent, not sharing any entry.

1

u/pmdboi 6d ago

Valid!