# Probability Theory

*Probability theory* is how we discuss likelihood of events. But more than that, it is how we reason about how events *affect each other*. "What is the chance that it will rain on my wedding day?" is a question about the likelihood of two events happening *together*. "Are white cars more likely to be in accidents?" is a question about the probability of one event *given the other*, it is an example of *conditional probability*. Probability gives us tools to *compute* the answer to such question given quantities *we know*. For example, if we know for each color how many cars of that color are, and how many accidents cars of this color had, we can easily check if white cars are involved in more accidents than the average car.

For the purpose of this book, it suffices to do probability like they did in the 1800s. While there *is* a formal way to define what an "event" is, but I will just denote events as abstract letters such as $$A$$, $$B$$. I will also be sweeping under the rug all sorts of details that really deserve space in any real introduction to probability, such as independence.

For a fun formal treatment accessible to early undergrads, I recommend Sheldon Ross' [First Course in Probability](https://www.cs.utexas.edu/~abdonm/SDS%20321/a_first_course_in_probability.pdf).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shai-deshe.gitbook.io/understanding-blockdags-and-ghostdag/supplementary-material/math/probability-theory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
