Exercise on total/conditional probability, Y combinator, clusterization using TypeScript and boostrap