block by tophtucker 3497751d1ae936f92f3fbf00e17e4a54

Bayes (WIP 2)

Full Screen

Instructions: Click and drag black labels along edges; click gray labels to switch to controlling those.

From a friend in business school: “1. What’s the probability of a HS athlete going pro? 2. Suppose we know a pro athlete. What’s the probability she was a college athlete?”

Probability tree

So I was thinking about my favorite intuitive illustrations and explanations of conditional probability and Bayes’ theorem, e.g.

The Victor Powell / Setosa one in particular is unbeatably excellent, I think. But I wanted to try this. It feels more intutive to me that P(A) and P(B) should be perpendicular. In particular, it makes independence of A and B easy to see: the black and gray lines exactly overlap; P(A) = P(A|B).

When there’s some dependence, I’m interested by the diagonal line you get between the midpoints of the P(B|A) line and the P(B|¬A) line. It’s not shown by default cuz it got noisy, but it’s the diagonal line you see in-between switching between black and gray parameter sets. I can imagine (and want to try) an alternate control scheme where you just have an intersection you can drag around inside the box and an angle for the diagonal line. That’s equally expressive as this scheme, and sorta interesting, because the angle of the diagonal line is so related (somehow?) to the, uh, covariance or w/e.

One cool thing about this is that you can feel out which things are linear and which are not. The slope of the diagonal line is independent of P(A), which I would not have intuited. And P(A|B) and P(A|¬B) are nonlinear functions of P(A), P(B|A), and P(B|¬A), which I don’t think I had any intuition about, but feels central to a lot of counterintuitive results of conditional probability questions.

As nice as it is to “feel out”, I want to be able to SEE any of those things I feel — spatialize the state space. Plot everything as a function of everything else, see the steepest slopes, marginal sensitivities, etc. A kind of phase space, idk. Ideally with the same visualization. Explode it along a third axis of all possible values of the current parameter… yessssssss that’d be so good, so doable. Whichever parameter you’re currently holding, explode out all possible values along the z-axis, so you can see the nonlinear effects of dragging by dx.

I still want to make something that captures some feeling I have of weighing prior and posterior confidences, and the updating flowing one way or the other accordingly, almost hydraulically.

Discussion question ideas, like if I were trying to teach this

To-do

See also

index.html