Read this lesson as text

Introduction to Probability

Math for CS · Axiom Academy

Probability for Computer Science Probability is the mathematical study of uncertainty. In computer science, randomness and probability are not exotic theoretical concepts—they're central to how modern computing works. From machine learning algorithms that learn from noisy data to cryptographic systems that rely on random numbers, probability is everywhere. Consider these real-world scenarios where probability matters in CS: Machine Learning: Neural networks use probability to model uncertainty in predictions. A spam classifier assigns probabilities to whether an email is spam. Cryptography: Secure systems rely on generating random numbers that are cryptographically unpredictable. RSA encryption depends on the difficulty of factoring large numbers—a probabilistic problem. Database Query Optimization: Query planners use probabilistic estimates of data distribution to choose the best execution strategy. Network Protocols: TCP/IP and other protocols use randomization (exponential backoff) to avoid network congestion. Game Development: Randomness creates engaging gameplay. Loot tables, critical hit chances, and procedural generation all rely on probability. Distributed Systems: Randomized algorithms help coordinate activity in systems with millions of nodes. At first, randomness seems opposed to computing—computers are deterministic machines that follow explicit instructions. Yet randomization is a powerful tool for solving hard problems efficiently.

This is the written version of the interactive lesson above. See the full Math for CS course.