Large N & Leeuwenhoek (70700173)
Why does Dr. Hu almost always “sacrifice” the programming teaching?
Options:
The mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment.




None-negative
Total area = \(\int^{+\infty}_{-\infty}f(x)dx = 1.\)
\(P(x = c) = \int^c_cf(x)dx = 0.\)
\[P(a\leq x \leq b) = \int^b_af(x)x = \int^b_{-\infty}f(x)dx -\int^a_{-\infty}f(x)dx.\]
CDF: \(P(X\leq x)\), PDF = \(\frac{\partial CDF}{\partial X}.\)

Moments: Specific quantitative measures of the shape of a function.
Physics

Statistics

Discrete


Continuous


Throwing a fair coin
Bernoulli: Let \(k\in 0, 1,\) p is P(X = 1)
CDF: \[ F = \begin{cases} 0, if\ k<0,\\ 1 - p, if\ k \in[0, 1),\\ 1, if\ k \geq 1. \end{cases} \]
PMF:
\[f(k;p) = p^k(1 - p)^{1 - k}\]

Throwing multiple fair coins
PMF: \(f(k; n, p) = {n \choose k}p^k(1 - p)^{n - k}\) Why combination?

A university hired 100 graduate students per year, 25 female and 75 male. Given that the general hired ratio is 4:6 for women:men, what’s the chance that the employment is gender discrimination free?
Let’s assume the employment of any student does not affect the chance of hiring others. Why is this important?
\[PDF = {n \choose r}\pi^r(1 - \pi)^{n - r}\]
\[P(25) = {100 \choose 25}0.4^{25}(1 - 0.4)^{75} = 0.0006.\]
Implication:
Very unlikely.
PMF: \(Pr(X{=}k)= \frac{\lambda^k e^{-\lambda}}{k!},\)
k is the number of occurrences
μ = λ;
σ2 = λ.

Application
CDF: \[F = \begin{cases} 0, if\ x < a,\\ \frac{x - a}{b - a}, if\ x \in[a, b),\\ 1, if\ x \geq b. \end{cases}\]

PDF:
\[f(x) = \begin{cases} 1/(b - a), if\ x \in [a, b],\\ 0, otherwise.\end{cases}\]

\[\begin{align} \mu =& \int^b_a x \frac{1}{b - a} dx, \\ =& \frac{1}{b - a}\int^b_axdx, \\ =& \frac{1}{b - a}\frac{x^2}{2}|^b_a, \\ =& \frac{b^2 - a^2}{2(b - a)}, \\ =& \frac{a + b}{2}. \end{align}\]
\[\begin{align} \sigma^2 =& \sum x^2p(x) - \mu^2, \\ =& \int^b_ax^2\frac{1}{b - a}dx - (\frac{a + b}{2})^2, \\ =& \frac{1}{b - a}\int^b_ax^2dx - (\frac{a + b}{2})^2,\\ =& \frac{1}{b - a}\frac{x^3}{3}|^b_a - (\frac{a + b}{2})^2,\\ =& \frac{b^3 - a^3}{3(b - a)} - (\frac{a + b}{2})^2 = \frac{(b - a)^2}{12}. \end{align}\]

Any type of random number generators.
Discrete uniform distribution
The probability of occurrence of the events is equally likely and falls within a finite set of values
E.g.:
PDF:
\[f(x) = \varphi(\frac{x - \mu}{\sigma}) = \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x - \mu)^2}{2\sigma^2}}.\]
When μ = 0; σ2 = 1, standard normal distribution.
Z Score:
\(Z = \frac{x - \mu}{\sigma}\) ← \(f(x) = \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(z)^2}{2}}\)

Old days

Cool kids
pnorm(<Z-score>)
Given that the average IQ in the U.S. is 100 with a standard deviation of 16, what’s the probability a US citizen’s IQ is higher than 125 or lower than 85?
\(Z_1 = \frac{125 - 100}{16} =\) 1.5625
\(Z_2 = \frac{85 - 100}{16} =\) -0.9375
1 - pnorm((125 - 100)/16) = 0.0590851pnorm((85 - 100) / 16) = 0.1742507What’s the substantive statement?
p-value: \(P(z\leq x)\).
We’ll talk about about that later.
“What would you guess if asking you the chance of heads to toss a coin?”
Rule of expectation
X is the reward generator of a paid module of a video game, the seed of which is based on tossing a fair dice (😑). When the dice is tossed, the reward is produced following this function: g(X) = 2 + 3X. What’s the expectation of rewards a whale can get by purchasing this module?
\[E(X) = \sum xp(x) = 1\times\frac{1}{6} + 2\times\frac{1}{6} +\dots+6\times\frac{1}{6} = 3.5.\]
Then \[E(g(x)) = E(2 + 3X) = 2 + 3\times 3.5 = 12.5.\]
The whale can gain 12.5 points of rewards by paying for this module.
