Skip to content

Instantly share code, notes, and snippets.

@NotAProton
Created November 21, 2024 21:47
Show Gist options
  • Save NotAProton/8d30e12a1b8419165be6a6b797864d59 to your computer and use it in GitHub Desktop.
Save NotAProton/8d30e12a1b8419165be6a6b797864d59 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 |
| S² | 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_x = \frac{1}{\Phi(1-x)}$
### Parameters
| Parameter | Meaning |
|-----------|---------|
| α | Significance level (e.g., 0.05 for 95% CI) |
| $z_{\alpha/2}$ | Critical value from standard normal distribution |
| σ | 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 |
## 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