12 A better abstraction for randomness
In my university days, I paid little attention to my only required statistics class. I found the jargon confusing and foresaw little use for statistical reasoning in my future career. I was half right: the jargon is confusing. But because I ended up implementing programming tools for data scientists, my weak knowledge of probabilistic reasoning needed fixing in a hurry.
In this chapter, we’ll start with a refresher on statistics jargon. If you already have a solid background in probability and statistics, much of this material will be review. Then we’ll come up with a better way to represent randomness than standard random number generating functions. We’ll use high-level methods such as Where, SelectMany, Join, and GroupBy to manipulate sequences without writing tedious loops. We could similarly benefit from manipulating random quantities at a higher level of abstraction.