Category Archives: Python

More Mindbending Probability

In a previous post, I discussed the seemingly unintuitive logic of the famous Monty Hall Problem. However, with some careful thinking, even without resorting to Monte Carlo Simulation, I’m able to make sense of that apparent paradox. However, the paradox … Continue reading

Posted in Math, Numpy, Pandas, Probability, Python | Tagged , | 2 Comments

Covid-19 Sweden: A summary

Sweden has been painted as the Black Sheep of the international community with respect to its ways to deal with the Covid-19 virus.  People and orginizations around the world were very quick to paint Sweden as the Sodom & Gomorra … Continue reading

Posted in Bayes, Data Analytics, Epidemics, MCMC, Pandas, Politik, Probability, PYMC, Python, Society, Statistics, Sverige | Tagged , , , , , , , , , , , | 4 Comments

Corona Sweden : Infection Fatality Rate

It’s been a while ago since I ran my MCMC-hack to estimate the Swedish Infection Fatality Rate, main reason being that each run takes an awful lot of computing time, around 10h, to get the MCMC to converge… and during … Continue reading

Posted in Bayes, Data Analytics, Epidemics, MCMC, Pandas, Probability, PYMC, Python, Statistics | Tagged , , , , , , , , , | Leave a comment

Corona Sweden – Herd Immunity matters

Sweden, and particularily the Swedish chief epidemiologist Anders Tegnell, as well as his predecessor/mentor Johan Giesecke, have received huge amounts of critizism for the “Swedish Strategy” fighting Corona. A key component of Tegnell’s & Giesecke’s rationale for not recommending Lockdown … Continue reading

Posted in Epidemics, Probability, Python, Simulation | Tagged , , , | Leave a comment

Fooled by Averages and Ignorant of Uncertainty – Bayesian Inference to assistance

As a follow up to my previous posts [1,2,3] on the danger’s of relying upon averages, and Simpson’s paradox, which is a consequence of misused averaging, here’s yet another angle on the same topic. Let’s first resume with the baseball … Continue reading

Posted in Bayes, Data Analytics, Gambling, Pandas, Probability, PYMC, Python, Statistics | Tagged , , , , , , | 3 Comments

The Metropolis-Hastings MCMC algorithm, implemented in Python

I’ve been using MCMC for quite a few years now, but always as a “Black Box”, that is, I’ve used tools such as PYMC or Stan, that implement different MCMC algorithms.  Until now, I’ve never opened up the Black Box, … Continue reading

Posted in Probability, Python | Tagged , , | Leave a comment

Corona – What’s the true Mortality Rate, and how many infected are there, anyways…? [in all likelihood, some good news!]

[Note: this is a somewhat technical / mathematical article, so those of you who only want the daily Corona updates, “the current numbers”, might want to skip this one] As we all probably know by now, the official numbers on … Continue reading

Posted in Bayes, Data Analytics, Epidemics, Finance, Pandas, Probability, Pystan, Python, Research, Simulation, Society, Statistics | Tagged , , , , , , , | Leave a comment

Corona update 2020-03-11

It seems that I’m going to do daily updates on the spread of Corona virus until further notice, so I’ve changed the post title accordingly. Since I can’t bother to explain all the graphs every time, here’s a boiler plate … Continue reading

Posted in Bayes, Data Analytics, Epidemics, Pandas, Politik, Probability, PYMC, Python, Research, Society, Statistics, Sverige | Tagged , , , , , , , , | Leave a comment

Corona : slowing down…?

Some further analysis on Corona, with data up and including yesterday. First, let’s look at the global spread: The first of these plots has linear (lin/lin) scale, and should be familiar from any of the many sites that post data … Continue reading

Posted in Bayes, Data Analytics, Epidemics, Numpy, Pandas, Probability, PYMC, Python, Research, Society, Statistics, Sverige | Tagged , , , , , , , , , , , | Leave a comment

Garmin Heart Rate Monitor – Data Analysis

A friend of mine is a keen endurance athlete, and he kindly provided me with a Garmin Heart Rate Monitor  GPS data file from one of his recent races, for analysis. The monitor collects data on time, position (lat,lon), altitude, … Continue reading

Posted in Bayes, Data Analytics, Pandas, Probability, PYMC, Python, sports, Statistics | Tagged , , , , , , , , | Leave a comment