Articles


Strømstøtte, fastpris, makspris og insentiver

(Norwegian) Ap vil bytte ut strømstøtte med fastpris, mens Frp og KrF vil ha makspris. Økonomer påpeker at insentiver forsvinner med fastpris. Vi kan fikse politikernes forslag ved hjelp av enkel matematikk på VGS-nivå: logaritmer og eksponentialfunksjoner.


Beer tasting

A beer tasting experiment provides a nice everyday application of statistical modeling and hypothesis testing.


Papers read in 2024

A list of papers read in 2024 as part of a paper reading club. The papers cover data science, recommendation engines, continuous optimization, operations research, information theory and statistics.



The average value

Presentation slides and video of a talk I gave about notions of averages (one-parameter models), loss functions and simple machine learning problems.


Smooth taxes without brackets

Implementing the Norwegian income tax is a pain. It requires keeping track of various deductions, if-then-else rules and around 20 constants. In this article we introduce a smooth tax function, simplifying the computation to a single formula with two constants.


Arithmetic coding in Python

We shrink Dostoevsky’s “Crime and Punishment” to its limit using arithmetic coding. This article showcases my Python implementation of the algorithm.


Turnusplaner for sykepleiere

(Norwegian) Dårlige vaktplaner kan være en kilde til frustrasjon, og gode vaktplaner har stor samfunnsøkonomisk gevinst. Matematisk optimering kan finne gode turnuser på noen få sekunder.


The reverse pseudo-Huber loss function

The Huber loss function behaves like squared loss for small values and like absolute loss for large values. In this article we reverse the pseudo-Huber, creating a smooth function that behaves like absolute loss for small values and like squared loss for large values.






Ny rekord på Oslo Børs

(Norwegian) Medier rapporterer gjerne om tidsserier: dødsfall i trafikken, strømpriser, arbeidsledighet, EU-oppslutning, fødselstall, valutakurser, renter, og så videre. Ofte blir det meldt om nye rekorder, men hvor uvanlig er det egentlig at nye rekorder blir satt?


Visualizing software development skills with embeddings

We study a dataset consisting of software developers and their skills. The data is a large binary matrix, which we factorize to predict the probability that each developer has each skill. From the model we obtain an embedding, which we use to visualize skills in a two-dimensional space.





Betting on football - results

Throughout 2023 I’ve been using math to make bets on football matches. I created one statistical model to predict outcome probabilities and one optimization model to size bets.