Two Sigma interview question

Some problems related to conditional probability and optimization.