Skip to content

Instantly share code, notes, and snippets.

@NotAProton
Last active November 21, 2024 22:10
Show Gist options
  • Save NotAProton/e19a29a68404f4e9aa386b38ef2efa01 to your computer and use it in GitHub Desktop.
Save NotAProton/e19a29a68404f4e9aa386b38ef2efa01 to your computer and use it in GitHub Desktop.

Statistics Quick Reference Guide

Chi-squared Distribution

Formula

$X^2(n) = \text{Gamma}(\frac{n}{2}, \frac{1}{2})$ In a sample:

$\frac{(n-1)S^2}{\sigma^2} \sim X^2(n-1)$

Parameters

Parameter Meaning
n Degrees of freedom
Sample variance
σ² Population variance

Student's t-Distribution

Formula

In a sample: $\frac{\bar{X} - \mu}{S/\sqrt{n}} \sim t(n-1)$ $P(T > t_{p,n}) = p$ Due to symmetry: $t_{1-p,n} = -t_{p,n}$

Parameters

Parameter Meaning
$\bar{X}$ Sample mean
μ Population mean
S Sample standard deviation
n Sample size
p Probability value

Confidence Intervals

Normal Distribution (n > 30)

Formula

$\text{Interval} = \bar{X} \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}}$

where $z_{\alpha/2} = \Phi^{-1}(1-\alpha/2)$

Parameters

Parameter Meaning
α Significance level (e.g., 0.05 for 95% CI)
$z_{\alpha/2}$ Critical value = $\Phi^{-1}(1-\alpha/2)$
σ Population standard deviation

Unknown Variance

Formula

$\text{Interval} = \bar{X} \pm t_{\alpha/2,n-1}\frac{S}{\sqrt{n}}$

Parameters

Parameter Meaning
$t_{\alpha/2,n-1}$ Critical value from t-distribution
S Sample standard deviation

Confidence Interval for Variance

Formula

$\frac{(n-1)S^2}{\chi^2_{1-\alpha/2}} < \sigma^2 < \frac{(n-1)S^2}{\chi^2_{\alpha/2}}$

Parameters

Parameter Meaning
$\chi^2_{\alpha/2}$ Chi-square critical value with n-1 degrees of freedom
Sample variance
n Sample size

Maximum Likelihood Estimation (MLE)

Formulas

Likelihood function: $L(\theta) = \prod f(x_i;\theta)$ Log-likelihood function: $\ell(\theta) = \log(L(\theta))$

Parameters

Parameter Meaning
θ Parameter to be estimated
$f(x_i;\theta)$ Probability density/mass function
$x_i$ Individual observations

Common Steps for MLE

  1. Write the likelihood function
  2. Take the natural log
  3. Find the derivative with respect to θ
  4. Set equal to zero and solve
  5. Verify it's a maximum using second derivative
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment