Mostly Harmless Statistics Formula Packet
( \newcommand{\kernel}{\mathrm{null}\,}\)
Chapter 3 Formulas
Sample Mean: ˉx=∑xnle | Population Mean: μ=∑xN |
Weighted Mean: ˉx=∑(xw)∑w | Range = Max−Min |
Sample Standard Deviation: s=√∑(x−ˉx)2n−1 | Population Standard Deviation = σ |
Sample Variance: s2=∑(x−ˉx)2n−1 | Population Variance = σ2 |
Coefficient of Variation: CVar=(sˉx⋅100) | Z-Score: z=x−ˉxs |
Percentile Index: i=(n+1)⋅p100 | Interquartile Range: IQR=Q3−Q1 |
Empirical Rule: z=1,2,3⇒68 | Outlier Lower Limit: Q1−(1.5⋅IQR) |
Chebyshev’s Inequality: ((1−1(z)2)⋅100r) | Outlier Upper Limit: Q3+(1.5⋅IQR) |
TI-84: Enter the data in a list and then press [STAT]. Use cursor keys to highlight CALC. Press 1 or [ENTER] to select 1:1-Var Stats. Press [2nd], then press the number key corresponding to your data list. Press [Enter] to calculate the statistics. Note: the calculator always defaults to L1 if you do not specify a data list.
sx is the sample standard deviation. You can arrow down and find more statistics. Use the min and max to calculate the range by hand. To find the variance simply square the standard deviation.
Chapter 4 Formulas
Complement Rules: P(A)+P(AC)=1P(A)=1−P(AC)P(AC)=1−P(A) | Mutually Exclusive Events: P(A∪B)=0 |
Union Rule: P(A∪B)=P(A)+P(B)–P(A∩B) | Independent Events: P(A∪B)=P(A)⋅P(B) |
Intersection Rule: P(A∩B)=P(A)⋅P(A|B) | Conditional Probability Rule: P(A|B)=P(A∩B)P(B) |
Fundamental Counting Rule: m1⋅m2⋯mn | Factorial Rule: n!=n⋅(n−1)⋅(n−2)⋯3⋅2⋅1 |
Combination Rule: nCr=n!(r!(n−r)!) | Permutation Rule: nPr=n!(n−r)! |
Chapter 5 Formulas
Discrete Distribution Table: 0≤P(xi)≤1∑P(xi)=1 |
Discrete Distribution Mean: μ=∑(xi⋅P(xi)) |
Discrete Distribution Variance: σ2=∑(x2i⋅P(xi))−μ2 |
Discrete Distribution Standard Deviation: σ=√σ2 |
Geometric Distribution: P(X=x)=p⋅qx−1,x=1,2,3,… |
Geometric Distribution Mean: μ=1p Variance: σ2=1−pp2 Standard Deviation: σ=√1−pp2 |
Binomial Distribution: P(X=x)=nCxpx⋅q(n−x),x=0,1,2,…,n |
Binomial Distribution Mean: μ=n⋅p Variance: sigma2=n⋅p⋅q Standard Deviation: σ=√n⋅p⋅q |
Hypergeometric Distribution: P(X=x)=aCx⋅bCn−xNCn |
p=P(success)p=P(failure)=1−p n=sample sizeN=population size |
Unit Change for Poisson Distribution: New μ=old μ(new unitsold units) |
Poisson Distribution: P(X=x)=e−μμxx! |
P(X=x) | P(X≤x) | P(X≥x) |
---|---|---|
Is the same as | Is less than or equal to | Is greater than or equal to |
Is equal to | Is at most | Is at least |
Is exactly the same as | Is not greater than | Is not less than |
Has not changed from | Within | Is more than or equal to |
Excel =binom.dist(x,n,p,0) =HYPGEOM.DIST(x,n,a,N,0) =POISSON.DIST(x,μ,0) |
Excel =binom.dist(x,n,p,1) =HYPGEOM.DIST(x,n,a,N,1) =POISSON.DIST(x,μ,1) |
Excel =1−binom.dist(x−1,n,p,1) =1−HYPGEOM.DIST(x−1,n,a,N,1) =1−POISSON.DIST(x−1,μ,1) |
TI Calculator geometpdf(p,x) binompdf(n,p,x) poissonpdf(μ,x) |
TI Calculator binomcdf(n,p,x) poissoncdf(μ,x) |
TI Calculator 1−binomcdf(n,p,x−1) 1−poissoncdf(μ,x−1) |
P(X>x) | P(X<x) | |
---|---|---|
How do you tell them apart?
|
x)\)">More than | Less than |
x)\)">Greater than | Below | |
x)\)">Above | Lower than | |
x)\)">Higher than | Shorter than | |
x)\)">Longer than | Smaller than | |
x)\)">Bigger than | Decreased | |
x)\)">Increased | Reduced | |
x)\)"> | ||
x)\)">Excel =1−binom.dist(x,n,p,1) =1−HYPGEOM.DIST(x,n,a,N,1) =1−POISSON.DIST(x,μ,1) |
Excel =binom.dist(x−1,n,p,1) =HYPGEOM.DIST(x−1,n,a,N,1) =POISSON.DIST(x−1,μ,1) |
|
x)\)">TI Calculator 1−binomcdf(n,p,x) 1−poissoncdf(μ,x) |
TI Calculator binomcdf(n,p,x−1) poissoncdf(μ,x−1) |
Chapter 6 Formulas
Uniform Distribution f(x)=1b−a, for a≤x≤b P(X≥x)=P(X>x)=(1b−a)⋅(b−x) P(X≤x)=P(X<x)=(1b−a)⋅(x−a) P(x1≤X≤x2)=P(x1<X<x2)=(1b−a)⋅(x2−x1) |
Exponential Distribution f(x)=1μe(−x/μ), for x≥0 P(X≥x)=P(X>x)=e−x/μ P(X≤x)=P(X<x)=1−e−x/μ P(x1≤X≤x2)=P(x1<X<x2)=e(−x1/μ)−e(−x2/μ) |
Standard Normal Distribution μ=0,σ=1 z-score: z=x−μσ x=zσ+μ |
Central Limit Theorem Z-score: z=ˉx−μ(σ√n) |
In the table below, note that when μ=0 and σ=1 use the NORM.S. DIST or NORM.S.INV function in Excel for a standard normal distribution.
P(X≤x) or P(X<x) | P(x1<X<x2) or P(x1≤X≤x2) | P(X≥x) or P(X>x) |
---|---|---|
Is less than or equal to | Between | x)\)">Is greater than or equal to |
Is at most | x)\)">Is at least | |
Is not greater than | x)\)">Is not less than | |
Within | x)\)">More than | |
Less than | x)\)">Greater than | |
Below | x)\)">Above | |
Lower than | x)\)">Higher than | |
Shorter than | x)\)">Longer than | |
Smaller than | x)\)">Bigger than | |
Decreased | x)\)">Increased | |
Reduced | x)\)">Larger | |
![]() |
![]() |
x)\)">![]() |
Excel Finding a Probability: =NORM.DIST(x,μ,σ,true) Finding a Percentile: =NORM.INV(area,μ,σ) |
Excel Finding a Probability: =NORM.DIST(x2,μ,σ,true)−NORM.DIST(x1,μ,σ,true) Finding a Percentile: x1=NORM.INV((1−area)/2,μ,σ) x2=NORM.INV(1−((1−area)/2),μ,σ) |
x)\)">Excel Finding a Probability: =1−NORM.DIST(x,μ,σ,true) Finding a Percentile: =NORM.INV(1−area,μ,σ) |
TI Calculator Finding a Probability: =normalcdf(−1E99,x,μ,σ) Finding a Percentile: =invNorm(area,μ,σ) |
TI Calculator Finding a Probability: =normalcdf(x1,x2,μ,σ) Finding a Percentile: x1=invNorm((1−area)/2,μ,σ) x2=invNorm(1−((1−area)/2),μ,σ) |
x)\)">TI Calculator Finding a Probability: =normalcdf(x,1E99,μ,σ) Finding a Percentile: =invNorm(1−area,μ,σ) |
Chapter 7 Formulas
Confidence Interval for One Proportion ˆp±zα/2√(ˆpˆqn) ˆp=xn ˆq=1−ˆp TI-84: 1−PropZInt |
Sample Size for Proportion n=p∗⋅q∗(zα/2E)2 Always round up to whole number. If p is not given use p∗=0.5. E = Margin of Error |
Confidence Interval for One Mean Use z-interval when σ is given. Use t-interval when s is given. If n<30, population needs to be normal. |
Z-Confidence Interval ˉx±zα/2(σ√n) TI-84: ZInterval |
Z-Critical Values Excel: zα/2=NORM.INV(1−area/2,0,1) TI-84: zα/2=invNorm(1−area/2,0,1) |
t-Critical Values Excel: tα/2=T.INV(1−area/2,df) TI-84: tα/2=invT(1−area/2,df) |
t-Confidence Interval ˉx±tα/2(s√n) df=n−1 TI-84: TInterval |
Sample Size for Mean n=(zα/2⋅σE)2 Always round up to whole number. E = Margin of Error |
Chapter 8 Formulas
Hypothesis Test for One Mean Use z-test when σ is given. Use t-test when s is given. If n<30, population needs to be normal. |
Type I Error - Reject H0 when H0 is true. Type II Error - Fail to reject H0 when H0 is false. |
Z-Test: H0:μ=μ0 H1:μ≠μ0 z=ˉx−μ0(σ√n) TI-84: Z-Test |
t-Test: H0:μ=μ0 H1:μ≠μ0 t=ˉx−μ0(s√n) TI-84: T-Test |
z-Critical Values Excel: Two-tail: zα/2=NORM.INV(1−α/2,0,1) Right-tail: z1−α=NORM.INV(1−α,0,1) Left-tail: zα=NORM.INV(α,0,1) TI-84: Two-tail: zα/2=invNorm(1−α/2,0,1) Right-tail: z1−α=invNorm(1−α,0,1) Left-tail: zα=invNorm(α,0,1) |
t-Critical Values Excel: Two-tail: tα/2=T.INV(1−α/2,df) Right-tail: t1−α=T.INV(1−α,df) Left-tail: tα=T.INV(α,df) TI-84: Two-tail: tα/2=invT(1−α/2,df) Right-tail: t1−α=invT(1−α,df) Left-tail: tα=invT(α,df) |
Hypothesis Test for One Proportion H0:p=p0 H1:p≠p0 z=ˆp−p0√(p0q0n) TI-84: 1-PropZTest |
Rejection Rules: P-value method: reject H0 when the p-value ≤α. Critical value method: reject H0 when the test statistic is in the critical region (shaded tails). |
Two-tailed Test | Right-tailed Test | Left-tailed Test |
---|---|---|
H0:μ=μ0 or H0:p=p0 H1:μ≠μ0 or H0:p≠p0 |
H0:μ=μ0 or H0:p=p0 H1:μ>μ0 or H0:p>p0 |
H0:μ=μ0 or H0:p=p0 H1:μ<μ0 or H0:p<p0 |
![]() |
![]() |
![]() |
Claim is in the Null Hypothesis | ||
---|---|---|
= | ≤ | ≥ |
Is equal to | Is less than or equal to | Is greater than or equal to |
Is exactly the same as | Is at most | Is at least |
Has not changed from | Is not more than | Is not less than |
Is the same as | Within | Is more than or equal to |
Claim is in the Alternative Hypothesis | ||
---|---|---|
≠ | > | < |
Is not | More than | Less than |
Is not equal to | Greater than | Below |
Is different from | Above | Lower than |
Has changed from | Higher than | Shorter than |
Is not the same as | Longer than | Smaller than |
Bigger than | Decreased | |
Increased | Reduced |
Chapter 9 Formulas
Hypothesis Test for Two Dependent Means H0:μD=0 H1:μD≠0 t=ˉD−μD(sD√n) TI-84: T-Test |
Confidence Interval for Two Dependent Means ˉD±tα/2(sD√n) TI-84: TInterval |
Hypothesis Test for Two Independent Means Z-Test: H0:μ1=μ2 H1:μ1≠μ2 z=(ˉx1−ˉx2)−(μ1−μ2)0√(σ21n1+σ22n2) TI-84: 2-SampZTest |
Confidence Interval for Two Independent Means Z-Interval (ˉx1−ˉx2)±zα/2√(σ21n1+σ22n2) TI-84: 2-SampZInt |
Hypothesis Test for Two Independent Means H0:μ1=μ2 H1:μ1≠μ2 T-Test: Assume variances are unequal t=(ˉx1−ˉx2)−(μ1−μ2)0√(s21n1+s22n2) TI-84: 2-SampTTest df=(s21n1+s22n2)2((s21n1)2(1n1−1)+(s22n2)2(1n2−1)) T-Test: Assume variances are equal t=(ˉx1−ˉx2)−(μ1−μ2)√((n1−1)s21+(n2−1)s22(n1+n2−2))(1n1+1n2) df=n1−n2−2 |
Confidence Interval for Two Independent Means T-Interval: Assume variances are unequal (ˉx1−ˉx2)±tα/2√(s21n1+s22n2) TI-84: 2-SampTInt df=(s21n1+s22n2)2((s21n1)2(1n1−1)+(s22n2)2(1n2−1)) T-Interval: Assume variances are equal (ˉx1−ˉx2)±tα/2√(((n1−1)s21+(n2−1)s22(n1−n2−2))(1n1+1n2)) df=n1−n2−2 |
Hypothesis Test for Two Proportions H0:p1=p2 H1:p1≠p2 z=(ˆp1−ˆp2)−(p1−p2)√(ˆp⋅ˆq(1n1+1n2)) ˆp=(x1+x2)(n1+n2)=(ˆp1⋅n1+ˆp2⋅n2)(n1+n2) ˆq=1−ˆp ˆp1=x1n1,ˆp2=x2n2 TI-84: 2-PropZTest |
Confidence Interval for Two Proportions (ˆp1−ˆp2)±zα/2√(ˆp1ˆq1n1+ˆp2ˆq2n2) ˆp1=x1n1\.ˆp2=x2n2 ˆq1=1−ˆp1ˆq2=1−ˆp2 TI-84: 2-PropZInt |
Hypothesis Test for Two Variances H0:σ21=σ22 H1:σ21≠σ22 F=s21s22 dfN=n1−1,dfD=n2−1 TI-84: \boldsymbol{2\text{-SampFTest}}} |
Hypothesis Test for Two Standard Deviations H0:σ1=σ2 H1:σ1≠σ2 F=s21s22 dfN=n1−1,dfD=n2−1 TI-84: \boldsymbol{2\text{-SampFTest}}} |
F-Critical Values Excel: Two-tail: Fα/2=F.INV(1−α/2,0,1) Right-tail: F1−α=F.INV(1−α,0,1) Left-tail: Fα=F.INV(α,0,1) |
For z and t-Critical Values refer back to Chapter 8 TI-84: invF program can be downloaded at http://www.MostlyHarmlessStatistics.com. |
Chapter 10 Formulas
Goodness of Fit Test H0:p1=p0,p2=p0,…,pk=p0 H1: At least one proportion is different. χ2=∑(O−E)2E df=k−1,p0=1/k or given % TI-84: χ2 GOF-Test |
Test for Independence H0: Variable 1 and Variable 2 are independent. H1: Variable 1 and Variable 2 are dependent. χ2=∑(O−E)2E df=(R−1)(C−1) TI-84: χ2-Test |
Chapter 11 Formulas
One-Way ANOVA: H0:μ1=μ2=μ3=…=μkk=number of groups H1: At least one mean is different. ![]() ˉxi = sample mean from the ith group ni = sample size of the ith group s2i = sample variance from the ith group N=n1+n2+⋯+nk ˉxGM=∑xiN |
Bonferroni test statistic: t=ˉxi−ˉxj√(MSW(1ni+1nj)) H0:μi=μj H1:μi≠μj Multiply p-value by m=kC2, divide area for critical value by m=kC2 |
Two-Way ANOVA: Row Effect (Factor A): H0: The row variable has no effect on the average ______________. H1: The row variable has an effect on the average ______________. Column Effect (Factor B): H0: The column variable has no effect on the average ______________. H1: The column variable has an effect on the average ______________. Interaction Effect (A × B\): H0: There is no interaction effect between row variable and column variable on the average ______________. H1: There is an interaction effect between row variable and column variable on the average ______________. ![]() |
Chapter 12 Formulas
SSxx=(n−1)s2x SSyy=(n−1)s2y SSxy=∑(xy)−n⋅ˉx⋅ˉy |
Correlation Coefficient r=SSxy√(SSxx⋅SSyy) |
Slope = b1=SSxySSxx y-intercept = b0=ˉy−b1ˉx Regression Equation (Line of Best Fit): ˆy=b0+b1x |
Correlation t-test H0:ρ=0; H1:ρ≠0t=r√(n−21−r2)df=n−2 Slope t-test H0:β1=0; H1:β1≠0t=b1√(MSESSxx)df=n−p−1=n−2 |
Residual ei=yi−ˆyi (Residual plots should have no patterns.) Standard Error of Estimate sest=√∑(yi−ˆyi)2n−2=√MSE Prediction Interval ˆy=tα/2⋅sest√(1+1n+(x−ˉx)2SSxx) |
Slope/Model F-test H0:β1=0; H1:β1≠0 ![]() |
Multiple Linear Regression Equation ˆy=b0+b1x1+b2x2+⋯+bpxp |
Coefficient of Determination R2=(r)2=SSRSST |
Model F-Test for Multiple Regression H0:β1=β2=⋯βp=0 H1: At least one slope is not zero. |
Adjusted Coefficient of Determination R2adj=1−((1−R2)(n−1)(n−p−1)) |
Chapter 13 Formulas
Ranking Data
|
Sign Test H0: Median =MD0
|
Wilcoxon Signed-Rank Test n is the sample size not including a difference of 0. When n<30, use test statistic ws, which is the absolute value of the smaller of the sum of ranks. CV uses table below. If critical value is not in table then use an online calculator: http://www.socscistatistics.com/tests/signedranks When n≥30, use z-test statistic: z=(ws−(n(n+1)4))√(n(n+1)(2n+1)24) |
Mann-Whitney U Test When n1≤20 and n2≤20 U1=R1−n1(n1+1)2, U2=R2−n2(n2+1)2. U=Min(U1,U2) CV uses tables below. If critical value is not in tables then use an online calculator: https://www.socscistatistics.com/tests/mannwhitney/default.aspx When n1>20 and n2>20, use z-test statistic: z=(U−(n1⋅n22))√(n1⋅n2(n1+n2+1)12) |