Pergunta de entrevista da empresa Bitscopic

I was presented with a sample technical question and had to program a statistical solution.