Math for Data Science

⁂

Math for Data Science is a comprehensive treatment that is accessible to beginners without sacrificing either precision or depth. These web pages reflect the latest edition in pre-production, which includes the solutions to all 468 exercises.

Starting from datasets and the question of what it means to average, the text develops linear geometry, principal components, calculus, probability, and statistics in a unified geometric framework, culminating with machine learning. Concepts are motivated by data and developed geometrically, theorems are proved from first principles, and the material is supported by Python code.

⁂

Suitable for courses in applied mathematics, business analytics, computer science, data science, and engineering, the text supports a one-semester course through the principal components chapter and a one-semester course through the machine learning chapter, or both semesters taught simultaneously.

The approach is geometric throughout. Eigenvectors are maximum variance directions. The pseudoinverse is the ``closest twice" solution. The singular value decomposition is rotation, scaling, rotation. Information and the cumulant-generating function are convex duals. Trainability — the question of whether gradient descent converges in machine learning — is characterized precisely for logistic regression in terms of the geometry of convex hulls, and the resulting dichotomy with the perceptron is proved. Stochastic gradient descent is carefully derived for strongly convex losses, with explicit rates.

Probability is developed from first principles, with the binomial, normal, and chi-squared distributions derived rather than assumed. The central limit theorem is proved via moment-generating functions, maximum likelihood estimator convergence is derived using information and surprisal, and entropy and information are treated geometrically.

Eight appendices cover the supporting mathematics — permutations and combinations, the binomial theorem, the exponential, two-dimensional geometry, complex numbers, integration, asymptotics, and SQL — allowing instructors to tailor coverage as needed.