If some characters seem to be missing, it's because MathJax is not loaded correctly. Refreshing the page should fix it.
Formally, a random variable is a measurable function
The randomness comes from the randomness of the outcomes in
Informally, a random variable is a variable that probabilistically takes on different values. You can think of a random variable as being like a variable in a programming language. They take on values, have types, and have domains over which they are applicable.
Random variable is a general concept. Almost everything in life can be described using a random variable. The time it takes you to commute to work is a normal random variable. The number of people you date before finding your life partner is a geometric random variable.
A probability distribution is a function that describes possible outcomes of a random variable along with its corresponding probabilities.
Also known as the Gaussian random variable, this is the single most important random variable. It's parameterized by a random variable, parametrized by a mean
The term we want to go over in this function is
Here is the PDF of the normal distribution with different parameters.
Also known as the multinoulli distribution, the categorical distribution is a generalization of the Bernoulli distribution. It describes the possible results of a random variable that can take on one of
A binomial random variable represents the number of successes in n successive independent trials, each succeeding with probability
Below is the PMF of the binomial distribution with different parameters.
The multinomial random variable is a generalization of the binomial distribution. Instead of having only two outcomes like with a coin flip, it can have multiple outcomes like with a k-sided die. When the number of trials is 1, it's the categorical distribution. $$ X \sim \text{Multi}(n, \pi) \text{ with } \pi = (p_1,p_2, ..., p_k ) \text{ and }\sum_{i=1}^kp_i = 1 \ P(X=(x_1, x_2, ..., x_k)) = \frac{n!}{x_1!x_2! ... x_k!} \prod_{i=1}^kp_i{x_i} \text{ with } n = \sum_i^kx_i \ E[X_i] = np_i \ Var(X_i) = np_i(1-p_i) $$
The Poisson distribution is, in my opinion, among the more interesting distributions. It expresses the probability of a given number of events occurring in a fixed interval if these events occur with a known constant rate. This rate is denoted as
One pretty neat perspective is to see the Poisson distribution as an approximation of the Binomial where
Below is the PMF of the Poisson distribution with different values of
Poisson vs binomial according to Data Science Central:
If your question has an average probability of an event happening per unit (i.e. per unit of time, cycle, event) and you want to find the probability of a certain number of events happening in a period of time (or a number of events), then use the Poisson Distribution.
If you are given an exact probability and you want to find the probability of the event happening a certain number of times out of x (i.e. 10 times out of 100, or 99 times out of 1000), use the Binomial Distribution formula.
If each trial has the probability of success of p, then the geometric random variable represents the number of independent trials until the first success. One example is the number of candidates you have to interview until you hire someone.
Below is the PMF of the geometric distribution with different values of
Beta is my favorite distribution (what do you mean you don't have a favorite distribution?). It's a random variable that estimates another random variable.
Say, we have a coin with an unknown probability of turning heads. Let
The beta random variable is represented using two variables:
We can also incorporate a priori belief in the beta distribution. For example, if before even flipping the coin, we believe that the coin has a moderate chance of being biased towards heads, we can set the a priori to be
Below is the PDF of the geometric distribution with different parameters.
The multivariate generalization of the beta random variable is called Dirichlet.
A class of distributions is in the exponential family if it can be written in the form:
$$ p(x; \eta) = h(x)\exp(B(\eta)T(x) - a(\eta)) $$ where:
-
$$\eta$$ is the parameter of the distribution, e.g. if it's the normal distribution then$$\eta = (\mu, \sigma)$$ . -
$$T(x)$$ is the sufficient statistic. For most distributions,$$T(x) = x$$ . For the beta distribution,$$T(x) = (\log x, \log(1-x))$$ . -
$$a(\eta)$$ is the normalization constant so that the expression integrates to 1.
The exponential family of distribution is important because it provides a general framework for working with many of the most common distributions, including the Bernoulli, binomial, Poisson, normal, and more.
You can write the PMF and PDF of those distributions to match the form defined above. For example, given the Poisson random variable
More examples that show that other distributions belong to the exponential family can be found here and here.
A joint probability distribution gives the probability of two or more events happening at the same time. For example, given two discrete random variables
A marginal distribution gives the probabilities of various values of a subset of variables without reference to the values of the other variables. For example, given the joint distribution of
A conditional probability distribution gives the probability of a subset of events occurring assuming that other events also occur. One example is
This book was created by Chip Huyen with the help of wonderful friends. For feedback, errata, and suggestions, the author can be reached here. Copyright ©2021 Chip Huyen.