liveBook · Manning

Probability theory

As explained in Fabulous Adventures in Data Structures and Algorithms

Probability is the mathematical theory of quantifying uncertainty about possible outcomes.

Probability theory quantifies uncertainty about possible outcomes. A probability is a number from zero to one: zero represents an outcome never observed, while one represents certainty. The same mathematics supports two interpretations: frequentism treats probability as long-run observed frequency, while Bayesian reasoning treats it as confidence informed by available evidence. section 12.1

A coin toss before a game

Suppose Red has a 50% chance of winning a pregame coin toss and a 70% chance of defeating Blue if Red wins it. A frequentist interpretation asks about repeated trials; a Bayesian interpretation treats 70% as a confidence level that could justify a $70 bet on a $100 payout. Bayesian probabilities change when new evidence arrives. section 12.1

Probability supports a higher-level approach to randomness and statistical inference:

  • Represent random quantities as distributions rather than relying only on standard random-number-generating functions. section 12.0
  • Manipulate distributions with sequence-oriented operations such as Where, SelectMany, Join, and GroupBy. section 12.0
  • Use probability as groundwork for applying Bayes’ theorem when new real-world evidence must inform a decision. section 12.0
  • Implement probabilistic tools from scratch in C#, with the ideas intended to transfer to other mainstream object-oriented languages. section 1.3

How Fabulous Adventures in Data Structures and Algorithms covers it

How deep it goes
Defines frequentist and Bayesian interpretations with examples, then stops short of developing Bayes’ theorem or sampling algorithms.
Examples
Uses die rolls, a coin toss, a football game, betting, and uncertainty about a distant digit of pi.
What it assumes
Assumes no strong prior statistics expertise and supplies a refresher on probability terminology and competing interpretations.
What you can do after
Evaluate uncertainty through frequentist frequencies or Bayesian confidence and prepare probabilistic abstractions for later decision-making.
How it connects
Connects probability to randomness, probability distributions, statistical inference, and Bayesian inference.

Also explained in

Compare how 16 books explain probability theory →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fabulous Adventures in Data Structures and Algorithms. The section links point to the parts of the book it draws on.