Posts by Year


Running models forwards and backwards

7 minute read

The value of simulations is highighted by Dr. McElreath throughout his textbook and by van de Schoot and colleagues. I didn’t entirely appreciate its value u...


Exploring modeling failure

20 minute read

In my last post, I gave an example of a multilevel model using a binomial generalized linear model (GLM). The varying intercept model helped illustrate pa...

Multilevel modeling with binomial GLM

14 minute read

I’ve been on a journey learning multilevel models and Bayesian inference through Richard McElreath’s Statistical Rethinking book. The concepts of shrinkage a...

Extending the chain

less than 1 minute read

Last month, I wrote about how I aimed to make daily contributions towards my goals, no matter how small. Not surprisingly, it has been challenging. Neverthel...

Vectorization with and broadcasting

4 minute read

Vectorization and broadcasting are tricks I have used sparingly and absent-mindedly if at all. However, it is a critical skill for algorithmic code to run ef...

The chain

1 minute read

Yesterday morning, I continued my habit of reading a chapter from the book Atomic Habits by James Clear. The chapter described the importance of showing up a...

PyMC linear regression part 1: PyMC objects

25 minute read

I previously wrote about my discovery of Statistical Rethinking. The book’s title could not be more spot-on–it’s helped me look at statistics in a different ...

Doing easy

1 minute read

I’ve struggled to write consistently. Part of the reason for this is because I’m prone to self-censorship. Even as I type this, my mind is talking to itself....

14 years

2 minute read

This site is about my data science journey but various posts indicate my love for baseball. It starts with my GitHub handle: benslack19. Let’s break it down....

Rethinking Bayes

7 minute read

A few weeks ago, I learned about the wonderful Statistical Rethinking lecture series and book by Richard McElreath. It’s made me think about some of the Baye...

Looking back and looking ahead

2 minute read

A year ago, I was anxious and excited about a planned life change. I had put in my notice and would start a data science program on January 13, 2020. I had b...


Bayes-ball part 2: a more realistic prior

8 minute read

I meant to post this some time ago, but I have been busy. But with the baseball example I am using, it is only fitting that I post this now, just after this ...

Histograms and recursion in SQL

10 minute read

A few weeks ago, while making a histogram in a SQL query, I discovered that some solutions out there do not include bins with 0 counts. This bugged me so I f...

F-in statistics!

9 minute read

I recently read this passage in the section on multiple linear regression from the fantastic book Introduction to Statistical Learning:

PostgreSQL and Jupyter notebooks

1 minute read

PostgreSQL is one of the most popular variants of SQL. It is common to use PostgreSQL with pgadmin but I am not a big fan of their UI. By contrast, interacti...

Improving my writing

6 minute read

Introduction I have identified writing well as a skill I will prioritize. This improved skill will benefit both smaller forms I have taken for granted (like...


Iterators in Python

3 minute read

One of the things about Python that I haven’t fully appreciated are the use of iterators. I’ll go over some iterators that are a part of base Python and then...

Heads or tails?

5 minute read

Seems like every statistics class starts off with a coin toss. It’s simple enough for me. Some fancy teachers might start right off the bat and get into the ...


Applying logistic regression in Python

8 minute read

…from lessons learned from Andrew Ng’s ML course. Like other assignments of the course, the logistic regression assignment used MATLAB. Here, I translate MAT...