Fifteen Eighty Four

Academic perspectives from Cambridge University Press


The Importance of Probability in Computing

Mor Harchol-Balter

A Q&A with Professor Mor Harchol-Balter, author of the new Cambridge textbook
Introduction to Probability in Computing

In today’s blog post, we’re delighted to catch up with the author of a ground-breaking textbook on probability for computing. We’ll discuss the inspiration behind the book, its target audience, and unique features that make it stand out from other textbooks. So, let’s get started!

Cambridge (CUP): Thanks so much for taking time to speak to us today. I’d like to start by asking what inspired you to write a book on probability for computing. Many people think that computer science students just study coding. Why do they need probability?

Mor Harchol-Balter (MHB): The field of computer science has evolved significantly over the past 30 years, and it now encompasses various specializations that require a strong foundation in probability. Students working on algorithms need probability to understand randomized algorithms. Students designing computer systems need probability to run simulations and provision computing capacity.  Students studying machine learning and AI need probability and statistics to reason about human behaviour. My book aims to teach probability as it is applied in these different areas of computer science, making it relevant and engaging for students.

CUP: That’s quite a broad range of applications. It sounds like your book will be useful for a range of disciplines.  Which departments could use your book?

MHB: Traditionally probability is taught through the Statistics or Math department.  However, given the increasing importance of probability in Computer Science and Electrical Engineering, it is now becoming common to teach probability “in house,” within the Computer Science or Engineering departments. Teaching probability within the Computer Science department allows us to emphasize randomized algorithms and simulations. Teaching probability within the Engineering or Operations Research department allows us to switch the emphasis to stochastic processes. My book covers all of these topics and thus is useful in all of these departments.  

CUP: What are the different classes that could use your book? In which departments are they taught?

MHB: Each department will have their own course names, but some examples of classes that could use the book include:

  • Probability for Computing (Computer Science or Electrical and Computer Engineering)
  • Probability & Randomized Algorithms (Computer Science)
  • Probability & Stochastic Processes (Operations Research)
  • Probability & Simulation (Computer Science or Electrical and Computer Engineering)
  • Probability & Statistics (Computer Science or Electrical and Computer Engineering , Operations Research, Stats, Mathematics)

The existence of all these classes supports what I was saying about probability no longer being only taught in Mathematics or Statistics departments. Math and stats courses often introduce probability as a bunch of rules that must be followed without context or specific applications. These rules are hard to memorize or understand when taught in isolation. The benefit of my textbook is that it teaches probability in the context of real-world applications that are meaningful to students today – whatever department they are in!   

CUP: That approach makes your book rather exceptional. At what point do students need to learn probability? What is the level of your book?

MHB: The book can be used for courses at various levels, from sophomores at universities like mine (Carnegie Mellon University) to juniors and seniors at most other schools. It can also be used by Masters-level students who need to learn probability, especially if their undergraduate degree did not cover the topic in much depth. The book is written to be readable for any student meeting the subject properly for the first time. And practitioners too for that matter!

CUP: I’m just looking through your book as we speak and it feels very engaging. For example I notice that you’ve used a question/answer style throughout. That is fairly unique isn’t it? Can you tell me why you used that structure?

MHB: Yes, the Q&A format is unique. Students have a hard time reading these days – too many beeps from their cell phone! They need text that helps them focus on the key points and encourages them to actively engage with the material. A question does that. It makes you pause and ask yourself if you know the answer. The Q&A also simulates a conversation between the student and the author, making the learning process more interactive and enjoyable.

CUP: The book feels very approachable and student-focused. Are there many other pedagogical features you would like to mention?

MHB: Very much so. Where do I start? For one thing there are a huge number of exercises that are not rote, so each exercise has at least one new insight. I feel that the optimal number of exercises in a textbook is double what an instructor will assign, so that students have extra exercises to do on their own. There are lots of intuition-building questions, such asWhy doesn’t this work?’ and What would you expect that the answer should be?’ I want the reader to feel like we’re having a conversation. Plus, the book is full of real-world examples that are fun and easy to relate to, and bright colourful pictures to make the content more engaging and appealing.

Also, unlike a lot of traditional math and probability books, it’s designed to be inclusive and accessible to a diverse audience, including women and underrepresented groups in computer science. One thing the book doesn’t have is lots of dusty pictures of old white men!

CUP: Finally, I have to ask about the cover, which has an incredibly cute juggling mouse. Can you tell me the significance of the mouse and the balls?

MHB: The mouse represents the “balls & bins” problem, a fundamental concept in computer science. You have, say, 100 balls and 100 bins, and you throw the 100 balls at random into the 100 bins. You might expect to end up with one ball in each bin. But probability tells us that there’s a reasonable chance that some bin has a lot of balls (say 10 or more) while others will be empty.

The problem helps explain the behaviour of various important algorithms and processes, such as random load balancing in a data center, and random hashing.

CUP: Many thanks for taking time to speak to us today. We wish you great success with your book!

MHB: Thanks, it was my pleasure.

We hope you enjoyed this conversation with the author Mor Harchol-Balter. The book’s unique approach to teaching probability, coupled with its engaging content and inclusive design, makes it an invaluable resource for students and educators alike. If you’re interested in learning more about the book or incorporating it into your curriculum, be sure to check it out!

Introduction to Probability for Computing published 28 September 2023 and is available to order now. Exam copies are available for instructors.

About The Author

Mor Harchol-Balter

Mor Harchol-Balter is the Bruce J. Nelson Professor of Computer Science at Carnegie Mellon University. She is a Fellow of both ACM and IEEE. She has received numerous teaching awar...

View profile >

Latest Comments

Have your say!