mechanics of probability calculations
Chapter 2
​To quote Pierre Laplace,
'The theory of probabilities is at bottom nothing but common sense reduced to calculation; it enables us to appreciate with exactness that which accurate minds feel with a sort of instinct for which ofttimes they are unable to account.'
In other words, probability reduces logic to calculation. This chapter explores the basic calculations used in probability theory, and their connection to elementary logic. You will learn how to combine probabilities from multiple events ("what's the probability of events A and B both occurring?", "what's the probability of event A or event B occurring"), as well as how to assign probability distributions to alternative outcomes for a single event. Along the way, you will explore several famous problems in probability, including the 'Monty Hall paradox', the 'Berkeley sex bias problem', and the 'optional stopping problem'.
​
Programming Asides:
-
logical statements [p56]
-
marginalization over nuisance parameters [p64]
-
urn probabilities #1 [p72]
-
urn probabilities #2 [p73]
-
speeding your simulations [p73]
-
posterior over urns [p74]
-
approximate posterior via simulation [p75]
-
two-stage simulation for n-card, m-queen monty hall [p77]
-
coins simulation [p78]
-
berkeley simulation [p80]
-
simulated sensitivity and specificity [p84]
-
positive predictive value at 3 months gestational latency [p85]
-
effect of base-rate on posterior predictive result [p85]
-
negative predictive value [p86]
-
decision rule for risking no more than a two-week hospital stay [p87]
-
simulation of positive result from a high-specificity diagnostic test [p88]
-
binomial and negative binomial multiplicity plots [p93]
-
binomial and negative binomial plots [p95]
-
plotting sampling surfaces [p101]
-
gaussian sampling-likelihood surface [p108]
-
multinomial sampling-likelihood surface [p111]
-
poisson sampling-likelihood surface [p115]