Two fun R packages

Pinference: Probability Inference for Propositional Logic. “Implementation of T. Hailperin’s procedure to calculate lower and upper bounds of the probability for a propositional-logic expression, given equality and inequality constraints on the probabilities for other expressions. Truth-valuation is included as a special case. Applications range from decision-making and probabilistic reasoning, to pedagogical for probability and logic courses.”

RobinCar2: ROBust INference for Covariate Adjustment in Randomized Clinical Trials. “Performs robust estimation and inference when using covariate adjustment and/or covariate-adaptive randomization in randomized controlled trials.” Though see this post.

Four ways to calculate the probability that if it rains, I have an umbrella

This post shows four ways to calculate the conditional probability that I have an umbrella, given that it’s raining, \(P(umbrella|raining)\). The first way uses the ratio formula, \(P(raining \land umbrella)/P(raining)\). The second uses a three-valued logical connective, the conditional event, which can be traced back to the work of Bruno de Finetti in the 1930s (see, e.g., Baratgin, 2021). The third filters the dataset to rows where it’s raining before counting the proportion of those where I had an umbrella. The fourth uses logistic regression.