Introduction to Probability for Data Science Study Guide and Chapter Summaries – Stanley Chan (2nd Edition) BS DS/BSCS

BS Data Science, BSCS and engineering students can use this guide to study Introduction to Probability for Data Science, the free undergraduate textbook by Stanley H. Chan of Purdue University. This is the Second Edition (Michigan Publishing, 2026), posted chapter by chapter as PDFs, with a free HTML edition, slides, code and exercise sheets beside it. Its ten chapters run from a calculus and linear algebra warm-up through random variables, joint distributions, regression, estimation and hypothesis testing to random processes.

The book is written around the questions students actually ask: why these three axioms, where the bell shape of the Gaussian comes from, and how many samples a reliable histogram needs. For a Probability or Data Science Foundations course that makes revision easier, because each result is tied to a data problem you can picture. More than 90 short practice exercises sit inside the chapters, and every chapter ends with a problem set (237 in all) for exam drill, though the official site gives the solutions to instructors only.

Book Overview

CourseProbability / Probability for Data Science
Degree ProgramsBS Data Science, BSCS, Engineering (electrical and computer engineering)
LevelUniversity undergraduate — calculus and basic linear algebra expected (Chapter 1 is a refresher, not a full course)
EditionSecond Edition, Michigan Publishing, 2026 (the chapter files are titled Second Edition; Michigan Publishing’s catalogue page still lists the first edition of November 2021, 704 pages)
AuthorStanley H. Chan, Purdue University
PublisherMichigan Publishing, Ann Arbor — ISBN 978-1-60785-746-4 (hardcover) and 978-1-60785-747-1 (electronic), as listed on the official site
Structure10 chapters (about 740 pages): Mathematical Background; Probability; Discrete Random Variables; Continuous Random Variables; Joint Distributions; Sample Statistics; Regression; Estimation; Confidence and Hypothesis; Random Processes
ExercisesMore than 90 worked practice exercises inside the chapters and 237 end-of-chapter exercises; solutions are available to instructors only
CodeMATLAB and Python listings in Chapters 1 and 3 to 10 (numpy, matplotlib, scipy.stats), none in Chapter 2
LanguageEnglish
FormatFree chapter-wise PDFs and a free HTML edition on the official site; hardcover available from the publisher

Chapter List

Chapter 1: Mathematical Background

Difficulty: Easy · Key topics: geometric series, binomial series, Taylor approximation, even and odd functions, Fundamental Theorem of Calculus, inner products and norms, matrix calculus, permutations, combinations

The chapter opens with a coin puzzle: how many flips make you 90% sure of seeing a head? That puzzle motivates the refresher that follows. It reviews geometric and binomial series, Taylor approximation with the exponential series and the log(1 + x) shortcut, and two integration tricks (even and odd functions, and the Fundamental Theorem of Calculus). A compact linear algebra section is built around one picture, an observed vector written as a weighted sum of variable vectors, and finishes with matrix calculus. The chapter ends with counting, using the birthday paradox to introduce permutations and combinations.

Key Points:

  • With a fair coin, four flips give a 93.75% chance of at least one head, because 1/2 + 1/4 + 1/8 + 1/16 = 0.9375
  • An infinite geometric series with ratio r between 0 and 1 sums to 1/(1 - r)
  • For small x, log(1 + x) ≈ x; Taylor approximation is the general recipe behind such shortcuts
  • An even function integrates over a symmetric interval as twice its half-interval, and an odd function integrates to zero there
  • Many data problems reduce to y = ∑ βn xn: an observed vector explained by a weighted sum of variable vectors
  • Permutations count ordered picks, n!/(n - k)!; combinations count unordered picks, n!/(k!(n - k)!)
  • In a room of 23 people the chance of a shared birthday is already about 50%, and at 50 people it is about 97%

Memory Tip: Permutation: Position matters. Combination: Committee, where order does not.

Common Mistake: Using the odd-function shortcut on an interval that is not symmetric about zero. The integral of an odd function vanishes only on an interval like [-a, a].

Important Questions:

  • How many people are needed for roughly even odds of a shared birthday? About 23, which is far fewer than the 366 that a worst-case argument would suggest.
  • How do permutations and combinations differ? A permutation counts ordered selections, n!/(n - k)!; a combination removes the k! orderings of the same set, giving n!/(k!(n - k)!).

Chapter 2: Probability

Difficulty: Medium · Key topics: sets and partitions, sample space, event space, probability law, measure zero, probability axioms, conditional probability, independence, Bayes’ theorem, law of total probability

Chapter 2 builds probability from one slogan: probability is a measure of the size of a set. It starts with set theory (subsets, union, intersection, complement, disjoint sets, partitions), then defines a probability space as a sample space, an event space and a probability law, including sample spaces that cannot be counted and sets of measure zero. It explains why exactly three axioms are needed and derives their corollaries. The second half covers conditional probability, independence, Bayes’ theorem, the law of total probability and the Three Prisoners puzzle as a test of understanding.

Key Points:

  • A probability space has three parts: the sample space of all outcomes, the event space of subsets we may ask about, and the probability law P
  • The three axioms: probabilities are never negative, the whole sample space has probability 1, and probabilities add for disjoint events
  • On the interval [0, 1] a single point has probability 0 (a measure-zero set) yet is not impossible, which is the idea behind “almost surely”
  • Conditional probability: P[A | B] = P[A ∩ B] / P[B]
  • Independence means P[A ∩ B] = P[A] P[B], so knowing one event tells you nothing about the other
  • Bayes’ theorem swaps the order of conditioning, and the law of total probability splits an event across a partition

Memory Tip: Prior is what you believe before the match, posterior is what you believe after the result, and Bayes’ theorem is the bridge between them.

Common Mistake: Treating disjoint and independent as the same thing. Two disjoint events with positive probability are never independent, because one happening rules the other out.

Important Questions:

  • Why does probability need exactly three axioms? Non-negativity stops probabilities going below 0, normalization caps them at 1, and additivity lets you add probabilities of events that do not overlap.
  • What is the probability of picking exactly 0.5 from [0, 1] uniformly? Zero, because a single point has zero length; it is a measure-zero event, not an impossible one.

Chapter 3: Discrete Random Variables

Difficulty: Medium · Key topics: random variable, PMF, histogram, discrete CDF, expectation, moments, variance, Bernoulli, binomial, geometric, Poisson

Chapter 3 bridges the abstract probability space and real data with three ideas: a random variable maps outcomes to numbers, a probability mass function (PMF) is the ideal histogram of that variable, and expectation is the average computed from the PMF. It compares PMFs with histograms estimated from data, introduces the discrete CDF, and covers expectation, its properties, moments and variance, including a PMF whose expectation does not exist. It finishes with the four workhorse families (Bernoulli, binomial, geometric, Poisson) and a three-step recipe for real data: pick a model, estimate its parameters, validate.

Key Points:

  • A random variable is a mapping from outcomes to numbers, and its PMF pX(k) = P[X = k] sums to 1 over all states
  • Different random variables can share one PMF, so the PMF describes a distribution rather than a specific variable
  • Expectation is E[X] = ∑ k pX(k) and variance is Var[X] = E[X^2] - (E[X])^2
  • Some PMFs have no expectation: p(k) = 6/(π^2 k^2) is a valid PMF whose mean is undefined
  • Binomial(n, p) counts successes in n independent Bernoulli trials, with mean np and variance np(1 - p)
  • Geometric: p(k) = (1 - p)^(k - 1) p is the number of trials up to the first success
  • Poisson: p(k) = λ^k e^(-λ) / k! models arrival counts such as photons, phone calls or transactions

Practice Tip: Simulate a few thousand Bernoulli or binomial trials, plot the histogram and lay the theoretical PMF over it; the two shapes converge as the number of trials grows.

Common Mistake: Reading a probability of 1/4 as “it happens once every four trials.” The PMF describes long-run frequency, not a schedule.

Important Questions:

  • What is a PMF? The ideal histogram of a discrete random variable: for every state it gives the probability of landing there, and the values sum to 1.
  • Which discrete random variable counts the trials until the first success? The geometric random variable, with p(k) = (1 - p)^(k - 1) p.

Chapter 4: Continuous Random Variables

Difficulty: Medium · Key topics: PDF, continuous expectation and variance, CDF, median, mode, uniform, exponential, Gaussian, skewness, kurtosis, transformation of random variables, random number generation

Chapter 4 switches from counting to measuring: continuous events are sized by length, area and volume, so sums become integrals. It builds intuition for the PDF before the formal definition, then covers expectation, moments and variance, and the CDF as the tool that unifies discrete and continuous variables (a step CDF differentiates to a train of impulses). After median, mode and mean, it studies uniform, exponential and Gaussian variables, including skewness, kurtosis and why sums of dice drift toward a bell curve. It ends with transforming random variables and generating random numbers from any distribution.

Key Points:

  • A PDF value is a density, not a probability: P[a ≤ X ≤ b] is the area under f between a and b, and f(x) can exceed 1
  • The PDF is the derivative of the CDF wherever it exists, which links the Fundamental Theorem of Calculus from Chapter 1 to probability
  • The exponential random variable models waiting times and is tied to Poisson arrivals
  • A Gaussian is fixed by its mean and variance, and any Gaussian can be standardized with Z = (X - μ)/σ
  • Skewness measures asymmetry of a distribution, and kurtosis measures how heavy its tails are
  • Gaussians are everywhere because observed quantities are often sums of many independent effects, and adding independent variables convolves their PDFs
  • Inverse transform sampling: if U is Uniform(0, 1), then X = F^(-1)(U) has CDF F

Memory Tip: For a continuous variable, probability is area, not height.

Common Mistake: Reading f(x) as P[X = x]. For a continuous variable every single point has probability zero; only intervals carry probability.

Important Questions:

  • Why can a PDF take values larger than 1? Because it is a density: probability is the integral of the PDF over an interval, so a tall, narrow PDF can still have total area 1.
  • How do you generate random numbers from a distribution with CDF F? Draw U from Uniform(0, 1) and return F^(-1)(U).

Chapter 5: Joint Distributions

Difficulty: Hard · Key topics: joint PMF and PDF, marginals, independence, covariance, correlation coefficient, conditional expectation, convolution, covariance matrix, multidimensional Gaussian, whitening, PCA

Chapter 5 extends one variable to many, with the idea that a joint distribution is simply a high-dimensional PDF, PMF or CDF. The first half handles pairs: joint and marginal distributions, independence, joint expectation E[XY], covariance and the correlation coefficient, conditional PMFs and PDFs, the law of total expectation and the PDF of a sum through convolution. The second half moves to random vectors: mean vectors, covariance matrices, the multidimensional Gaussian, Gaussian whitening, and principal-component analysis, illustrated by the eigenface problem on the Yale face images.

Key Points:

  • A marginal is obtained by integrating (or summing) the other variable out of the joint distribution
  • Independence factorizes the joint distribution and gives E[XY] = E[X] E[Y], but the reverse implication does not hold
  • The correlation coefficient always lies between -1 and 1, and the book links E[XY] to the cosine of an angle between two vectors
  • Law of total expectation: E[X] = E[ E[X | Y] ]
  • For independent X and Y, the PDF of X + Y is the convolution of the two PDFs
  • A covariance matrix is symmetric and positive semi-definite, and a Gaussian vector is fully described by its mean vector and covariance matrix
  • PCA keeps the eigenvectors of the covariance matrix with the largest eigenvalues, and it fails when data lie on a curved surface such as a donut

Memory Tip: Joint is the whole surface, marginal is the surface squashed onto one axis, and conditional is one slice of the surface rescaled to total area 1.

Common Mistake: Concluding that uncorrelated variables are independent. Zero correlation only rules out a linear relationship.

Important Questions:

  • How do you get the marginal PDF of X from a joint PDF? Integrate the joint PDF over all values of Y: fX(x) = ∫ fX,Y(x, y) dy.
  • What does PCA compute? It estimates the covariance matrix of the data, finds its eigenvectors, and projects the data onto the few directions with the largest eigenvalues.

Chapter 6: Sample Statistics

Difficulty: Hard · Key topics: moment-generating function, characteristic function, Markov and Chebyshev inequalities, Chernoff and Hoeffding bounds, law of large numbers, modes of convergence, Central Limit Theorem

Chapter 6 argues that, with many data points, tracking each one is hopeless, so we study a macro summary: the sample average. It begins with moment-generating and characteristic functions, which turn the convolution of a sum into a product, then collects the probability inequalities: union bound, Cauchy-Schwarz, Jensen, Markov, Chebyshev, Chernoff and Hoeffding. The weak and strong laws of large numbers follow, with convergence in probability, almost sure convergence and a proof of the strong law. The chapter closes with the Central Limit Theorem, convergence in distribution, worked examples and the theorem’s limitations.

Key Points:

  • The moment-generating function of a sum of independent variables is the product of their individual MGFs
  • Markov: P[X ≥ ε] ≤ E[X]/ε for non-negative X; Chebyshev: P[|X - μ| ≥ ε] ≤ σ^2/ε^2
  • Chernoff and Hoeffding bounds shrink exponentially with the number of samples, which is far sharper than Chebyshev
  • Weak law: the sample average converges to the mean in probability; strong law: P[lim of the average = μ] = 1
  • The book ranks four kinds of convergence: deterministic, almost sure, in probability and in distribution
  • CLT: √N (average - μ)/σ converges in distribution to a standard Gaussian
  • The CLT approximates well near the center of the distribution but can be poor far out in the tails

Memory Tip: In the weak law the limit sits outside the probability; in the strong law it sits inside.

Common Mistake: Using the Central Limit Theorem for a small sample or for a tail probability far from the mean, where the Gaussian approximation is least reliable.

Important Questions:

  • What is the difference between the weak and strong laws of large numbers? The weak law says the probability of a large error goes to zero; the strong law says the sample average converges to the mean with probability 1, which is the stronger statement.
  • What does Chebyshev’s inequality bound? The chance that a variable deviates from its mean by at least ε, using only its variance: at most σ^2/ε^2.

Chapter 7: Regression

Difficulty: Medium · Key topics: least squares, basis functions, overdetermined and underdetermined systems, robust regression, overfitting, bias-variance trade-off, ridge, LASSO

Chapter 7 starts the book’s data-analysis toolkit with regression: pick a parametric model, define a training loss and optimize. It develops the straight-line fit, the least-squares solution in matrix form, polynomial and other basis functions, and overdetermined and underdetermined systems, with an optional section on robust regression to resist outliers. It then explains why more flexibility is not always better: overfitting, the linear-case analysis, the bias-variance decomposition of testing error and learning curves. The chapter ends with ridge and LASSO regularization as the remedy.

Key Points:

  • Regression replaces the unknown relationship with a proxy gθ(x) and minimizes a training loss such as ∑ (yn - gθ(xn))^2
  • Linear regression means linear in the parameters, so polynomial models still count
  • Squared error is differentiable and convex, but a single outlier can drag the fit; robust regression changes the loss
  • Overfitting happens when the model is too complex for the number of samples: training error falls while testing error rises
  • Testing error splits into bias, variance and noise, and model complexity trades the first against the second
  • Ridge adds λ∥θ∥^2 to the loss and LASSO adds λ∥θ∥1, with λ tuned by the user

Practice Tip: Generate about 20 noisy points from a smooth curve, fit polynomials of increasing order and plot training and testing error together; the widening gap is overfitting made visible.

Common Mistake: Assuming regression always gives a meaningful answer. It always returns numbers, but squared error is a good choice only when the noise is roughly Gaussian.

Important Questions:

  • What is overfitting? Fitting the training data very closely with a model that is too complex for the sample size, so the fit memorizes noise and predicts new data badly.
  • What does the regularization parameter control? The balance between fitting the training data and keeping the parameters small; a larger λ gives a simpler, more stable model.

Chapter 8: Estimation

Difficulty: Hard · Key topics: likelihood, maximum-likelihood estimate, unbiased and consistent estimators, invariance principle, prior, posterior, MAP, conjugate prior, MMSE

Chapter 8 treats estimation as an inverse problem: given samples from a distribution with an unknown parameter, recover the parameter. It builds on three objects, the likelihood, the prior and the posterior, and three strategies. Maximum-likelihood estimation comes with applications in social-network analysis and photon-limited image reconstruction. Maximum a posteriori (MAP) estimation covers priors, conjugate priors and the link to regularized regression. Minimum mean-square estimation (MMSE) turns out to be the conditional expectation. The chapter also examines estimator properties such as bias, consistency and the invariance principle.

Key Points:

  • The likelihood is f(x | θ), the prior is f(θ), and the posterior is f(θ | x)
  • The ML estimate maximizes the likelihood, and taking the log turns a product over samples into a sum
  • An estimator is unbiased if E[θhat] = θ and consistent if it converges to θ as the sample size grows
  • Invariance principle: if θhat is the ML estimate of θ, then h(θhat) is the ML estimate of h(θ)
  • MAP maximizes the posterior; in regularized regression the regularizer plays the role of the negative log of the prior
  • The MMSE estimate is the mean of the posterior, while mean absolute error would instead call for the posterior median
  • No estimator is best in every sense; each is optimal only for the criterion you choose

Memory Tip: ML uses the data only, MAP adds a prior, and MMSE reports the average of the posterior.

Common Mistake: Calling ML or MAP “the best” estimator without naming the criterion. Each is optimal only for its own definition of best.

Important Questions:

  • How does MAP estimation differ from ML estimation? ML maximizes the likelihood of the data alone; MAP also multiplies in a prior on the parameter, so it maximizes the posterior.
  • Which estimator minimizes the mean squared error? The MMSE estimator, which equals the conditional expectation of the parameter given the data.

Chapter 9: Confidence and Hypothesis

Difficulty: Medium · Key topics: confidence interval, Student’s t-distribution, bootstrapping, critical-value test, p-value, Z-test and t-test, type 1 and type 2 errors, Neyman-Pearson, ROC curve, precision-recall curve

Chapter 9 asks two questions once you have an estimate: how good is it, and is the effect real? It starts from the fact that an estimator is itself random, builds confidence intervals for the sample mean, shows how their width responds to the sample size and the confidence level, and introduces Student’s t-distribution for unknown variance. Bootstrapping handles estimators, like the median, that have no neat formula. Hypothesis testing follows with the critical-value test, the p-value test, the Z-test and the t-test, then the Neyman-Pearson framework with type 1 and type 2 errors, and finally ROC and precision-recall curves.

Key Points:

  • A 95% confidence interval is a random interval that covers the true parameter 95% of the time, not an interval holding 95% of the samples
  • When the variance is unknown and estimated from data, use Student’s t-distribution, which has heavier tails than the Gaussian and approaches it as N grows
  • Bootstrapping resamples the data with replacement to estimate an estimator’s variance; it does not improve the point estimate
  • A test compares a null hypothesis H0 with an alternative H1, and the decision uses either a critical value or a p-value
  • A type 1 error is a false alarm (rejecting a true H0) and a type 2 error is a miss
  • Neyman-Pearson maximizes the detection rate for a fixed false-alarm rate, which leads to the critical-value and p-value tests
  • The ROC curve and the precision-recall curve carry the same information from different viewpoints

Practice Tip: Take a small dataset, bootstrap the sample median a thousand times, and plot the histogram of the results; its spread is your estimate of the median’s uncertainty.

Common Mistake: Reading a 95% confidence interval as “95% of the data lie inside it.” The interval is about where the parameter is, not where the samples fall.

Important Questions:

  • What does a 95% confidence interval mean? If you repeated the experiment many times, about 95% of the intervals built this way would contain the true parameter.
  • When should you use a t-test rather than a Z-test? When the population variance is unknown and replaced by the sample variance, especially with a small sample.

Chapter 10: Random Processes

Difficulty: Hard · Key topics: random process, mean function, autocorrelation, wide-sense stationary, power spectral density, LTI systems, Yule-Walker equation, linear prediction, Wiener filter

Chapter 10 treats a random process as an infinitely long vector of random variables whose correlations define its behavior. It contrasts the statistical view (across realizations) with the temporal view (along one realization), defines the mean, autocorrelation and autocovariance functions, and introduces the wide-sense stationary (WSS) class. Power spectral density comes next through the Einstein-Wiener-Khinchin theorem, followed by how a WSS process behaves when it passes through a linear time-invariant system. The chapter ends with optimal linear filtering, the Yule-Walker equation for prediction and the Wiener filter for recovering signals, with proofs collected in an appendix.

Key Points:

  • The statistical average across realizations is generally not the same as the temporal average along one realization
  • The autocorrelation function is RX(t1, t2) = E[X(t1) X(t2)]
  • A WSS process has a constant mean and an autocorrelation that depends only on the lag τ = t1 - t2
  • The power spectral density SX(ω) is the Fourier transform of RX(τ) (Einstein-Wiener-Khinchin theorem)
  • Passing a WSS process through an LTI system reshapes its PSD by the squared magnitude of the system’s frequency response
  • Yule-Walker handles a finite-length optimal linear filter, while the Wiener filter handles the infinite-length case
  • The chapter states what it leaves out: strictly stationary processes, the Poisson process and Markov chains

Memory Tip: Statistical analysis is vertical (slice across all realizations at one time), and temporal analysis is horizontal (walk along a single realization).

Common Mistake: Calling a process stationary because its mean is constant. Wide-sense stationarity also needs the autocorrelation to depend on the time lag only.

Important Questions:

  • What is a wide-sense stationary process? One whose mean function is constant and whose autocorrelation RX(t1, t2) depends only on t1 - t2.
  • How are autocorrelation and power spectral density related? The PSD is the Fourier transform of the autocorrelation function, which is the Einstein-Wiener-Khinchin theorem.

How to Study This Book

Read Chapters 1 to 6 in order, because each chapter leans on the one before it, and treat Chapters 7, 8 and 9 as the applications that those six chapters make possible. Chapter 1 is a warm-up, not a prerequisite course. If series, Taylor approximation and integration are comfortable, skim Sections 1.1 to 1.3 and spend your time on Section 1.4 (inner products, norms and matrix calculus, which return in Chapters 5 and 7) and Section 1.5 (counting).

Chapters 2 and 3 are the foundation for every exam question that follows. Chapter 2 defends the idea that probability measures the size of a set, and its measure-zero material in Section 2.2.4 is what makes the continuous probability of Chapter 4 coherent. A course aimed at applications can read that section lightly, but do not skip conditional probability and Bayes’ theorem in Section 2.4. Chapter 3 ends with a three-step recipe (pick a model, estimate its parameters, validate) that the rest of the book keeps returning to.

Chapters 4 and 5 are the heavy lifting. Chapter 5 splits cleanly in two: Sections 5.1 to 5.5 deal with a pair of variables and need only calculus, while Sections 5.6 to 5.8 (random vectors, whitening, PCA) need eigenvalues and eigenvectors. If your linear algebra is rusty, revise it first with a dedicated text such as A First Course in Linear Algebra before starting Section 5.6.

Chapter 6 is the most theoretical chapter. On a first pass read the inequalities in Section 6.2, the weak law in Sections 6.3.1 to 6.3.3 and the Central Limit Theorem in Section 6.4, and leave moment-generating and characteristic functions and the proof of the strong law (Section 6.3.8) for a second pass. The chapter’s own summary lists the four types of convergence, so use it as a checklist.

Chapters 7 to 9 are what a data science or machine learning course usually wants. The book marks Section 7.1.5 (robust regression) as optional for a first reading, and it advises skipping the bias-variance analysis in Section 7.3 at first and coming back to it. In Chapter 9 the author’s advice is to draw the distribution of the test statistic before choosing a test, which removes most of the confusion about Z, t and p-value tests.

Chapter 10 is a separate, signals-and-systems style topic. It uses Fourier transforms and linear time-invariant systems (Section 10.5.1 gives a short review), so it fits electrical and computer engineering courses best. Many data science syllabi stop at Chapter 9, so read Chapter 10 only if your course lists random processes, power spectral density or Wiener filtering. Be aware that the chapter itself says it does not cover Markov chains or the Poisson process, so a syllabus that needs them requires a second book.

Use the code. MATLAB and Python listings appear next to figures in Chapters 1 and 3 to 10 (Chapter 2 has none), and running them is the quickest way to see a histogram converge to a PMF or a confidence interval shrink. They are short illustrations rather than a programming course. Two honest caveats: the official site gives exercise solutions only to instructors, and the lecture videos on the site are dated 2020, while the text is the 2026 edition, so expect small differences. The ten chapter files this page is based on do not include a preface or an index.


Used In These Programs

This book is used for the Probability course (often called Probability and Statistics for Data Science) in: BS Data Science · BS Computer Science, and in electrical and computer engineering programs. Browse all Probability books, all Data Science books, or all Mathematics books.

Who Should Read This

This book is written for undergraduates in data science, computer science and engineering who have finished first-year calculus and a first linear algebra course and now need probability that connects to data. It suits a one-semester Probability course for BS Data Science or BSCS directly (Chapters 1 to 6), and a follow-on module on estimation and hypothesis testing (Chapters 7 to 9). It is a good companion for machine learning students who want to understand regression, MAP estimation and ROC curves instead of only calling library functions. It is not for readers without calculus, because integrals appear from Chapter 4, double integrals from Chapter 5, and Fourier transforms in Chapter 10. If you prefer a more classical, fully worked treatment of discrete and continuous probability, read it alongside Introduction to Probability by Grinstead and Snell, and use Calculus Volume 1 to refresh the integration skills the book assumes.


Applicable Universities

This book is useful for students at Pakistani universities offering BS Data Science, BSCS and engineering degrees including Punjab University, Virtual University, COMSATS, FAST, UET, NUST, and other HEC-recognized institutions.

Official Copy of Introduction to Probability for Data Science

Click the button below to open the official book site by Stanley H. Chan. Every chapter is posted there as a free PDF, with the online HTML edition, slides, code and exercise sheets next to it. We link to the official site and do not host the files.

→ Visit Official Page

FAQs

Is Introduction to Probability for Data Science free?

Yes, it is free to read and download from the official site, which says the book is free for everyone. The chapter files we reviewed carry no Creative Commons or other open-content notice, and neither does the official site, so treat it as free for personal study, link to the official page instead of re-uploading it, and contact Michigan Publishing if you need reuse rights.

Which edition is this, and is it current?

The official site presents it as the Second Edition (Michigan Publishing, 2026), and the ten chapter PDFs we reviewed are titled Second Edition. Michigan Publishing’s catalogue page still lists the first edition (November 2021, 704 pages). The lecture videos on the site are dated 2020, so expect small differences from the 2026 text.

How many chapters and exercises does it have?

Ten chapters, about 740 pages in the chapter files. There are more than 90 worked practice exercises inside the chapters and 237 end-of-chapter exercises, between 20 and 29 per chapter. Solutions are given to instructors who adopt the book, not posted publicly.

What background do I need before starting?

You need first-year calculus and some linear algebra. Chapter 1 reviews series, Taylor approximation, integration, vectors and matrices, and counting, but the author notes that linear algebra would need a book of its own. Integrals are used from Chapter 4, double integrals and eigenvalues in Chapter 5, and Fourier transforms in Chapter 10. It is not a good first book for someone with no calculus.

Does it include MATLAB and Python code?

Yes. Chapters 1 and 3 to 10 show MATLAB and Python listings beside the figures they produce, mostly using numpy, matplotlib and scipy.stats, with cvxpy and OpenCV in a few places. Chapter 2 has no code. The listings are short illustrations, not a programming course.

Does it cover regression, hypothesis testing and random processes?

Yes. Chapter 7 covers regression, overfitting, the bias-variance trade-off, ridge and LASSO; Chapter 8 covers maximum-likelihood, MAP and MMSE estimation; Chapter 9 covers confidence intervals, bootstrapping, hypothesis tests, Neyman-Pearson and ROC curves; Chapter 10 covers random processes. It does not cover Markov chains or the Poisson process, and it says so.

Related Books

Introduction to Probability for Data Science is a strong fit when your course asks you to use probability on data rather than only prove theorems about it. Work through Chapters 1 to 6 for the foundations, then Chapters 7 to 9 for regression, estimation and testing. Browse more Mathematics books for the rest of your semester.

Introduction to Probability for Data Science, Second Edition, by Stanley H. Chan (Purdue University), Michigan Publishing, Ann Arbor, 2026. Free chapter PDFs, online edition and companion resources are provided by the author at https://probability4datascience.com/. No open-content licence statement was found in the chapters or on the official site, so reuse rights are not stated here; contact the author or Michigan Publishing for permissions.

Leave a Comment