Collection of notes for various classes I've taken.
A continuous random variable is a variable that can take on any value within a given interval. Examples include height, weight, or the time it takes for an event to occur.
A probability density function ($pdf$), $f(x)$, defines the probabilistic properties of a continuous r.v. It satisfies the following conditions:
$f(x) \geq 0$ for all $x \in R$.
The total area under the curve is 1: $\int_{-\infty}^{\infty}{f(x)dx}=1$.
The probability of the variable falling within a range $(a, b)$ is the area under the curve between those points: $P(a<x<b)=\int_{a}^{b}{f(x)dx}$. Note: For a continuous variable, the probability of it taking on an exact value is zero, i.e., $P(X=c)=0$.
Example: The time a bus arrives is uniformly distributed between 8:00 AM and 8:10 AM. The PDF is $f(x) = 1/10$ for $0 \leq x \leq 10$ (where $x$ is minutes past 8:00 AM) and $f(x) = 0$ otherwise.
Expected Value:
\[E(X)=\mu_X=\int_{-\infty}^{\infty}{xf(x)dx}\]Variance:
\[Var(X)=E(X^2)-\mu_X^2=\int_{-\infty}^{\infty}x^2f(x)dx-\mu_X^2\]The Bernoulli random variable, named after Swiss mathematician Jacob Bernoulli, is the simplest discrete random variable. It models a single trial with only two possible outcomes: “success” or “failure”.
Success is typically assigned the value $X=1$.
Failure is assigned the value $X=0$.
The probability of success is denoted by $p$, and the probability of failure is $1-p$.
Example: A single coin flip where heads is a success. $X=1$ for heads, $X=0$ for tails. If the coin is fair, $p=0.5$.
$X=x$ | 0 | 1 |
---|---|---|
$P(X=x)$ | $1-p$ | $p$ |
Probability Mass Function (PMF):
\[P(X=x) = p^x(1-p)^{1-x}, \quad \text{for } x \in \{0, 1\}\]Expected Value:
\[E(X) = p\]Variance:
\[Var(X) = p(1-p)\]When you perform a sequence of independent and identical Bernoulli trials, you can model different processes depending on what you’re interested in. The two most common random variables arising from such sequences are the Binomial and Geometric random variables.
The Binomial random variable, $Y$, counts the total number of successes in a fixed number of trials, $n$.
Notation: $Y \sim B(n,p)$
Possible values for Y: $0, 1, 2, \dots, n$.
PMF:
\[P(Y=k) = \binom{n}{k}p^k(1-p)^{n-k}, \quad \text{where } \binom{n}{k} = \frac{n!}{k!(n-k)!}\]Expected Value:
\[E(Y) = np\]Variance:
\[Var(Y) = np(1-p)\]The Geometric random variable, $Z$, models the number of trials needed to achieve the first success.
Possible values for Z: $1, 2, 3, \dots$.
Expected Value:
\[E(Z) = \frac{1}{p}\]Variance:
\[Var(Z) = \frac{1-p}{p^2}\]Fixed vs. Variable Trials: The most crucial difference is that the Binomial distribution is for a fixed number of trials ($n$), while the Geometric distribution is for a variable number of trials until the first success.
Independence: Both models assume that each Bernoulli trial is independent of the others. If the trials are not independent, these models are not appropriate. For instance, drawing cards from a deck without replacement would not be a sequence of independent Bernoulli trials.