# Common Formulas

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

The following formulas are in the order in which you learn about them in this textook.  Use the Table of Contents to look for a specific equation.

## Descriptive Statistics

### Mean

$\displaystyle \bar{X} = \dfrac{\sum X}{N}$

### Standard Deviation

$s=\sqrt{\dfrac{\sum(X-\overline {X})^{2}}{N-1}}$

Which is also:  $$s=\sqrt{\dfrac{\sum(X-\overline {X})^{2}}{N-1}}=\sqrt{\dfrac{S S}{d f}}$$

## z-score

### To find the z-score when you have a raw score:

$z=\frac{X-\bar{X}}{s}$

### To find a raw score when you have a z-score:

$x=z s+\overline{X}$

## t-tests

### One-Sample t-test

These are the same formulas, but formatted slightly differently.

$t = \cfrac{(\bar{X}-\mu)}{\left(\cfrac{s} {\sqrt{n}}\right)}$

### Confidence Interval

$\text {Margin of Error }=t \times \left(\dfrac{s}{\sqrt{N}}\right) \nonumber$

$\text { Confidence Interval }=\overline{X} \pm (t \times \left(\dfrac{s}{\sqrt{N}}\right))$

### Independent Sample t-test

$t=\dfrac{(\bar{X}_{1}-\bar{X}_{2})}{\sqrt{\left[\dfrac{\left(n_{1}-1\right) \times s_{1}^{2} + \left(n_{2}-1\right) \times s_{2}^{2}}{n_{1}+n_{2}-2}\right] \times \left(\dfrac{1}{n_{1}} + \dfrac{1}{n_{2}}\right)}}$

### Dependent Sample t-test

#### Conceptual Formula (symbols)

$t = \cfrac{\overline{X}_{D}}{\left(\cfrac{s_{D}}{\sqrt{N}} \right)}$

#### Full Formula

$t = \cfrac{ \left(\cfrac{\Sigma {D}}{N}\right)} { {\sqrt{\left(\cfrac{\sum\left((X_{D}-\overline{X}_{D})^{2}\right)}{(N-1)}\right)} } /\sqrt{N} }$

$S S_{B}=\sum_{EachGroup} \left[ \left(\overline{X}_{group}-\overline{X}_{T}\right)^{2} \times (n_{group}) \right]$

$S S_{W}=\sum_{EachGroup} \left[ \sum \left(\left(X-\overline{X}_{group}\right)^{2}\right) \right]$

$S S_{T}=\sum \left[ \left(X - \overline{X}_{T}\right)^{2} \right]$

$HSD = q \times \sqrt{\dfrac{MSw}{n_{group}}}$

Same as above.

$SS_{Ps} = \left[\sum{\left(\dfrac{(\sum{X_{Ps}})^2}{k}\right)}\right] -\dfrac{\left((\sum{X})^2\right)}{N}$

$SS_{WG} = SS_{T} - SS_{BG} - S_{P} \nonumber$

Same as above.

## Pearson's r (Correlation)

The following formulas are the same.  Use the first one when you already have the standard deviation calculated.

These are paired data, so N is the number of pairs.

$r= \cfrac{ \left( \cfrac{\sum ((x_{Each} - \bar{X_x})\times(y_{Each} - \bar{X_y}) ) }{(N-1)}\right) } {(s_x \times s_y)}$

### SD Not Calculated:

$r = \cfrac{ \left( \cfrac{\sum ((x - \bar{X_x})\times(y - \bar{X_y}) ) }{(N-1)}\right) } {\left( \sqrt{\dfrac{\sum\left((x-\overline {X_x})^{2}\right)}{N-1}} \right) \times \left( \sqrt{\dfrac{\sum\left((y-\overline {X_y})^{2}\right)}{N-1}} \right)}$

## Regression Line Equation

$\widehat{\mathrm{Y}}=\mathrm{a}+(\mathrm{b}\times{X})$

### a (intercept):

$\mathrm{a}=\overline{X_y}- (\mathrm{b} \times \overline{X_x})$

### b (slope):

$\dfrac{\sum(Diff_{x} \times Diff_{y})}{\sum({Diff_{X}}^2)}$

In which "Diff" means the differences between each score and that variable's mean.

## Pearson's $$\chi^2$$ (Chi-Square)

$\chi^{2}=\sum_{Each}\left(\dfrac{\left(E-O\right)^{2}}{E} \right)$

### Expected Frequencies

#### Goodness of Fit:

$\dfrac{N}{k}$

#### Test of Independence:

$E_{EachCell}=\dfrac{RT \times CT}{N}$

In which RT = Row Total and CT = Column Total