Overview: Probability distributions
How to use
This overview of probability distributions, will (where available) contain the following content on each distribution:
Where to use
Notation
Parameter(s) for use
Mean/expected value. In all cases, the mean equals the expected value, and the expected value of \(X\) will be represented as \(\mathbb{E}(X)\). See Guide: Expected values, variance, standard deviation for more.
Variance, which is represented as \(\mathbb{V}(X)\). See Guide: Expected values, variance, standard deviation for more.
Probability mass function (PMF) for discrete random variables, or the probability density function (PDF) for continuous random variables. See Guide: PMFs, PDFs, CDFs for more.
Cumulative distribution function (CDF), where possible. See Guide: PMFs, PDFs, CDFs for more.
Interactive figure, where possible.
Example of usage.
Although this overview is not an exhaustive list of all possible probability distributions, this overview can be treated as an introduction to commonly used types of distributions.
Discrete random variables
Uniform distribution (discrete)
Where to use: The discrete uniform distribution is used when all integer outcomes \(x\) in the interval \(a\) to \(b\) are equally likely. \(X\) is a random variable for integer outcomes \(x\) where for \(a \leq x \leq b\), and the probability of each outcome \(1/n\), where \(n = b - a + 1\).
Notation: \(X \sim \textrm{Uniform}(a,b)\) or \(X \sim U(a,b)\)
Parameters: The numbers \(a,b\) are integers where
- \(a\) is the minimum value of an outcome
- \(b\) is the maximum value of an outcome
There are \(n\) outcomes in total, with \(n = b - a + 1\).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \dfrac{a+b}{2}.\) | |
| Variance | \(\mathbb{V}(X) = \dfrac{n^2-1}{12}.\) | |
| PMF | \(\mathbb{P}(X=x)=\frac{1}{n}\) | |
| CDF | \(\mathbb{P}(X\leq x)= \begin{cases} 0 & \textsf{if } x \leq a \\\dfrac{\lfloor x \rfloor - a + 1}{n} & \textsf{if } a< x<b \\1 & \textsf{if } x \geq b \end{cases}\) | \(\lfloor x \rfloor\) is the floor function |
Figure
Example: You roll a fair six-sided die, where all outcomes (\(1, 2, 3, 4, 5,\) and \(6\)) are equally likely. This can be expressed as \(X \sim U(1,6)\). It means \(1\) is the minimum value and \(6\) is the maximum value, where all discrete values of \(X\) for \(1 \leq x \leq 6\) are equally likely.
Bernoulli distribution
Where to use: The Bernoulli distribution is used for binary data, where one trial is conducted with only two possible outcomes. Examples include success/failure, yes/no, and heads/tails. \(X\) indicates whether the trial is a success (when \(X=1\)) or failure (when \(X=0\)).
Notation: \(X \sim \textrm{Bernoulli}(p)\)
Parameter: The real number \(p\) is the probability of success in a trial (where \(0 \le p \le 1\)).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = p\) | |
| Variance | \(\mathbb{V}(X) = p(1-p)\) | |
| PMF | \(\mathbb{P}(X=x)=\begin{cases} 1-p & \textsf{if }x=0 \\p & \textsf{if }x=1\end{cases}\) | |
| CDF | \(\mathbb{P}(X\leq x)= \begin{cases} 0 & \textsf{if } x< 0 \\1-p & \textsf{if } 0\leq x<1 \\p & \textsf{if } x\geq1 \end{cases}\) |
Example: You flip a coin, and the probability of getting ‘heads’ is \(0.5\). Taking ‘heads’ as a success, this can be expressed as \(X \sim \textrm{Bernoulli}(0.5)\), meaning the probability of success in each trial is \(0.5\).
Binomial distribution
Where to use: The binomial distribution is used when there are a fixed number of trials (\(n\)) and only two possible outcomes for each trial, representing \(n\) many Bernoulli trials. Here, the random variable \(X\) represents the number of successes.
Notation: \(X \sim \textrm{Binomial}(n,p)\) or \(X \sim B(n,p)\).
Parameters: Two numbers \(n,p\) where: - \(n\) is an integer representing the number of trials, - \(p\) is a real number representing the probability of success of a trial (where \(0 \le p \le 1\)).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = np\) | |
| Variance | \(\mathbb{V}(X) = np(1-p)\) | |
| PMF | \(\mathbb{P}(X=x)=\dfrac{n!}{(n-x)!x!}p^xq^{(n-x)}\) | |
| CDF | \(\mathbb{P}(X\leq x)=I_{q}(n-\lfloor x \rfloor,1+\lfloor x \rfloor)\) | \(I_x(a,b)\) regularized incomplete beta function, \(\lfloor x \rfloor\) the floor function |
Figure
Example: You flip a coin \(10\) times, and the probability of getting ‘heads’ is \(0.5\). Taking ‘heads’ as a success, this can be expressed as \(X \sim B(10, 0.5)\), meaning \(10\) trials are conducted, where the probability of success in each trial is \(0.5\).
Multinomial distribution
Where to use: The multinomial distribution is used when there are a fixed number of trials (\(n\)) and more than two possible outcomes for each trial. \(X_{i}\) represents the number of times a specific outcome occurs. Therefore, the mean, variance, and expected value of multinomial distributions are calculated for each \(X_{i}\), not \(X\).
Notation: \(X \sim \textrm{Multinomial}(n,\mathbf{p})\) or \(X \sim M(n,\mathbf{p})\)
Parameters: Three parameters \(n,k,\mathbf{p}\), where
- \(n\) is an integer representing the number of trials
- \(k\) is an integer representing the number of mutually exclusive outcomes
- \(\mathbf{p} = [p_{1},\ldots,p_{k}]\) is a vector with real numbered probabilities \(0\leq p_i\leq 1\) for each outcome (\(1\leq i \leq k\)).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X_{i}) = np_{i}\) | |
| Variance | \(\mathbb{V}(X_{i}) = np_{i}(1-p_{i})\) | |
| PMF | \(\mathbb{P}(X_{1}=x_{1},\ldots,X_{k}=x_{k})=\dfrac{n!}{x_{1}!\ldots x_{k}!}p^{x_{1}}\ldots p^{x_{k}}\) |
Example: There is a candy jar consisting of 5 red candies, 3 blue candies, and 7 yellow candies.
The probability of drawing a red candy is \(\dfrac{1}{3}\).
The probability of drawing a blue candy is \(\dfrac{1}{5}\).
The probability of drawing a yellow candy is \(\dfrac{7}{15}\)
You draw 3 candies from the jar, replacing as you go along. This can be expressed as \(X \sim M\left(3,\frac{1}{3},\frac{1}{5},\frac{7}{15}\right)\). It means 3 trials are conducted, where \(p_{1}=\frac{1}{3}\), \(p_{2}=\frac{1}{5}\), and \(p_{3}=\frac{7}{15}\) (and \(k=3\)).
Poisson distribution
Where to use: The Poisson distribution is used when a specific event occurs at some rate \(\lambda\), and you are counting \(X\), the number of times this event occurs in some interval.
Notation: \(X \sim \textrm{Poisson}(\lambda)\) or \(X \sim \textrm{Pois}(\lambda)\).
Parameter: \(\lambda\) is the integer number of times an event occurs within a specific period of time.
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \lambda\) | |
| Variance | \(\mathbb{V}(X) = \lambda\) | |
| PMF | \(\mathbb{P}(X=x)=\dfrac{\lambda^xe^{-\lambda}}{x!}\) | |
| CDF | \(\displaystyle\mathbb{P}(X\leq x)=\sum^{\lfloor x \rfloor}_{i=1}\frac{\lambda^xe^{-\lambda}}{x!}\) | \(\lfloor x \rfloor\) the floor function |
Figure
Example: Customers enter Cantor’s Confectionery at an average rate of 20 people per hour, and you want to see the likelihood that \(X\) number of customers walks in. This can be expressed as \(X \sim \textrm{Pois}(20)\).
Negative binomial distribution
Where to use: The negative binomial distribution is often used to handle over-dispersed data, which means the variance exceeds the mean. It can serve as an alternative to the Poisson distribution, as the Poisson distribution assumes that the mean is equal to the variance. \(X\) represents the number of trials required to reach the targeted number of successes \(r\).
Notation: \(X \sim \textrm{NB}(r,p)\)
Parameters: Two numbers \(r,p\) where:
- \(r\) is an integer representing the targeted number of successes,
- \(p\) is a real number representing the probability of success in a single trial (where \(0 \le p \le 1\)).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \dfrac{r(1-p)}{p}\) | |
| Variance | \(\mathbb{V}(X) = \dfrac{r(1-p)}{p^2}\) | |
| PMF | \(\mathbb{P}(X=x)=\dfrac{(x+r-1)!}{(r-1)!x!}(1-p)^xp^r\) | |
| CDF | \(\displaystyle\mathbb{P}(X\leq x)=\sum^{x}_{i=1}\frac{(x+r-1)!}{(r-1)!x!}(1-p)^xp^r\) |
Figure
Example: You flip a coin multiple times, and the probability of getting ‘heads’ is \(0.5\). You decide to stop flipping the coin once you get \(3\) ‘heads’; these do not have to be consecutive. Taking ‘heads’ as a success, this can be expressed as \(X \sim \textrm{NB}(3,0.5)\). It means the probability of success is \(0.5\), and you will stop conducting trials after you reach \(3\) successes.
Geometric distribution
Where to use: The geometric distribution is used to count \(X\), the number of Bernoulli trials until a successful outcome is reached.
Notation: \(X \sim \textrm{Geometric}(p)\)
Parameter: \(p\) is the real number representing the probability of success in a single trial (where \(0 \le p \le 1\)).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \dfrac{1}{p}\) | |
| Variance | \(\mathbb{V}(X) = \dfrac{1-p}{p^2}\) | |
| PMF | \(\mathbb{P}(X=x)=(1-p)^{k-1}p\) | |
| CDF | \(\displaystyle\mathbb{P}(X\leq x)=\begin{cases} 1-(1-p)^x & \textsf{if } x\geq0 \\0 & \textsf{if } x<0\end{cases}\) |
Figure
Example: You flip a coin multiple times, and the probability of getting ‘heads’ is \(0.5\). You decide to stop flipping the coin once you get a ‘heads’. Taking ‘heads’ as a success, this can be expressed as \(X \sim \textrm{Geometric}(0.5)\). It means the probability of success is \(0.5\), and you will stop conducting trials after you reach a success.
Continuous random variables
Uniform distribution (continuous)
Where to use: The continuous uniform distribution is used when all continuous values \(x\) in the interval \(a\) to \(b\) are equally likely. The random variable \(X\) represents the outcome.
Notation: \(X \sim \textrm{Uniform}(a,b)\) or \(X \sim U(a,b)\).
Parameters: Two real numbers \(a,b\), where
\(a\) is the minimum value of an outcome,
\(b\) is the maximum value of an outcome.
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \dfrac{a+b}{2}\) | |
| Variance | \(\mathbb{V}(X) = \dfrac{(b-a)^2}{12}\) | |
| \(\mathbb{P}(X=x)=\begin{cases} \dfrac{1}{b-a} & \textsf{if } a \leq x \leq b \\0 & \textsf{otherwise}\end{cases}\) | ||
| CDF | \(\displaystyle\mathbb{P}(X\leq x)=\begin{cases} 0 & \textsf{if } x< a \\\dfrac{x-a}{b-a} & \textsf{if } a\leq x\leq b \\1 & \textsf{if } x>b \end{cases}\) |
Figure
Example:
A machine from Cantor’s Confectionery is programmed to chop long candy bars into pieces, each with a length between 30 millimetres to 50 millimetres. Due to variations in the machine, each continuous value between this interval is equally likely. This can be expressed as \(X \sim U(30,50)\). It means 30 is the minimum value and 50 is the maximum value, where all continuous values of \(X\) for \(30 \leq x \leq 50\) are equally likely.
Normal distribution
Where to use: The normal distribution is used to model continuous random variables, which can include any positive or negative real values. The use of this distribution is often justified by the Central Limit Theorem: as the sample size increases, the distribution of sample means will resemble a normal distribution more and more closely.
Notation: \(X \sim \textrm{Normal}(\mu,\sigma^2)\) or \(X \sim N(\mu,\sigma^2)\)
Parameters: Two real numbers \(\mu\) and \(\sigma^2\).
- \(\mu\) is the centre of the distribution (the mean/expected value).
- \(\sigma^2\) is the measure of how the distribution is spread (the variance).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \mu\) | |
| Variance | \(\mathbb{V}(X) = \sigma^2\) | |
| \(\mathbb{P}(X=x)=\dfrac{1}{\sqrt{2\pi\sigma^2}}\exp\left({-\dfrac{(x-\mu)^2}{2\sigma^2}}\right)\) | \(\exp(y) = e^y\) | |
| CDF | \(\displaystyle\mathbb{P}(X\leq x)=\dfrac{1}{2}\left[1+\textrm{erf}\left(\dfrac{x-\mu}{\sigma\sqrt{2}}\right)\right]\) | \(\textrm{erf}(x)\) is the error function of \(x\) |
Figure
Example: The lengths of chocolate bars produced by Cantor’s Confectionery follow a normal distribution with a mean of \(5.6\) inches and a variance of \(1.44\). This can be expressed as \(X \sim N(5.6, 1.44)\), meaning the data is normally distributed, centered at \(5.6\) with standard deviation \(\sqrt{1.44} = 1.2\).
Lognormal distribution
Where to use: The lognormal distribution is used to model continuous random variables with values that are both real and non-negative, wherein the logarithms of these variables follow a normal distribution. That is to say, if the random variable \(X\) is lognormally distributed, then the random variable \(Y = \ln(X)\) is normally distributed (where \(\ln\) is the natural logarithm).
Notation: \(X \sim \textrm{Lognormal}(\mu,\sigma^2)\)
Parameters: As with the normal distribution, two numbers \(\mu\) and \(\sigma^2\) where:
- \(\mu\) is the expected value of the normally distributed random variable \(Y = \ln(X)\),
- \(\sigma^2\) is the variance of the normally distributed random variable \(Y = \ln(X)\).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \exp(\mu+\frac{\sigma^2}{2})\) | \(\exp(y) = e^y\) |
| Variance | \(\mathbb{V}(X) = [\exp(\sigma^2)-1]\exp(2\mu+\sigma^2)\) | \(\exp(y) = e^y\) |
| \(\mathbb{P}(X=x)=\dfrac{1}{x\sigma\sqrt{2\pi}}\exp\left(-\dfrac{(\ln(x)-\mu)^2}{2\sigma^2}\right)\) | \(\exp(y) = e^y\) | |
| CDF | \(\displaystyle\mathbb{P}(X\leq x)=\dfrac{1}{2}\left[1+\textrm{erf}\left(\dfrac{\ln(x)-\mu}{\sigma\sqrt{2}}\right)\right]\) | \(\textrm{erf}(x)\) is the error function of \(x\) |
Figure
Example: The logarithms of Cantor’s Confectionery’s stock prices follow a normal distribution. The mean of the stock prices’ natural logarithms is \(8.01\), whereas the variance of the stock prices’ natural logarithms is \(3\). This can be expressed as \(X \sim \textrm{Lognormal}(8.01, 3)\), meaning the logarithm of the location parameter is \(8.01\) and the logarithm of scale parameter is \(3\).
Exponential distribution
Where to use: The exponential distribution is used when \(X\) is the waiting time before a certain event occurs. It is similar to the geometric distribution, but the exponential distribution uses a continuous waiting time instead of the integer number of trials.
Notation: \(X \sim \textrm{Exponential}(\lambda)\) or \(X \sim \textrm{Exp}(\lambda)\)
Parameter: An integer \(\lambda\), representing number of times an event occurs within a specific period of time.
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \frac{1}{\lambda}\) | |
| Variance | \(\mathbb{V}(X) = \frac{1}{\lambda^2}\) | |
| \(\mathbb{P}(X=x)=\lambda e^{-\lambda x}\) | ||
| CDF | \(\mathbb{P}(X \leq x)=1-e^{-\lambda x}\) |
Figure
Example: Customers enter Cantor’s Confectionery at an average rate of 20 people per hour, and the time distance between each visit can be modelled by an exponential distribution. This can be expressed as \(X \sim \textrm{Exp}(20)\).
Gamma distribution
Where to use: The gamma distribution generalizes the exponential distribution, allowing for greater or lesser variance. It is used to model positive continuous random variables that have skewed distributions.
Notation: \(X \sim \textrm{Gamma}(\alpha,\theta)\) or \(X \sim \textrm{Gam}(\alpha,\theta)\)
Parameters: Two real numbers \(\alpha\) and \(\theta\), which are related to the mean \(\mu\) and variance \(\sigma^2\):
- \(\alpha = \frac{\mu^2}{\sigma^2}\) (shape parameter)
- \(\theta=\frac{\sigma^2}{\mu}\) (scale parameter)
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \alpha\theta\) | |
| Variance | \(\mathbb{V}(X) = \alpha\theta^2\) | |
| \(\mathbb{P}(X=x)=\dfrac{x^{\alpha-1}\exp\left(-\frac{x}{\theta}\right)}{\Gamma(\alpha)\theta^{\alpha}}\) | \(\Gamma(x)\) the gamma function of \(x\) | |
| CDF | \(\mathbb{P}(X \leq x)=\dfrac{\textrm{Gam}\left(\alpha,\frac{x}{\theta}\right)}{\Gamma(\alpha)}\) | \(\textrm{Gam}(\alpha,\theta)\) is the PDF of the gamma distribution |
Figure
Example: You collect historical data on the time to failure of a machine from Cantor’s Confectionery. The mean is 83 days and the variance is 50.3. You can then use this to estimate the shape and scale parameters of the gamma distribution:
\(\alpha = \frac{83^2}{50.3} = 136.958250497 \approx 137\)
\(\theta = \frac{50.3}{83} = 0.60602409638 \approx 0.61\)
The distribution can be expressed as \(X \sim \textrm{Gam}(137,0.61)\), where the shape parameter is 137 and the scale parameter is 0.61.
Beta distribution
Where to use: The beta distribution is used to model the distribution of probabilities or proportions. Hence, the random variable \(0 \leq X \leq 1\).
Notation: \(X \sim \textrm{Beta}(\alpha,\beta)\)
Parameters: Two positive real numbers \(\alpha,\beta\), which are shape parameters. These can be specified as follows in terms of \(n\) and \(k\) where \(n\) is the number of Bernoulli trials and \(k\) is the number of successes:
- \(\alpha = k + 1\)
- \(\beta = n - k + 1\)
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \dfrac{\alpha}{\alpha+\beta}\) | |
| Variance | \(\mathbb{V}(X) = \dfrac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}\) | |
| \(\mathbb{P}(X=x)=\dfrac{x^{\alpha-1}(1-x)^{\beta-1}}{\textrm{B}(\alpha,\beta)}\) | \(\textrm{B}(x,y)\) is the beta function | |
| CDF | \(\mathbb{P}(X \leq x)=I_{x}(\alpha,\beta)\) | \(I_{x}(a,b)\) is the regularized incomplete beta function |
Figure
Example: Cantor’s Confectionery is visited by 10 customers, and 6 of them purchase something from the store. Taking the buying customers as successes and the total visiting customers as number of trials, there would be 6 successes, allowing you to find the following parameters:
\(\alpha = 6 + 1 = 7\)
\(\beta = 10 - 6 + 1 = 5\)
Then the distribution of the probabilities of a customer purchasing from Cantor’s Confectionery can be expressed as \(X \sim \textrm{Beta}(7,5)\), meaning the first shape parameter is 7 and the second shape parameter is 5.
χ^2 distribution
Where to use: The \(\chi^2\) distribution is used for hypothesis testing, such as for goodness of fit tests and tests for independence. (See Guide: Introduction to hypothesis testing for more.) It is a special case of the gamma distribution, as \(\chi^2(k)=\textrm{Gam}(\frac{k}{2},2)\).
Notation: \(X \sim \chi^2(k)\)
Parameter: The integer \(k\) is the number of degrees of freedom in the sample.
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = k\) | |
| Variance | \(\mathbb{V}(X) = 2k\) | |
| \(\mathbb{P}(X=x)=\dfrac{x^{\frac{k}{2}-1}\exp\left({-\frac{x}{2}}\right)}{2^\frac{k}{2}\Gamma\left(\frac{k}{2}\right)}\) | \(\Gamma(x)\) is the gamma function | |
| CDF | \(\mathbb{P}(X \leq x)=\dfrac{1}{\Gamma\left(\frac{k}{2}\right)}\textrm{Gam}\left(\frac{k}{2},\frac{x}{2}\right)\) | \(\Gamma(x)\) is the gamma function, \(\textrm{Gam}(\alpha,\theta)\) is the PDF of the gamma distribution |
Figure
Examples:
Goodness of fit example: You have a six-sided die with six possible outcomes: \(1, 2, 3, 4, 5,\) and \(6\). You calculate the expected frequencies of each outcome. Then you roll the die many times and record the observed frequencies of each outcome. Since there are 6 categories, \[\textsf{degrees of freedom = number of categories} - 1 = 6 - 1 = 5\] This can be expressed as \(X \sim \chi^2(5)\), meaning the degrees of freedom is \(5\).
Test for independence example: You are investigating whether there is a correlation between two variables: candy colour and flavour. You have \(5\) categories of colours and 3 categories of flavours. Calculating the degrees of freedom can be done with the formula: \[(\textsf{categories of colours} - 1)(\textsf{categories of flavours} - 1) = (5-1)(3-1)=(4)(2)=8.\] You can model \(X \sim \chi^2(8)\), meaning that there are \(8\) degrees of freedom.
\(F\)-distribution
Where to use: The \(F\)-distribution is used for the ratio \((X/d_1)/(Y/d_2)\) of two independent random \(\chi^2\) variables \(X\sim \chi^2(d_1)\) and \(Y\sim \chi^2(d_2)\). It is commonly used as a reference distribution in hypothesis testing to compare two variances or more than two means, such as Analysis of Variance (ANOVA) tests.
Notation: \(X \sim F(d_{1},d_{2})\)
Parameters: Two integers \(d_1\) and \(d_2\), where - \(d_{1}\) degrees of freedom for the random variable \(X\sim \chi^2(d_{1})\). - \(d_{2}\) degrees of freedom for the random variable \(Y\sim \chi^2(d_{2})\).
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = \dfrac{d_{2}}{d_{2}-2}\) | \(d_2>2\) |
| Variance | \(\mathbb{V}(X) = \dfrac{2d_{2}(d_{1}+d_{2}-2)}{d_{1}(d_{2}-2)^2(d_{2}-4)}\) | |
| \(\mathbb{P}(X=x)=\dfrac{\sqrt{\frac{(d_{1}x)^{d_{1}}d_{2}^{d_{2}}}{(d_{1}x+d_{2})^{d_{1}+d_{2}}}}}{x\textrm{B}\left(\frac{d_{1}}{2},\frac{d_{2}}{2}\right)}\) | \(\textrm{B}(x,y)\) is the beta function | |
| CDF | \(\mathbb{P}(X \leq x)=I_{\frac{d_{1}x}{d_{1}x+d_{2}}}(\frac{d_{1}}{2},\frac{d_{2}}{2})\) | \(I_{x}(a,b)\) is the regularized incomplete beta function |
Figure
Example: You have three independent groups of data containing Cantor’s Confectionery chocolate bar lengths, and the total sample size is 90. From this, you would like to conduct an ANOVA test investigating if there is a statistically significant difference between the means of each group. You can find the degrees of freedom using the following methods:
\(\textsf{numerator degrees of freedom = number of groups} - 1 = 3 - 1 = 2\)
\(\textsf{denominator degrees of freedom = sample size - number of groups} = 90 - 3 = 87\)
The \(F\) distribution, which will be used as a reference distribution for the ANOVA test, can be expressed as \(X \sim F(2,87)\), meaning the numerator degrees of freedom is \(2\) and the denominator degrees of freedom is \(87\).
\(t\)-distribution
Where to use: The \(t\)-distribution is a special case of the \(F\)-distribution, as \((t(\nu))^2 = F(1,\nu)\). This distribution is used for continuous random variables with heavier tails than the normal distribution, and it is often employed in hypothesis testing where the population standard deviation is unknown. (See Guide: Introduction to hypothesis testing for more.)
Notation: \(X \sim t(\nu)\)
Parameter: The integer \(\nu\) representing the degrees of freedom.
| Quantity | Value | Notes |
|---|---|---|
| Mean | \(\mathbb{E}(X) = 0\) | |
| Variance | \(\mathbb{V}(X) = \dfrac{\nu}{\nu -2}\) | \(\nu > 2\) |
| \(\mathbb{P}(X=x)=\dfrac{\Gamma\left(\frac{\nu+1}{2}\right)}{\Gamma\left(\frac{\nu}{2}\right)\sqrt{\pi \nu}}\left(1+\frac{x^2}{\nu}\right)^{-\frac{\nu+1}{2}}\) | \(\Gamma(x)\) is the gamma function | |
| CDF | \(\mathbb{P}(X \leq x)=\dfrac{1}{2}+x\Gamma\left(\frac{\nu+1}{2}\right)\left(\frac{_{2}F_{1}\left(\frac{1}{2},\frac{\nu+1}{2};\frac{3}{2};-\frac{x^2}{\nu}\right)}{\Gamma\left(\frac{\nu}{2}\right)\sqrt{\pi \nu}}\right)\) | \(\Gamma(x)\) is the gamma function, \(_{2}F_{1}(a,b;c;z)\) is the hypergeometric function |
Figure
Example: You have a sample of 40 measurements of Cantor’s Confectionery chocolate bar lengths. From this, you would like to conduct a one sample \(t\)-test comparing the sample to a hypothesized mean. You find the degrees of freedom:
\[ \textsf{degrees of freedom = sample size} - 1 = 40 - 1 = 39 \]
The \(t\) distribution, which will be used as a reference distribution for the \(t\)-test, can be expressed as \(X \sim t(39)\), meaning the degrees of freedom is 39. See Guide: Introduction to hypothesis testing for more.
Further reading
For more information on hypothesis testing, please see Guide: Introduction to hypothesis testing.
For more information on probability, please see Guide: Introduction to probability.
For more information on mean, expected value, variance, and standard deviation, please see Guide: Expected value, variance, standard deviation.
For more information on PMFs, PDFs, and CDFs, please see Guide: PMFs, PDFs, and CDFs.
Version history
v1.0: initial version created 04/25 by Michelle Arnetta as part of a University of St Andrews VIP project.
- v1.1: deprecated shinylive apps replaced 09/26 by tdhc.