Chapter Topics#
The chapters progress from Python fundamentals and data handling with NumPy and pandas to data visualization, simulation-based inferential statistics, and introductory machine learning. Preview, Lab, and Homework activities accompany each chapter.
Chapter |
Topics |
|---|---|
What data science is; the data science process; data science careers and tools; programming languages and levels of abstraction; interpreted and compiled languages; programming constructs; expressions and statements; number systems and character encoding. |
|
Input, output, and f-strings; variables and built-in data types; operators and precedence; conditionals and logical operators; |
|
Creating arrays with |
|
Creating and indexing Series; reading CSV, Excel, HTML, and SQL data; creating and inspecting DataFrames; selecting data with |
|
Choosing a chart from the business question; the pandas |
|
Stateful and object-oriented syntax; labels, titles, and legends; multiple plots with subplots; manual axes placement; figure size, resolution, and saving; |
|
Comparing Seaborn with pandas and Matplotlib; tidy and wide data formats; figure-level and axes-level APIs; distribution, relational, and categorical plots; faceting with |
|
Probability models, events, complements, and expected value; populations, samples, variables, and distributions; center, spread, and outliers; visualizing one variable; normal, binomial, and uniform distributions; the Central Limit Theorem and the law of large numbers; parameters, statistics, and sampling distributions; standard error, margin of error, and sample size. |
|
Assessing a model by simulation; choosing a test statistic; total variation distance and survey representativeness; the four steps of a test; p-values and conventional cutoffs; Type I and Type II errors; statistical vs. practical significance. |
|
Random sampling versus random assignment; A/B testing with percentage points and relative lift; permutation tests and p-values; observational comparisons and confounding; potential outcomes and randomized controlled trials; combining small studies. |
|
Percentiles and quartiles for delivery-time promises; populations, parameters, and estimates; bootstrap resampling of real state pay data; the bootstrap distribution of a sample median; bootstrap confidence intervals for medians, means, and proportions; limits of the bootstrap percentile method. |
|
The correlation coefficient; association versus causation; standard units; the regression line and the regression effect; fitted values and slope; root mean squared error; least squares; residual diagnostics for nonlinearity and heteroscedasticity; bootstrap confidence intervals for the slope. |
|
Machine-learning framing; train/test split; fitting a linear regression model with scikit-learn on real home sales; regression evaluation metrics; interpreting coefficients and multicollinearity; nearest neighbors for regression; overfitting, validation, and interpretability. |
|
Classification problems with real online-shopping sessions; rule-based and nearest neighbor classifiers; decision boundaries; k-nearest neighbors; feature scaling; training and test sets; classifier accuracy and the baseline; choosing k with a validation set. |
|
k-NN with scikit-learn, scaling, and pipelines; choosing k with a validation set; baselines and imbalanced classes; confusion matrices; precision, recall, and F1; the business cost of errors; logistic regression, predicted probabilities, and decision thresholds. |
|
Clustering as a management tool; similarity, features, and scale; common clustering methods; the k-means workflow; choosing k with elbow and silhouette checks; describing and interpreting clusters; principal component analysis (optional). |
Set up your environment with Course Tooling and Jupyter Setup in the appendices before the first lab.