Learning Statistics with Python

(Python Adaptation by Ethan Weed)

I am a huge fan of Danielle Navarro’s book Learning Statistics with R. It is the most accessible statistics book I know of. My students love it. I love it. It’s free, and it comes in not only R, but also JASP and JAMOVI flavors. The only problem is, I need to teach intro stats using Python, not R. What to do? Translate the book, obviously!

Since Danielle has been so kind as to open-source the book, I have gone to work translating the R bits to Python, and am learning a lot along the way. To start with, I’m concentrating on translating the code, and putting off editing the textual references to R and R-specific functions for later. Having started with just the code, I have now realized that a better approach is to go through the text line-by-line, and do the job properly the first time. It’s a bit slower this way, but ultimately better, I think.

It’s hard to say how far I’ll get, but for now I’m having fun, and am excited that the students in my course won’t have to forego this fantastic book, just because they need to do their stats in Python.

Update: having by now gotten as far as figuring out how to use Python to overlay the probability density for an F-distribution on top of a distribution created by taking the ratio of scaled random samples from two chi-square distributions, I think I’m committed to seeing this thing through.

Thanks very much to Danielle for the encouragement, and to Emily Kothe for the bookdown adaptation of LSR, which has been extremely helpful in creating this Python version.

Learning Statistics with Python by Danielle Navarro and Ethan Weed is licensed under CC BY-SA 4.0