liveBook · Manning

What you will learn in Statistics Every Programmer Needs

Practical Python implementations and quantitative methods

by Gary Sutton

Chapter by chapter

Chapter 1: Laying the groundwork

1.1 Stats and quant · 1.1.1 Understanding the basics · 1.1.2 Why they matter · 1.1.3 The broader effect · 1.1.4 Diving deeper: Core concepts · 1.2 Why Python? · 1.2.1 Rich ecosystem · 1.2.2 Ease of learning · 1.2.3 Online support and community · 1.2.4 Industry adoption · 1.2.5 Versatility · 1.3 Python IDEs · 1.3.1 IDLE: A starting point · 1.3.2 PyCharm: A professional tool · 1.3.3 Other popular IDEs · 1.4 Benefits and learning approach · 1.4.1 From statistical measures to real-world application · 1.4.2 Expanding beyond traditional techniques · 1.4.3 A balanced approach to theory and practice · 1.5 How this book works · 1.5.1 Foundational learning with exploration and practice · 1.5.2 Using Python for precision and efficiency · 1.5.3 Adaptable learning for diverse skill levels · 1.6 What this book does not cover · 1.7 Summary

What you learn in chapter 1 →

Chapter 2: Exploring probability and counting

2.1 Basic probabilities · 2.1.1 Probability types · 2.1.2 Converting and measuring probabilities · 2.2 Counting rules · 2.2.1 Multiplication rule · 2.2.2 Addition rule · 2.2.3 Combinations and permutations · 2.3 Continuous random variables · 2.3.1 Examples · 2.3.2 Probability density function · 2.3.3 Cumulative distribution function · 2.4 Discrete random variables · 2.4.1 Examples · 2.4.2 Probability mass function · 2.4.3 Cumulative distribution function · 2.5 Summary

What you learn in chapter 2 →

Chapter 3: Exploring probability distributions and conditional probabilities

3.1 Probability distributions · 3.1.1 Normal distribution · 3.1.2 Binomial distribution · 3.1.3 Discrete uniform distribution · 3.1.4 Poisson distribution · 3.2 Probability problems · 3.2.1 Complement rule for probability · 3.2.2 Quick reference guide · 3.2.3 Applied probability: Examples and solutions · 3.3 Conditional probabilities · 3.3.1 Examples · 3.3.2 Conditional probabilities and independence · 3.3.3 Intuitive approach to conditional probability · 3.3.4 Formulaic approach to conditional probability · 3.4 Summary

What you learn in chapter 3 →

Chapter 4: Fitting a linear regression

4.1 Primer on linear regression · 4.1.1 Linear equation · 4.1.2 Goodness of fit · 4.1.3 Conditions for best fit · 4.2 Simple linear regression · 4.2.1 Importing and exploring the data · 4.2.2 Fitting the model · 4.2.3 Interpreting and evaluating the results · 4.2.4 Testing model assumptions · 4.3 Summary

What you learn in chapter 4 →

Chapter 5: Fitting a logistic regression

5.1 Logistic regression vs. linear regression · 5.2 Multiple logistic regression · 5.2.1 Importing and exploring the data · 5.2.2 Fitting the model · 5.2.3 Interpreting and evaluating the results · 5.2.4 Calculating and evaluating classification metrics · 5.3 Summary

What you learn in chapter 5 →

Chapter 6: Fitting a decision tree and a random forest

6.1 Understanding decision trees and random forests · 6.2 Importing, wrangling, and exploring the data · 6.2.1 Understanding the data · 6.2.2 Wrangling the data · 6.2.3 Exploring the data · 6.3 Fitting a decision tree · 6.3.1 Splitting the data · 6.3.2 Fitting the model · 6.3.3 Predicting responses · 6.3.4 Evaluating the model · 6.3.5 Plotting the decision tree · 6.3.6 Interpreting and understanding decision trees · 6.3.7 Advantages and disadvantages of decision trees · 6.4 Fitting a random forest · 6.4.1 Fitting the model · 6.4.2 Predicting responses · 6.4.3 Evaluating the model · 6.4.4 Feature importance · 6.4.5 Extracting random trees · 6.5 Summary

What you learn in chapter 6 →

Chapter 7: Fitting time series models

7.1 Distinguishing forecasts from predictions · 7.2 Importing and plotting the data · 7.2.1 Fetching financial data · 7.2.2 Understanding the data · 7.2.3 Plotting the data · 7.3 Fitting an ARIMA model · 7.3.1 Autoregression (AR) component · 7.3.2 Integration (I) component · 7.3.3 Moving average (MA) component · 7.3.4 Combining ARIMA components · 7.3.5 Stationarity · 7.3.6 Differencing · 7.3.7 Stationarity and differencing applied · 7.3.8 AR and MA components · 7.3.9 Fitting the model · 7.3.10 Evaluating model fit · 7.3.11 Forecasting · 7.4 Fitting exponential smoothing models · 7.4.1 Model structure · 7.4.2 Applicability · 7.4.3 Mathematical properties · 7.4.4 Types of exponential smoothing models · 7.4.5 Choosing between ARIMA and exponential smoothing · 7.4.6 SES and DES models · 7.4.7 Holt–Winters model · 7.5 Summary

What you learn in chapter 7 →

Chapter 8: Transforming data into decisions with linear programming

8.1 Problem formulation · 8.1.1 The scenario · 8.1.2 The challenge · 8.1.3 The approach · 8.1.4 Feature summaries · 8.2 Developing the linear optimization framework · 8.2.1 Explanation of linear equations and inequalities · 8.2.2 Data definition · 8.2.3 Objective function · 8.2.4 Constraints · 8.2.5 Decision variable bounds · 8.2.6 Solving the linear programming problem · 8.2.7 Result evaluation · 8.3 Summary

What you learn in chapter 8 →

Chapter 9: Running Monte Carlo simulations

9.1 Applications and benefits of Monte Carlo simulations · 9.2 Step-by-step process · 9.3 Hands-on approach · 9.3.1 Establishing a probability distribution (step 1) · 9.3.2 Computing a cumulative probability distribution (step 2) · 9.3.3 Establishing an interval of random numbers for each variable (step 3) · 9.3.4 Generating random numbers (step 4) · 9.3.5 Simulating a series of trials (step 5) · 9.3.6 Analyzing the results (step 6) · 9.4 Automating simulations on discrete data · 9.4.1 Plotting and analyzing the results · 9.5 Automating simulations on continuous data · 9.5.1 Predicting stock prices with Monte Carlo simulations · 9.5.2 Analyzing historical data (step 1) · 9.5.3 Calculating log returns (step 2) · 9.5.4 Computing statistical parameters (step 3) · 9.5.5 Generating random daily returns (step 4) · 9.5.6 Simulating prices (step 5) · 9.5.7 Simulating multiple trials (step 6) · 9.5.8 Analyzing the results (step 7) · 9.6 Summary

What you learn in chapter 9 →

Chapter 10: Building and plotting a decision tree

10.1 Decision-making without probabilities · 10.1.1 Maximax method · 10.1.2 Maximin method · 10.1.3 Minimax Regret method · 10.1.4 Expected Value method · 10.2 Decision trees · 10.2.1 Creating the schema · 10.2.2 Plotting the tree · 10.3 Summary

What you learn in chapter 10 →

Chapter 11: Predicting future states with Markov analysis

11.1 Understanding the mechanics of Markov analysis · 11.2 States and state probabilities · 11.2.1 Understanding the vector of state probabilities for multistate systems · 11.2.2 Matrix of transition probabilities · 11.3 Equilibrium conditions · 11.3.1 Predicting equilibrium conditions programmatically · 11.4 Absorbing states · 11.4.1 Obtaining the fundamental matrix · 11.4.2 Predicting absorbing states · 11.4.3 Predicting absorbing states programmatically · 11.5 Summary

What you learn in chapter 11 →

Chapter 12: Examining and testing naturally occurring number sequences

12.1 Benford’s law explained · 12.2 Naturally occurring number sequences · 12.3 Uniform and random distributions · 12.3.1 Uniform distribution · 12.3.2 Random distribution · 12.3.3 Plotted distributions · 12.4 Examples · 12.4.1 Street addresses · 12.4.2 World population figures · 12.4.3 Payment amounts · 12.5 Validating Benford’s law · 12.5.1 Chi-square test · 12.5.2 Mean absolute deviation · 12.5.3 Distortion factor and z-statistic · 12.5.4 Mantissa statistics · 12.6 Summary

What you learn in chapter 12 →

Chapter 13: Managing projects

13.1 Creating a work breakdown structure · 13.2 Estimating activity times with PERT · 13.3 Finding the critical path · 13.3.1 Earliest times · 13.3.2 Latest times · 13.3.3 Slack · 13.3.4 Finding the critical path programmatically · 13.4 Estimating the probability of project completion · 13.5 Crashing the project · 13.6 Summary

What you learn in chapter 13 →

Chapter 14: Visualizing quality control

14.1 Quality control measures · 14.1.1 Upper control limit and lower control limit · 14.1.2 Mean and center line · 14.1.3 Standard deviation · 14.1.4 Range · 14.1.5 Sample size · 14.1.6 Proportion defective · 14.1.7 Number of defective items · 14.1.8 Number of defects · 14.1.9 Defects per unit · 14.1.10 Moving range · 14.1.11 z-score · 14.1.12 Process capability indices · 14.2 Control charts for attributes · 14.2.1 p-charts · 14.2.2 np-charts · 14.2.3 c-charts · 14.2.4 g-charts · 14.3 Control charts for variables · 14.3.1 x-bar charts · 14.3.2 r-charts · 14.3.3 s-charts · 14.3.4 I-MR charts · 14.3.5 EWMA charts · 14.4 Summary

What you learn in chapter 14 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.