Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Peter Bruce, Andrew Bruce, Peter Gedeck

Statistical methods are a key part of data science, yet few data scientists have formal statistical training. Courses and books on basic statistics rarely cover the topic from a data science perspective. The second edition of this popular guide adds comprehensive examples in Python, provides practical guidance on applying statistical methods to data science, tells you how to avoid their misuse, and gives you advice on what’s important and what’s not. Many data science resources incorporate statistical methods but lack a deeper statistical perspective. If you’re familiar with the R or Python programming languages and have some exposure to statistics, this quick reference bridges the gap in an accessible, readable format. With this book, you’ll learn: Why exploratory data analysis is a key preliminary step in data science How random sampling can reduce bias and yield a higher-quality dataset, even with big data How the principles of experimental design yield definitive answers to questions How to use regression to estimate outcomes and detect anomalies Key classification techniques for predicting which categories a record belongs to Statistical machine learning methods that "learn" from data Unsupervised learning methods for extracting meaning from unlabeled data

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
# Practical Statistics for Data Scientists, 2nd Edition: 50+ Essential Concepts Using R and Python ## 【One-Line Pitch】 A practical, concept-first reference that bridges the gap between traditional statistics and modern data science, showing R and Python practitioners which statistical methods actually matter, how to apply them correctly, and where they're commonly misused. Ideal for working data scientists and analysts who need statistical grounding without a formal statistics background. ## 【Book Arc】 - **Opening (~0%–9%)**: Sets up the book's core premise—that data scientists need statistics but rarely get it taught from their perspective—and introduces the structure: each chapter covers essential concepts with dual R/Python implementations, key terms, and "further reading" pointers. - **Early (~9%–28%)**: Dives into Exploratory Data Analysis (EDA), covering estimates of location and variability, percentiles and boxplots, frequency tables, histograms, density plots, and correlation analysis. Includes practical visualization techniques like hexagonal binning, contour plots, and faceted charts using ggplot2 and seaborn. - **Early (~28%–38%)**: Moves into data sampling and the bootstrap, explaining sampling bias (including self-selection bias), sampling distributions, the central limit theorem, standard error, and how to implement bootstrap resampling in both R and Python to estimate variability and confidence intervals. - **Middle (~38%–47%)**: Covers probability distributions—the normal distribution, Student's t-distribution, Poisson, and chi-square—with emphasis on when each applies and the dangers of assuming normality (e.g., underestimating "black swan" events). Introduces the chi-square statistic for goodness-of-fit and independence testing. - **Middle (~47%–end)**: Transitions into statistical experiments and significance testing, experimental design, and then regression, classification, statistical machine learning, and unsupervised learning methods (including hierarchical and model-based clustering, scaling, and Gower's distance for mixed data). ## 【Key Takeaways】 - **EDA is the essential first step** (Early): Before any modeling, explore distributions, outliers, and correlations—percentiles, boxplots, and density plots reveal data shape and problems that summary statistics alone miss. - **Robust statistics resist outliers** (Early): Median, trimmed mean, and median absolute deviation are less sensitive to extreme values than mean and standard deviation; choose them when data has heavy tails or anomalies. - **Sampling bias is a data quality killer** (Early): Self-selection bias (like Yelp reviews) and other non-random sampling methods corrupt datasets; random sampling reduces bias and improves quality even with big data. - **The bootstrap is your friend** (Middle): Resampling from your data (with replacement) gives you standard errors and confidence intervals without complex math—implementable in a few lines of R or Python. - **Most data is not normally distributed** (Middle): Assuming normality can lead to underestimating extreme events; know when to use t-distributions, Poisson (for event counts), and chi-square (for categorical counts). - **The chi-square statistic measures departure from expectation** (Middle): It's the foundation for goodness-of-fit tests and determining whether treatments differ (A/B/C tests) by comparing observed vs. expected counts. - **Experimental design matters for causal claims** (Middle): Properly designed experiments—not just observational data—yield definitive answers to questions; this is a cornerstone of statistical practice. - **Clustering mixed data requires care** (Late): Scaling variables and handling categorical data (e.g., Gower's distance) are critical for meaningful unsupervised learning results. ## 【Reading Tips】 - **Skim the code blocks if you're fluent in one language**: The book provides parallel R and Python examples; focus on the language you use less to expand your toolkit, or skim both for conceptual reinforcement. - **Deep-read Chapter 1 (EDA)**: It's foundational—the visualization techniques (boxplots, density plots, hexagonal binning, faceting) and robust statistics concepts appear throughout the rest of the book. - **Pay attention to "Key Ideas" and "Key Terms" boxes**: These distill each section into memorable takeaways; if you're short on time, read these first to decide what deserves a deep dive. - **Work through the bootstrap section carefully**: It's conceptually simple but often misunderstood; the R and Python implementations are short enough to run yourself and verify the results. - **Use the "Further Reading" sections as a syllabus**: The book points to classic texts (like Taleb's *The Black Swan* and Salsburg's *The Lady Tasting Tea*) that deepen understanding without being strictly necessary. ## 【Coverage Limits】 This guide covers the book's opening through the middle sections (EDA, sampling, distributions, and the start of significance testing). The excerpts do not cover the later chapters on regression, classification, and machine learning in detail, though the table of contents confirms their presence. ##
Page 7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Elements of Structured Data 2 Further Reading 4 Rectangular Data 4 Data Frames and Indexes 6 Nonrec...
View in text
Excerpt 2
the 10th, 20th, …, 90th percentiles). Percentiles are espe‐ cially valuable for summarizing the tails (the outer range) of the distribution. Popular culture...
View in text
Excerpt 3
the initiative to write. This leads to self-selection bias— the people motivated to write reviews may have had poor experien‐ ces, may have an association wi...
View in text
Excerpt 4
all categories. This process standardizes the statistic so it can be compared to a reference distribution. A more general way of putting this is to note that...
View in text
Excerpt 5
., by David Freedman, Robert Pisani, and Roger Purves (W. W. Norton, 2007), and The Basic Practice of Statistics, 8th ed., by David S. Moore, William I. Notz...
View in text
Excerpt 6
k, we will use the terms predictor and feature interchange‐ ably. Consider the scatterplot in Figure 4-1 displaying the number of years a worker was exposed...
View in text
Excerpt 7
Prediction Using Regression | 161 Different Factor Codings There are several different ways to encode factor variables, known as contrast coding systems. For...
View in text
Excerpt 8
m the full regression equation. A partial residual for pre‐ dictor Xi is the ordinary residual plus the regression term associated with Xi: Partial residual...
View in text
Tags
AI categories
DataProgramming LanguageProgramming
ISBN: 149207294X
Publisher: O'Reilly Media
Publish Year: 2020
Language: English
Pages: 363
File Format: PDF
File Size: 16.0 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…