Statistics for Data Science and Analytics is a comprehensive guide to statistical analysis using Python, presenting important topics useful for data science such as prediction, correlation, regression, and data exploration. The authors provide an introduction to statistical science and big data, as well as an overview of Python data structures and operations.
This book presents relevant Python code in the second part of each chapter and provides the tools you need to implement the statistical procedures that are discussed in this book. Because many of these procedures are based on iterative resampling, rather than simply calculating formulas, you will get useful practice with the data handling and manipulation that is a Python strength. No specific level of Python ability is required to get started.
A range of statistical techniques are presented with their implementation in Python, including hypothesis testing, probability, exploratory data analysis, categorical variables, surveys and sampling, A/B testing, and correlation. The text introduces binary classification, a foundational element of machine learning, validation of statistical models by applying them to holdout data, and probability and inference via the easy-to-understand method of resampling and the bootstrap instead of using a myriad of “kitchen sink” formulas. Regression is taught both as a tool for explanation and for prediction.
This book is informed by the authors’ experience designing and teaching both introductory statistics and machine learning at Statistics.com. Each chapter includes practical examples, explanations of the underlying concepts, and Python code snippets to help readers apply the techniques themselves.
Statistics for Data Science and Analytics includes information on sample topics such as:
Int, float, and string data types, numerical operations, manipulating strings, converting data types, and advanced data structures like lists, dictionaries, and sets
Experiment design via randomizing, blinding, and before-after pairing, as well as proportions and percents when handling binary data
Specialized Python packages like numpy, scipy, pandas, scikit-learn and statsmodels—the workhorses of data science—and how to get the most value from them
Statistical versus practical significance, random number generators, functions for code reuse, and binomial and normal probability distributions
Written by and for data science instructors, Statistics for Data Science and Analytics is an excellent learning resource for data science instructors prescribing a required intro stats course for their programs, as well as other students and professionals seeking to transition to the data science field.
Introductory statistics textbook with a focus on data science topics such as prediction, correlation, and data exploration
Try It Yourself
Chapter 1
Section 1.6.1
Chapter 2
Section 2.6.3
Coin Toss Experiment
https://docs.google.com/spreadsheets/d/1CWgvp9xL7ZqAvAJorwC8pYn-doCFa7JeNqg9SucyIvs/edit?usp=sharing
Hospital Random Assignment
One option is to flip a coin for each hospital, to determine the assignment. This will probably not result in equal sized groups. To assure equal sized groups, we could write down the hospital names on cards, shuffle the cards, then deal them out into two equal sized groups.