Skip to main content
Statistics LibreTexts

14.2.3: Formulas

  • Page ID
    46167
  • \( \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}\)
    Basic probability rules
    \(P(A \cap B)=P(A | B) \cdot P(B)\) Multiplication rule
    \(P(A \cup B)=P(A)+P(B)-P(A \cap B)\) Addition rule
    \(P(A \cap B)=P(A) \cdot P(B) \text { or } P(A | B)=P(A)\) Independence test
    Hypergeometric distribution formulae
    \(n C x=\left(\begin{array}{c}{n} \\ {x}\end{array}\right)=\frac{n !}{x !(n-x) !}\) Combinatorial equation
    \(P(x)=\frac{\left(\begin{array}{c}{A} \\ {x}\end{array}\right)\left(\begin{array}{c}{N-A} \\ {n-x}\end{array}\right)}{\left(\begin{array}{c}{N} \\ {n}\end{array}\right)}\) Probability equation
    \(E(X)=\mu=n p\) Mean
    \(\sigma^{2}=\left(\frac{N-n}{N-1}\right) n p(q)\) Variance
    Binomial distribution formulae
    \(P(x)=\frac{n !}{x !(n-x) !} p^{x}(q)^{n-x}\) Probability density function
    \(E(X)=\mu=n p\) Arithmetic mean
    \(\sigma^{2}=n p(q)\) Variance
    Geometric distribution formulae
    \(P(X=x)=(1-p)^{x-1}(p)\) Probability when \(x\) is the first success. Probability when \(x\) is the number of failures before first success \(P(X=x)=(1-p)^{x}(p)\)
    \(\mu=\frac{1}{p}\) Mean Mean \(\mu=\frac{1-p}{p}\)
    \(\sigma^{2}=\frac{(1-p)}{p^{2}}\) Variance Variance \(\sigma^{2}=\frac{(1-p)}{p^{2}}\)
    Poisson distribution formulae
    \(P(x)=\frac{e^{-\mu_{\mu} x}}{x !}\) Probability equation
    \(E(X)=\mu\) Mean
    \(\sigma^{2}=\mu\) Variance
    Uniform distribution formulae
    \(f(x)=\frac{1}{b-a} \text { for } a \leq x \leq b\) PDF
    \(E(X)=\mu=\frac{a+b}{2}\) Mean
    \(\sigma^{2}=\frac{(b-a)^{2}}{12}\) Variance
    Exponential distribution formulae
    \(P(X \leq x)=1-e^{-m x}\) Cumulative probability
    \(E(X)=\mu=\frac{1}{m} \text { or } m=\frac{1}{\mu}\) Mean and decay factor
    \(\sigma^{2}=\frac{1}{m^{2}}=\mu^{2}\) Variance
    Table B4
    The following page of formulae requires the use of the "\(Z\)", "\(t\)", "\(\chi^2\)" or "\(F\)" tables.
    \(Z=\frac{x-\mu}{\sigma}\) Z-transformation for normal distribution
    \(Z=\frac{x-n p^{\prime}}{\sqrt{n p^{\prime}\left(q^{\prime}\right)}}\) Normal approximation to the binomial
    Probability (ignores subscripts)
    Hypothesis testing
    Confidence intervals
    [bracketed symbols equal margin of error]
    (subscripts denote locations on respective distribution tables)
    \(Z_{c}=\frac{\overline{x}-\mu_{0}}{\frac{\sigma}{\sqrt{n}}}\) Interval for the population mean when sigma is known
    \(\overline{x} \pm\left[Z_{(\alpha / 2)} \frac{\sigma}{\sqrt{n}}\right]\)
    \(Z_{c}=\frac{\overline{x}-\mu_{0}}{\frac{s}{\sqrt{n}}}\) Interval for the population mean when sigma is unknown but \(n>30\)
    \(\overline{x} \pm\left[Z_{(\alpha / 2)} \frac{s}{\sqrt{n}}\right]\)
    \(t_{c}=\frac{\overline{x}-\mu_{0}}{\frac{s}{\sqrt{n}}}\) Interval for the population mean when sigma is unknown but \(n<30\)
    \(\overline{x} \pm\left[t_{(n-1),(\alpha / 2)} \frac{s}{\sqrt{n}}\right]\)
    \(Z_{c}=\frac{p^{\prime}-p_{0}}{\sqrt{\frac{p_{0} q_{0}}{n}}}\) Interval for the population proportion
    \(p^{\prime} \pm\left[Z_{(\alpha / 2)} \sqrt{\frac{p^{\prime} q^{\prime}}{n}}\right]\)
    \(t_{c}=\frac{\overline{d}-\delta_{0}}{s_{d}}\) Interval for difference between two means with matched pairs
    \(\overline{d} \pm\left[t_{(n-1),(\alpha / 2)} \frac{s_{d}}{\sqrt{n}}\right]\) where \(s_d\) is the deviation of the differences
    \(Z_{c}=\frac{\left(\overline{x_{1}}-\overline{x_{2}}\right)-\delta_{0}}{\sqrt{\frac{\sigma_{1}^{2}}{n_{1}}+\frac{\sigma_{2}^{2}}{n_{2}}}}\) Interval for difference between two means when sigmas are known
    \(\left(\overline{x}_{1}-\overline{x}_{2}\right) \pm\left[Z_{(\alpha / 2)} \sqrt{\frac{\sigma_{1}^{2}}{n_{1}}+\frac{\sigma_{2}^{2}}{n_{2}}}\right]\)
    \(t_{c}=\frac{\left(\overline{x}_{1}-\overline{x}_{2}\right)-\delta_{0}}{\sqrt{\left(\frac{\left(s_{1}\right)^{2}}{n_{1}}+\frac{\left(s_{2}\right)^{2}}{n_{2}}\right)}}\) Interval for difference between two means with equal variances when sigmas are unknown
    \(\left(\overline{x}_{1}-\overline{x}_{2}\right) \pm\left[t_{d f,(\alpha / 2)} \sqrt{\left(\frac{\left(s_{1}\right)^{2}}{n_{1}}+\frac{\left(s_{2}\right)^{2}}{n_{2}}\right)}\right] \text { where } d f=\frac{\left(\frac{\left(s_{1}\right)^{2}}{n_{1}}+\frac{\left(s_{2}\right)^{2}}{n_{2}}\right)^{2}}{\left(\frac{1}{n_{1}-1}\right)\left(\frac{\left(s_{1}\right)^{2}}{n_{1}}\right)+\left(\frac{1}{n_{2}-1}\right)\left(\frac{\left(s_{2}\right)^{2}}{n_{2}}\right)}\)
    \(Z_{c}=\frac{\left(p_{1}^{\prime}-p_{2}^{\prime}\right)-\delta_{0}}{\sqrt{\frac{p_{1}^{\prime}\left(q_{1}^{\prime}\right)}{n_{1}}+\frac{p_{2}^{\prime}\left(q_{2}^{\prime}\right)}{n_{2}}}}\) Interval for difference between two population proportions
    \(\left(p_{1}^{\prime}-p_{2}^{\prime}\right) \pm\left[Z_{(\alpha / 2)} \sqrt{\frac{p_{1}^{\prime}\left(q_{1}^{\prime}\right)}{n_{1}}+\frac{p_{2}^{\prime}\left(q_{2}^{\prime}\right)}{n_{2}}}\right]\)
    \(\chi_{c}^{2}=\frac{(n-1) s^{2}}{\sigma_{0}^{2}}\) Tests for \(GOF\), Independence, and Homogeneity
    \(\chi_{c}^{2}=\sum \frac{(O-E)^{2}}{E}\)where \(O =\) observed values and \(E =\) expected values
    \(F_{c}=\frac{s_{1}^{2}}{s_{2}^{2}}\) Where \(s_{1}^{2}\) is the sample variance which is the larger of the two sample variances
    The next 3 formule are for determining sample size with confidence intervals.
    (note: \(E\) represents the margin of error)
    \(n=\frac{Z^{2}\left(\frac{a}{2}\right)^{\sigma^{2}}}{E^{2}}\)
    Use when sigma is known
    \(E=\overline{x}-\mu\)
    \(n=\frac{Z^{2}\left(\frac{a}{2}\right)^{(0.25)}}{E^{2}}\)
    Use when \(p^{\prime}\) is unknown
    \(E=p^{\prime}-p\)
    \(n=\frac{Z^{2}\left(\frac{a}{2}\right)^{\left[p^{\prime}\left(q^{\prime}\right)\right]}}{E^{2}}\)
    Use when p'p′ is uknown
    \(E=p^{\prime}-p\)
    Table B5
    Simple linear regression formulae for \(y=a+b(x)\)
    \(r=\frac{\Sigma[(x-\overline{x})(y-\overline{y})]}{\sqrt{\Sigma(x-\overline{x})^{2} * \Sigma(y-\overline{y})^{2}}}=\frac{S_{x y}}{S_{x} S_{y}}=\sqrt{\frac{S S R}{S S T}}\) Correlation coefficient
    \(b=\frac{\Sigma[(x-\overline{x})(y-\overline{y})]}{\Sigma(x-\overline{x})^{2}}=\frac{S_{x y}}{S S_{x}}=r_{y, x}\left(\frac{s_{y}}{s_{x}}\right)\) Coefficient \(b\) (slope)
    \(a=\overline{y}-b(\overline{x})\) \(y\)-intercept
    \(s_{e}^{2}=\frac{\Sigma\left(y_{i}-\hat{y}_{i}\right)^{2}}{n-k}=\frac{\sum_{i=1}^{n} e_{i}^{2}}{n-k}\) Estimate of the error variance
    \(S_{b}=\frac{s_{e}^{2}}{\sqrt{\left(x_{i}-\overline{x}\right)^{2}}}=\frac{s_{e}^{2}}{(n-1) s_{x}^{2}}\) Standard error for coefficient \(b\)
    \(t_{c}=\frac{b-\beta_{0}}{s_b}\) Hypothesis test for coefficient \(\beta\)
    \(b \pm\left[t_{n-2, \alpha / 2} S_{b}\right]\) Interval for coefficient \(\beta\)
    \(\hat{y} \pm\left[t_{\alpha / 2} * s_{e}\left(\sqrt{\frac{1}{n}+\frac{\left(x_{p}-\overline{x}\right)^{2}}{s_{x}}}\right)\right]\) Interval for expected value of \(y\)
    \(\hat{y} \pm\left[t_{\alpha / 2} * s_{e}\left(\sqrt{1+\frac{1}{n}+\frac{\left(x_{p}-\overline{x}\right)^{2}}{s_{x}}}\right)\right]\) Prediction interval for an individual \(y\)
    ANOVA formulae
    \(S S R=\sum_{i=1}^{n}\left(\hat{y}_{i}-\overline{y}\right)^{2}\) Sum of squares regression
    \(S S E=\sum_{i=1}^{n}\left(\hat{y}_{i}-\overline{y}_{i}\right)^{2}\) Sum of squares error
    \(S S T=\sum_{i=1}^{n}\left(y_{i}-\overline{y}\right)^{2}\) Sum of squares total
    \(R^{2}=\frac{S S R}{S S T}\) Coefficient of determination
    Table B6
    The following is the breakdown of a one-way ANOVA table for linear regression.
    Source of variation Sum of squares Degrees of freedom Mean squares \(F\)-ratio
    Regression \(SSR\) \(1\) or \(k−1\) \(M S R=\frac{S S R}{d f_{R}}\) \(F=\frac{M S R}{M S E}\)
    Error \(SSE\) \(n-k\) \(M S E=\frac{S S E}{d f_{E}}\)  
    Total \(SST\) \(n−1\)  

    14.2.3: Formulas is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?