Chapter Topics

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

1. Introduction

What data science is; the data science process; data science careers and tools; programming languages and levels of abstraction; interpreted and compiled languages; expressions and statements; number systems and character encoding.

2. Python Basics

Input, output, and f-strings; variables and built-in data types; operators and precedence; conditionals and logical operators; while and for loops; lists, indexing, and slicing; dictionaries and counting; user-defined functions and scope.

3. NumPy Arrays

Creating arrays with array, arange, and reshape; array attributes; indexing and slicing 2-D arrays; vectorized operations and universal functions; aggregations along an axis; broadcasting; masking and fancy indexing; sorting and random number generation.

4. Pandas

Creating and indexing Series; reading CSV, Excel, HTML, and SQL data; creating and inspecting DataFrames; selecting data with loc, iloc, and Boolean indexing; adding and dropping rows and columns; detecting and handling missing data; combining datasets with concat, merge, and join; grouping and aggregation.

5. Visualization

Choosing a plotting library and chart type; the pandas plot method; line plots and histograms; scatter, bar, and box plots; area, KDE, and hexagonal bin plots; style sheets, color maps, and figure size.

6. Matplotlib

Stateful and object-oriented syntax; labels, titles, and legends; multiple plots with subplots; manual axes placement; figure size, resolution, and saving; rcParams and style sheets; axis ranges, colors, and line styles; scatter, bar, histogram, and box plots.

7. Seaborn

Comparing Seaborn with pandas and Matplotlib; tidy and wide data formats; figure-level and axes-level APIs; distribution, relational, and categorical plots; faceting with FacetGrid; pair plots, joint plots, and heatmaps; themes and styling.

8. Probability and Statistics

Populations and samples; variables, observations, and distributions; descriptive statistics and measures of center; normal, binomial, and uniform distributions; the law of large numbers; sampling distributions; standard error and sample size.

9. Hypothesis Testing

Assessing a model with data; choosing a test statistic; simulating a statistic under a model; distance between distributions; null and alternative hypotheses; p-values and conventional cut-offs; statistical bias and data quality.

10. Two Samples

Random sampling; A/B testing; test statistics for comparing two groups; permutation tests; p-values for two-sample tests; randomized controlled trials and causality.

11. Estimation

Percentiles and quartiles; populations, parameters, and estimates; bootstrap resampling; the bootstrap distribution of a sample median; bootstrap confidence intervals for medians, means, and proportions; limits of the bootstrap percentile method.

12. Regression

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.

13. Multiple Regression

Machine-learning framing; validation and evaluation; exploratory data analysis; train/test split; training a linear regression model with scikit-learn; regression evaluation metrics; interpreting multiple linear regression; nearest neighbors for regression.

14. Classification

Classification problems; nearest neighbor classifiers; decision boundaries; k-nearest neighbors; training and test sets; classifier accuracy; distance between rows with multiple attributes; implementing a k-NN classifier.

15. Clustering

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.

Set up your environment with Course Tooling and Jupyter Setup in the appendices before the first lab.