Category Archives: Python

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

Calculating distance from Lat & Lon coordinates using Python & Pandas

Given a GPS log file structured as follows (column separators omitted for clarity): Speed Latitud Longitud Time 2019-01-07 06:15:27 0 59.649582 17.721365 2019-01-07 06:16:28 0 59.649583 17.721372 2019-01-07 06:17:28 0 59.649583 17.721370 2019-01-07 06:18:28 0 59.649583 17.721372 2019-01-07 06:19:29 0 … Continue reading

Posted in Data Analytics, Math, Nautical Information Systems, Pandas, Python | Tagged , , , , | Leave a comment

Geolocation with Google API’s & Python – mapping addresses to GPS coordinates

Google does some pretty impressive things – not just all the web-based search stuff, but they also have lot’s and lot’s of really cool API’s for programmers to peruse. In order to access these API’s, you need a personal authorization … Continue reading

Posted in API, Data Analytics, Python, Web | Tagged , , , | Leave a comment