CSCI 379 before-class tasks for Oct 22: probability

to read

AIMA chapter 12: sections 1 and 2.

Key notions: all the basic probability. Distribution (for us, it’s always discrete, can think of a histogram / bar chart). Conditional probability. Joint distribution. Marginal distribution.

The product rule & variations: P(a ∧ b) = P(a|b)P(b)

(If you’re ambitious: use that to derive Bayes’ rule: do P(a ∧ b), use the above, then do the same to P(b ∧ a), equate, and rearrange.)

Be careful with their notation, which can sometimes seem complicated but almost always refers to something quite simple. In particular, see how their bold-face variables refer to vectors/distributions and not single values. Also pay attention to uppercase and lowercase letters; sometimes the distinction is important.

Section 12.2.3 on probability axioms isn’t important. Don’t completely ignore it, but don’t let it take too much time.

Also sections 12.3 and 12.4. I find it easy to visualize full joint distribution as just an n-dimensional rectangular prism divided into small sub-prisms, each with a probability for a particular event.1

Section 12.4 is on independence, a crucial idea. See how it vastly shrinks our problem space, and how, roughly, it ‘reduces exponential to linear’.

do some practice

Work through some basic probability exercises. Either search for these topics and find some examples and tutorials (Examples that may be good – I haven’t checked – include Khan Academy, brilliant.org, Paul’s Online Notes, and so on).

You could also ask a chatbot – try a prompt like this:

I’m a CS student taking a Foundations of AI course and we’re studying chapter 12 of Artificial Intelligence: a Modern Approach. I’d like to review and practice basic ideas of probability, including conditional probability, the product rule, joint distributions, and marginal distributions.

Please make some problems on those topics for me to work on. Vary the difficulty and type of question to be good practice for the ideas needed to learn about how AI systems can do probabilistic inference, including perhaps some of the very basics of Bayes’ rule.

Don’t include any answers yet; I’ll do the problems and come back for those later.

You could customize that to add specific things you’re confused about, or just want to know more about, or follow up and have it generate more questions or things to consider.

give me some feedback

Like last time: I do want to make sure I’m doing a good job calibrating these tasks. Email me and tell me: was this too long? Too hard? Useful or not? Did you like it? If you asked a chatbot to make some problems, I’d love to see your chat – share it if you feel comfortable.

To paraphrase the Youtubers, smash that email button.2


  1. maybe that’s just me. If you’re not so mathematically- or geometrically-minded, don’t worry.↩︎

  2. They all tell you to “smash” the subscribe button. Why is it always “smash”?↩︎