Blog

Successive Wins, from Fifty Challenging Problems in Probability

November 13, 2023
probability

The author poses the following problem: To encourage Elmer’s promising tennis career, his father offers him a prize if he wins (at least) two tennis sets in a row in a three-set series to be played with his father and the club champion alternately: father-champion-father (FCF) or champion-father-champion (CFC), according to Elmer’s choice. The champion is a better player than Elmer’s father. Which series should Elmer choose? The answer is CFC, and the author emphasizes, after listing all the possible sequences, the importance of the middle match where a victory must absolutely be scored. ...

Praising learning accidents

October 8, 2023
learning

I have always been an unremarkable football player. I occasionally joined some informal games in the breaks between classes. More when I was younger, and less often as I grew older. By middle school (grades 7-9) I barely played. I was much more successful at miniature sports: ping pong or table soccer. However I remember this one afternoon in 8th grade, when I joined a game by the insistence of my classmates. ...

Derivatives, integrals, anti-derivatives and anti-integrals

April 10, 2022
calculus
integration, differentiation

import numpy as np import matplotlib.pyplot as plt import seaborn seaborn.set_style('darkgrid') seaborn.set(font_scale=1.2) def draw_arrows(ax, top_from, top_to, top_text_xy, bottom_from, bottom_to, bottom_text_xy, diff_top=True): text_top = "Differentiation" text_bottom = "Integration" if not diff_top: text_top, text_bottom = text_bottom, text_top ax.annotate( "", top_from, top_to, xycoords="axes fraction", size="large", ha="left", va="center", arrowprops=dict( arrowstyle="->", color="k", lw=2, connectionstyle="angle3,angleA=50,angleB=-50", ), ) ax.text(*top_text_xy, text_top, transform=ax.transAxes, ha="center") ax.annotate( "", bottom_from, bottom_to, xycoords="axes fraction", size="large", ha="left", va="center", arrowprops=dict( arrowstyle="->", color="k", lw=2, connectionstyle="angle3,angleA=50,angleB=-50", ), ) ax. ...

A simple Sequential Monte Carlo algorithm for posterior approximation

August 6, 2021
probability
algorithm, SMC

Introduction # Sequential Monte Carlo (SMC) can be used to take samples from posterior distributions, as an alternative to popular methods such as Markov Chain Monte Carlo (MCMC) like Metropolis-Hastings, Gibbs Sampling or more state-of-the-art Hamiltonian Monte Carlo (HMC) and No-U-Turn Sampler (NUTS). Instead of creating a single Markov Chain, SMC works by keeping track of a large population of samples, which, in a similar spirit to Genetic Algorithms can be “selected” and “mutated” to evolve a better “fit” to the posterior distribution. ...

A most unprincipled derivation of the gamma distribution

July 13, 2021
probability
gamma, pdf, cdf

Introduction # In this article I will derive the gamma distribution in a most unprincipled way. Why? First, there are many good resources out there explaining how to derive the gamma distribution from first principles, usually involving these idealized things called poisson processes. These are great sources and I would definitely recommend them. This one by Aerin Kim is amazing. However, more often than not, people use gamma distributions in real world problems for much more mundane reasons: It’s a well behaved yet flexible positive continuous distribution. ...