
Introduction
Owen, Chapters 1 and 2
Diagnostic Survey due 8/21
Assignment 1 due 9/2
August 24, 2026
Painful departures of colleagues, mentors, and friends who have shaped this community; we grieve
New academic structures, no departments
Questions and uncertainty; let’s meet them with patience and care
We remain committed to your success
The loss is real, as is our responsibility to care for one another and keep learning well
Illinois Tech
↓
College of Tech Futures
↓
School of Computing
↓
(Applied Mathematics)
Technical depth + collaboration across fields + experience in practice
AI can be a capable assistant that helps solve research problems
We need to understand what AI produces—and learn how to guide it
The political environment is also disruptive
J. Craven McGinty, As Forecasts Go, You Can Bet on Monte Carlo, Wall Street Journal, August 12, 2016
\[\begin{align*} Y&= \text{random variable denoting } \alerttext{quantity of interest} = \begin{cases} \text{option payoff} \\ \text{fluid pressure} \\ \text{pixel intensity} \\ \text{statistical model parameter}\\ \text{neural-network parameter} \\ \text{service time} \end{cases} \\ & = f(\vX) \\ \text{where } \vX & = \text{multivariate random variable that is }\alerttext{easy to sample} \end{align*}\]
A visit to a friend requires
How long should you allow for the trip?
What modeling assumptions are needed?
Complete by August 21: Assignment 0 — Diagnostic Survey
Complete and submit this assignment individually, not as a group.
Complete by September 2: Assignment 1 — Owen Exercises 1.2 and 2.1
You may work individually or with one partner. Join an Assignment 1 group in Canvas; only one person per group submits the assignment.
Navigating these slides
Each slide deck lists course decks and major sections after the title page
Each major section begins with links to its individual slides
and jump to the previous and next major sections
and jump to the previous and next slide
« and » at the bottom jump to the previous and next decks
at the bottom left shows all slides, as does Esc
Course slides are on the course website under the Schedule
Homework assignments are at Assignments
Basic course information is on the course website’s Welcome page
All materials are in the Course Repository, which is used to build the course website
Grades are in Canvas
Hidden Figures (2016)
1957 · FORTRAN 1972 · C 1978 · TeX 1978 · WORDSTAR 1983 · INTERNET (TCP/IP) 1984 · MATLAB 1991 · Python
Roles overlap; choose deliberately. Think enough to know the problem AI should help solve
“Use Socratic questions, examples, and nonexamples to probe my understanding and connect intuition to the formal definition”
“Find the weakest step in my argument and explain why”
Prefer dialogue: strengthen your thinking before producing finished work
“Propose two approaches, their assumptions, and how I could choose”
“Implement this specification and provide tests for each requirement”
Match tool to role: the best AI for one role may not be the best for another. One AI can help you reason and specify; another execute. You inspect and revise
Better-specified tasks permit more delegation
Responsibility never transfers to AI
AI output: proposal to inspect, not authority. Expose assumptions, alternatives, reasons; verify appropriately
Verify the result and whether the right problem was solved
Afterward: Can you explain the result, modify it, solve a related problem without reproducing AI output?
Delegate execution; retain understanding, judgment, responsibility
Let \(Y:\Omega\to\mathcal{Y}\subseteq\reals\) be a random variable
For \(A\subseteq\mathcal{Y}\), \(\Prob(Y\in A)\) is the probability of the event \(\{\omega\in\Omega:Y(\omega)\in A\}\)
\[\begin{align*} F \text{ is the }\alerttext{cumulative distribution function}\text{, } F(y)&:=\Prob(Y\le y), \; y\in\mathcal{Y}, \quad\text{right-continuous}\\ Q \text{ is the }\alerttext{quantile function}\text{, } Q(u)&:=\inf\{y\in\mathcal{Y}:F(y)\ge u\}, \; 0<u<1, \quad\text{left-continuous}\\ & = F^{-1}(u) \text{ if $F$ is continuous and strictly increasing} \\ \Ex[g(Y)]&:=\int_{\mathcal{Y}}g(y)\,\dif F(y) \end{align*}\]
Probability mass function (PMF), \(\varrho\)
\[\begin{gather*} \varrho(y):=\Prob(Y=y) \\ \Ex[g(Y)] =\sum_{y\in\mathcal{Y}}g(y)\varrho(y) \end{gather*}\]
Probability density function (PDF), \(\varrho\)
\[\begin{gather*} \varrho(y):=F'(y)\quad\text{almost everywhere}\\ \Ex[g(Y)] =\int_{\mathcal{Y}}g(y)\varrho(y)\,\dif y \end{gather*}\]
\[\begin{align*} \mu & :=\Ex(Y) \text{is the }\alerttext{mean}\text{ of }Y \\ \med(Y) & := Q(0.5) \\ \sigma^2 & :=\var(Y) =\Ex\bigl[(Y-\mu)^2\bigr] \overset{\exstar}{=} \Ex(Y^2) - \bigl[\Ex(Y)]^2 \text{ is the }\alerttext{variance}\text{ of } Y \\ \sigma & \text{ is the }\alerttext{standard deviation}\text{ of } Y \\ \cov(\vY) & :=\bigl( \Ex[(Y_j-\mu_j)(Y_k-\mu_k)] \bigr)_{j,k=1}^{d} \\ & \text{ is the }\alerttext{covariance matrix}\text{ of the $d$-dimensional random vector } \vY \end{align*}\]
\(\exstar\) Assuming \(\Ex(Y^2)<\infty\), show that \(\displaystyle \mu = \argmin_m \Ex\bigl[ (Y-m)^2 \bigr]\)
\(\exstar\) Show that \(\displaystyle \med(Y) \in \argmin_m \Ex \lvert Y-m \rvert\)
Medians may be nonunique
\(\exstar\) Show that \(\cov(\vY)\) is symmetric and has nonnegative eigenvalues
For \(Y\sim\Bin(n,p)\) (see scipy.stats.binom(n, p))
\[\begin{gather*} \varrho(y)=\Prob(Y=y) =\binom{n}{y}p^y(1-p)^{n-y} \qquad y=0,1,\ldots,n \\ F(y)=\sum_{j=0}^{ y}\binom{n}{j}p^j(1-p)^{n-j}, \qquad y=0,1,\ldots,n \\ Q(u)=\inf\{y\in\{0,\ldots,n\}:F(y)\ge u\} \quad 0<u<1 \quad \text{no simple formula} \\ \Ex(Y)=np \qquad \var(Y)=np(1-p) \end{gather*}\]
The Bernoulli distribution, \(\Bern(p)\), is the case \(n=1\) \[\begin{gather*} \varrho(y)=\Prob(Y=y) =p^y(1-p)^{1-y} \qquad y=0,1 \\ \Ex(Y)=p \qquad \var(Y)=p(1-p) \end{gather*}\]
Models a memoryless waiting time
For \(Y\sim\Exp(\lambda)\) (see scipy.stats.expon(loc=0, scale=1/lambda))
\[\begin{gather*} \varrho(y)= \lambda \me^{-\lambda y}, \quad 0 \le y < \infty \\ F(y)= 1-\me^{-\lambda y}, \quad 0 \le y < \infty \\ Q(u) \overset{\exstar}{=} -\frac{\log(1-u)}{\lambda} \quad 0 < u < 1 \\ \Ex(Y)=\frac{1}{\lambda} \\ \var(Y)=\frac{1}{\lambda^2} \end{gather*}\]
Used in finance and uncertainty quantification (see scipy.stats.multivariate_normal(mean=mu, cov=Sigma))
\[ \vY\sim\Norm(\vmu,\mSigma) \]
where \(\vmu\) is the mean vector and \(\mSigma\succ 0\) is a positive-definite covariance matrix
\[ \varrho(\vy) =\frac{1}{(2\pi)^{d/2}\abs{\mSigma}^{1/2}} \exp\left( -\frac{1}{2}(\vy-\vmu)^{\mathsf T} \mSigma^{-1}(\vy-\vmu) \right), \qquad \vy \in \reals^d \]
Each design has \(n=64\) points; compare how its \(x_1\)–\(x_2\) projection fills the unit square





Normally, we want something more than \(\vX_0, \vX_1, \ldots \sim \Unif[0,1]^d\); let
\(Y\) be a random variable, often \(Y=f(\vX)\)
\(Y_0,\ldots,Y_{n-1}\) be a sample—not necessarily random or IID
\[\begin{align*} \hmu_n & :=\frac{1}{n}\sum_{i=0}^{n-1}Y_i \quad \text{is the }\alerttext{sample mean}\\ \hsigma_n^2 & :=\frac{1}{n-1}\sum_{i=0}^{n-1}(Y_i-\hmu_n)^2 \quad \text{is the }\alerttext{sample variance}\\ \end{align*}\]
Let \(\Theta\) estimate a scalar population parameter \(\theta\) \[\begin{align*} \bias(\Theta) &:= \Ex(\Theta) - \theta \quad \alerttext{unbiased means zero bias} \\ \mse(\Theta) &:= \Ex\bigl[ \bigl(\Theta - \theta \bigr)^2 \bigr] \quad \text{is the }\alerttext{mean squared error}\\ & \overset{\exstar}{=} [\bias(\Theta)]^2 + \var(\Theta) \end{align*}\]
Suppose \(Y_0,Y_1,\ldots\) have the same distribution as \(Y\), where \(\Ex(Y)=\mu\) and \(\var(Y)=\sigma^2\). Then \[ \Ex(\hmu_n)=\mu \quad \text{$\hmu_n$ is an }\alerttext{unbiased}\text{ estimator of }\mu \] If \(Y_0,Y_1,\ldots\) are also uncorrelated \[\begin{align*} \Ex(\hsigma_n^2)&=\sigma^2 \quad \text{$\hsigma_n^2$ is an }\alerttext{unbiased}\text{ estimator of }\sigma^2 \\ \mse(\hmu_n) &:=\Ex\left[(\mu-\hmu_n)^2\right] =\frac{\sigma^2}{n} \\ \rmse(\hmu_n)& =\frac{\sigma}{\sqrt{n}} \end{align*}\]
If \(Y_0,Y_1,\ldots\IIDsim Y\) and \(0<\sigma^2<\infty\) then
\[ \frac{\hmu_n-\mu}{\sigma/\sqrt{n}} \dto\Norm(0,1) \qquad\text{as }n\to\infty \]
For large \(n\)
\[ \hmu_n\appxsim \Norm\left(\mu,\frac{\sigma^2}{n}\right) \]
Monte Carlo error for a sample mean typically decreases like \(n^{-1/2}\)
| Population quantity | Sample approximation |
|---|---|
| Mean, \(\mu\) | point estimator \(\hmu_n\) approximate 99% confidence interval \(\hmu_n\pm2.58\hsigma_n/\sqrt n\) |
| Variance, \(\sigma^2\) | \(\hsigma_n^2\) |
| CDF, \(F\) | Empirical distribution function, \(\displaystyle \hF_n(y) := \frac 1n \sum_{i=0}^{n-1} \indic(Y_i \le y)\) |
| Quantile function, \(Q\) | Empirical quantile function, \(\widehat Q_n\) |
| Density or mass function, \(\varrho\) | Histogram or kernel density estimator |
Estimator is a random quantity based on random data not yet observed
Estimate is the numerical result based on observed data
| Quantity | Python tool |
|---|---|
| Mean | np.mean(data) |
| Variance | np.var(data, ddof=1) |
| Empirical CDF | statsmodels.distributions.empirical_distribution.ECDF(data) |
| Empirical quantile | np.quantile(data, probabilities) |
| Histogram | np.histogram(data, bins="auto") |
| Kernel density estimate | scipy.stats.gaussian_kde(data) |
For the travel-time model
The question “How long should I allow?” is usually a quantile question, not only a mean question
For discrete random variables \(Y,Z\), suppose \(\Prob(Y=y)>0\) and \(\Prob(Z=z)>0\)
\[ \Prob(Y=y\mid Z=z) =\frac{\Prob(Y=y,Z=z)}{\Prob(Z=z)} =\frac{\Prob(Z=z\mid Y=y)\Prob(Y=y)} {\Prob(Z=z)} \]
The second equality is Bayes’ theorem
If a joint density exists and \(\varrho_Z(z)>0\)
\[ \varrho_{Y\mid Z}(y\mid z)=\frac{\varrho_{Y,Z}(y,z)}{\varrho_Z(z)} \]
\[\begin{align*} \Ex(Y)&=\Ex_Z\bigl[\Ex(Y\mid Z)\bigr] \\ \var(Y) &=\Ex_Z\bigl[\var(Y\mid Z)\bigr] +\var_Z\bigl(\Ex(Y\mid Z)\bigr) \end{align*}\]
Conditioning separates variation within a fixed \(Z\) from variation in the conditional mean across values of \(Z\)
Let \(Y=f(X_1,\ldots,X_d)\) and \(Z=(X_2,\ldots,X_d)\)
If
\[ g(Z):=\Ex(Y\mid Z) \]
is available analytically
\[ \mu=\Ex(Y)=\Ex_Z[g(Z)] \qquad \var_Z(g(Z)) \overset{\exstar}{\le} \var(Y) \]
Sampling \(g(Z)\) instead of \(Y\) can reduce variance
If the conditional density \(h(y,z):=\varrho_{Y\mid Z}(y\mid z)\) is available analytically
\[ \varrho_Y(y)=\Ex_Z[h(y,Z)] \]
so a probability density can itself be expressed as an expectation
Most simulations begin with
\[ \vU\sim\Unif[0,1]^d \]
and construct
\[ \vX=T(\vU) \]
with the distribution required by the model
Next: turn uniform inputs into samples from the models we need
© 2026 Fred J. Hickernell · Illinois Tech · assisted by ChatGPT and Codex · Introduction · MATH 565 — Fall 2026 Website · \(\exstar\) = exercise