Sec 5.1: Discrete RVs & Distributions
Sec 5.2: Mean & Standard Deviation
Sec 5.3: Binomial Distribution
Sec 5.4: Poisson Distribution
Probabilities must be between 0 and 1.
| x (Rating) | P(x) |
|---|---|
| 1 Star | 0.10 |
| 2 Stars | 0.25 |
| 3 Stars | 0.40 |
| 4 Stars | ? |
In a large number of independent observations, the proportion of times each value occurs will approximate the probability distribution.
Solid:Empirical |Dashed:Theoretical
The long-run average value of observations.
Result: $\mu = 1.3$
| $x$ | $P(x)$ | $x \cdot P(x)$ |
|---|---|---|
| 0 | 0.200 | ? |
| 1 | 0.425 | ? |
| 2 | 0.275 | ? |
| 3 | 0.075 | ? |
| 4 | 0.025 | ? |
| Sum: | ? |
Measures the spread or variability of the random variable (Average distance from the mean).
Often easier for hand calculations as it avoids subtracting the mean at every step.
Product of the first $k$ positive integers.
Ex: $3! = 3 \times 2 \times 1 = 6$
Number of ways to choose $x$ successes in $n$ trials.
Read as "n choose x".
Repeated trials are Bernoulli trials if these conditions are met:
Success ($s$) or Failure ($f$).
Trials must not affect each other.
Fixed number of trials ($n$).
$p < 0.5$
Right Skewed
$p = 0.5$
Symmetric
$p > 0.5$
Left Skewed
Prob ($p$) = 0.5 (Fair Coin)
Problem: A student guesses randomly on a 5-question T/F quiz. What is the probability of getting exactly 3 correct?
Modeling events occurring in a fixed interval of time or space.
$\lambda$: Average number of events per interval.
Even with a steady rate $\lambda$, the count ($x$) varies randomly.
Binomial: Counting Successes in $n$ trials.
Poisson: Counting Events in an interval (Time/Area).
Why Approximate? Easier to calculate$e^{-\lambda}$ than massive factorials in Binomial.
Problem: A coffee shop averages 4 customers per minute during rush hour. What is the probability of getting exactly 6 customers in the next minute?
| Distribution | Parameters | Mean ($\mu$) | Std Dev ($\sigma$) |
|---|---|---|---|
| General Discrete | Table of $x, P(x)$ | $\sum x P(x)$ | $\sqrt{\sum (x-\mu)^2 P(x)}$ |
| Binomial | $n, p$ | $np$ | $\sqrt{np(1-p)}$ |
| Poisson | $\lambda$ | $\lambda$ | $\sqrt{\lambda}$ |
# n=10, p=0.5
dbinom(3, size=10, prob=0.5) # Exactly 3
pbinom(3, size=10, prob=0.5) # 3 or less
# lambda=4
dpois(6, lambda=4) # Exactly 6
ppois(6, lambda=4) # 6 or less