/ThinkStats2

Text and supporting code for Think Stats, 2nd Edition

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

ThinkStats2

Order Think Stats from Amazon.com.

Download this book in PDF.

Read this book online.

Read the related blog, Probably Overthinking It.

Think Stats is an introduction to Statistics and Data Science for Python programmers. If you have basic skills in Python, you can use them to learn concepts in probability and statistics and practical skills for working with data.

  • This book emphasizes simple techniques you can use to explore real data sets and answer interesting questions.

  • It includes case studies using datasets from the National Institutes of Health and other sources.

  • Many of the exercises use short programs to run experiments and help readers develop understanding.

This book is available under a Creative Commons license, which means that you are free to copy, distribute, and modify it, as long as you attribute the source and don’t use it for commercial purposes.

Working with the code

The easiest way to work with this code it to run it on Colab, which is a free service that runs Jupyter notebooks in a web browser. For every chapter, I provide two notebooks: one contains the code from the chapter and the exercises; the other also contains the solutions.

Chapter 1:

Examples from the chapter

Solutions to exercises

Chapter 2:

Examples from the chapter

Solutions to exercises

Chapter 3:

Examples from the chapter

Solutions to exercises

Chapter 4:

Examples from the chapter

Solutions to exercises

Chapter 5:

Examples from the chapter

Solutions to exercises

Chapter 6:

Examples from the chapter

Solutions to exercises

Chapter 7:

Examples from the chapter

Solutions to exercises

Chapter 8:

Examples from the chapter

Solutions to exercises

Chapter 9:

Examples from the chapter

Solutions to exercises

Chapter 10:

Examples from the chapter

Solutions to exercises

Chapter 11:

Examples from the chapter

Solutions to exercises

Chapter 12:

Examples from the chapter

Solutions to exercises

Chapter 13:

Examples from the chapter

Solutions to exercises

Chapter 14:

Examples from the chapter

Solutions to exercises

If you want to run these notebooks on your own computer, you can download them individually from GitHub or download the entire repository in a Zip file.

I developed this book using Anaconda, which is a free Python distribution that includes all the packages you'll need to run the code (and lots more). I found Anaconda easy to install. By default it does a user-level installation, so you don't need administrative privileges. You can download it here.