Quant Interview Question - Goldman Sachs

This is an interview question asked in investment banks, hedge funds and trading firms for roles such as quant analyst, quant strategist and quant researcher. It tests the candidate on their knowledge of probability and statistics (random variables, distributions and expected values).

Question:

There's a 50% probability that bond A will default and a 30% probability that bond B will default.

a) What's the range of probability that at least one bonds will default
b) What's the range of their correlation?


This problem involves the use of Bernoulli random variable.

A Bernoulli random variable is the simplest kind of random variable. 

1- It can take on two values, 1 and 0.

2- It takes on a 1 if an experiment with probability p resulted in success and a 0 otherwise.

3- Some example uses include a coin flip, whether a disk drive crashed, and whether someone likes a Netflix movie.

If X is a Bernoulli random variable, denoted X ∼ Ber(p):

Probability mass function: 
P(X = 1) = p
P(X = 0) = (1 − p)

Expectation: E[X] = p

Variance: Var(X) = p(1 − p)

Note that for Bernoulli Random variable, E[X] = P(X=1) = p


Let's define Bernoulli Random Variables as below :

X = 1 if A defaults, 0 otherwise
Y = 1 if B defaults, 0 otherwise

X=1 & Y=1  => Both default

X=1 or Y=1 => At least one defaults

We are given,

P(X=1) = 50%

P(Y=1) = 30%


Part a : Range of probability that at least one will default

We need to find

P(X=1 or Y=1) = ?

We can write this as

P(X=1 or Y=1) = P(X=1) + P(Y=1) - P(X=1 & Y=1)
         
= 50% + 30% - P(X=1 & Y=1)

We need to estimate the minimum and maximum value of P(X=1 & Y=1)

Min(P(X=1 & Y=1)) = 0 (No overlap)
Max(P(X=1 & Y=1)) = 30% (Complete overlap)

Putting these values back into the equation:
Max(P(X=1 or Y=1)) = 50% + 30% - 0 = 80%
Min(P(X=1 or Y=1)) = 50% + 30% - 30% = 50%

Range of probability is 50% to 80%


Part b : Range of correlation

For Bernoulli RV, we know that P(X=1) = E(X) = p
P(X=1 or Y=1)  = P(X=1) + P(Y=1) - P(X=1 & Y=1)

= E(X) + E(Y) - E(XY)

And we know that,

Cov(X,Y) = E(XY) - E(X)E(Y)
E(XY) = E(X)E(Y) + Cov(X,Y)

          = P(X=1).P(Y=1) + Cov(X,Y)

          = 0.15 + Cov(X,Y) 

Using the following:
Cov(X,Y) = r*Std(X)*Std(Y)
Cov(X,Y) = r*√ (Var(X).Var(Y))
Var(X) = p(1-p) = P(X=1)[1-P(X=1)] = 0.25 
Var(Y) = p(1-p) = P(Y=1)[1-P(Y=1)] = 0.21

Using this in our equation

P(X=1 or Y=1) = P(X=1) + P(Y=1) - P(X=1 & Y=1)

= E(X) + E(Y) - E(XY)

= E(X) + E(Y) - [0.15 + Cov(X,Y)]

= 0.65 - Cov(X,Y)

= 0.65 - r*√ (0.25*0.21)


P(X=1 or Y=1) = 0.65 - r*√ (0.25*0.21)

and we know from part 1 that 

Max value of P(X=1 or Y=1) = 0.8 , and 

Min value of P(X=1 or Y=1) = 0.5

0.65 - r*√ (0.25*0.21) = 0.8
=> r = -0.65

And,

0.65 - r*√ (0.25*0.21) = 0.5
=> r = 0.65

Range of correlation is [-0.65, 0.65]