Random Variables and Single Variable Distributions
Random Variable and Distribution
A random variable is a function \(X:S\rightarrow \mathbb R\) s.t. \(\{s\in S: X(s)\leq r\}\) is an event for all \(r\in\mathbb R\).
Theorem If \(X, Y\) are random variables, then \(aX, X+Y, XY\) are all random variables.
The distribution of \(X\) is the collection of all probabilities of all events induced by \(X\), i.e. \((B, P(X\in B))\), \(B\) is the Borel set.
Two random variables \(X, Y\) are identically distributed if they have the same distribution.
Discrete Distribution
\(X\) is discrete if \(P(X=x)=0\) or \(P(X=x) > 0\) and \(\sum_x P(X=x)=1\), i.e. they takes at most countably many values \(x_1,x_2,...\) s.t. \(P(X=x_i) > 0\) and \(\sum P(X=x_i) = 1\).
Then, probability mass function is defined as
Theorem Let \(X(S) = \{x_1,x_2,...\}\) be the set of possible values of a discrete random variable \(X\). Then for any \(A\subset\mathbb R\),
Bernoulli distribution \(X\sim Bernoulli(p)\) if \(X\) taking values \(\{0,1\}\) with \(P(X=1) = p\) and \(P(X=0) = 1-p\) for \(p\in[0,1]\).
Uniform distribution \(X\sim uniform(\mathcal X)\) is \(\mathcal X\) is a non-empty finite set and \(X\) takes values in \(\mathcal X\) with equal probability.
Binomial distribution \(X\sim binomial(n, p)\) if \(X\) is identically distributed to the number of success in \(n\) independent trails with success probability \(p\).
Geometric distribution \(X \sim geometric(p)\) the number of independent Bernoulli trials until the first success.
Negative binomial distribution \(X\sim neg-bin(k, p)\) the number of independent Bernoulli trials until the kth success.
Hypergeometric distribution \(X\sim hypergeo(n, r, m)\) the number of black balls when \(m\) balls are drawn without replacement from a jar or \(n\) balls, and \(r\) of them are black.
Poission distribution \(X\sim Poisson(\lambda)\) the number of events occurring in a fixed interval of time or space if these events occur with a known constant mean rate and independently of the time since the last event.
Continuous Distribution
\(X\) is continuous if for all real number interval \([a,b]\), there is some probability density function \(f: \mathbb R\rightarrow \mathbb R, f> 0\) s.t.
Note that if we can find a well defined pdf for a continuous distribution, we have its definition.
Uniform distribution \(X\sim uniform(a, b)\) if \(P(c<X<d) = \frac{d-c}{b-a}\) for \(a\leq c\leq d\leq b\).
Exponential distribution \(X\sim exponential(\lambda)\) the time between events in a Poisson point process
Gamma distribution \(X\sim Gamma(\alpha, \beta)\) is a family of continuous distributions parameterized by shape \(\alpha\), rate \(\beta\) (or scale \(\theta = \beta^{-1}\))
Normal distribution \(Z \sim \mathcal N(\mu, \sigma^2)\) the most common continuous distribution parameterized by mean \(\mu\in\mathbb R\) and standard deviation \(\sigma > 0\)
Cumulative Distribution Function
The cumulative distribution function of \(X\) is the function
\(F\) has the following properties 1. nondecreasing: since $\forall x\leq y, {X\leq x} \subset {X\leq y} $ 2. \(\lim_\infty F(x) = 1, \lim_{-\infty} F(x) = 0\): consider the two events \(\{X\leq \infty\} = S, \{X\leq -\infty\} = \emptyset\) 3. \(F\) is right continuous, \(\lim_{y\rightarrow x-} F(y) = F(x)\) 4. \(F(x-):=\lim_{y\rightarrow x+} F(y) = P(X < x)\) 5. \(P(X=x) = F(x) - F(x-)\)
Note that for any function \(F\) that satisfies properties 1., 2., 3. It is a cdf.
p-quantile of a r.v. \(X\) is \(x\) s.t. \(P(X\leq x) \geq p\) and \(P(X\geq x) \geq 1-p\), and lower quartile, median, upper quartile is the \(0.25\)-quantile, \(0.5\)-quantile, \(0.75\)-quantile, respectively. Inter quartile range (IQR) is the difference between upper and lower quartile.