---
title: "Statistics formula notes"
subtitle: "Sample mean, variance and linear models"
---

# Sample mean

For observations $x_1, x_2, \ldots, x_n$, the sample mean is:

$$\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i$$

The mean describes the center of the observations. Check units and sampling ranges before comparing datasets.

# Sample variance

$$s^2=\frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})^2$$

The denominator is $n-1$. The standard deviation $s$ has the same units as the original observations.

# Simple linear model

$$\hat{y}=\beta_0+\beta_1x$$

| Symbol | Meaning |
| :--- | :--- |
| $\beta_0$ | Intercept |
| $\beta_1$ | Coefficient |
| $\hat{y}$ | Predicted value |

# Exercise

Calculate the mean and sample variance of 2, 4 and 6. Explain each symbol. Equations remain editable as native Word equations.
