Mostly Harmless StatisticsXYZ Homework Edition

⇩ Download ▾

13.6 Chapter 13 Formulas

Ranking Data Order the data from smallest to largest. The smallest value gets a rank of 1. The next smallest gets a rank of 2, etc. If there are any values that tie, then each of the tied values gets the average of the corresponding ranks.





Sign Test H0:H_{0}: Median =MD0= MD_{0}
H1:H_{1}: Median MD0\neq MD_{0}
p-value uses binomial distribution with p=0.5p = 0.5 and nn is the sample size not including ties with the median or differences of 0. For a two-tailed test, the test statistic, xx, is the smaller of the plus or minus signs. If xx is the test statistic, the p-value for a two-tailed test is 2*P(Xx)2* \text{P}(X \leq x). For a right-tailed test, the test statistic, xx, is the number of plus signs. For a left-tailed test, the test statistic, xx, is the number of minus signs. The p-value for a one-tailed test is the P(Xx)\text{P}(X \geq x) for a right-tailed test, or P(Xx)\text{P}(X \leq x) for a left-tailed test.
Wilcoxon Signed-Rank Test nn is the sample size not including a difference of 0. When n<30n < 30, use test statistic wsw_{s}, which is the absolute value of the smaller of the sum of ranks. CV uses table in Figure 13-5. If critical value is not in tables then use an online calculator: http://www.socscistatistics.com/tests/signedranks. When n30n \geq 30, use z-test statistic:

z=(ws(n(n+1)4))(n(n+1)(2n+1)24)z = \frac{\left(w_{s} - \left(\dfrac{n (n+1)}{4}\right) \right)}{\sqrt{\left( \dfrac{n(n+1)(2n+1)}{24} \right)}} \nonumber



Mann-Whitney U Test When n120n_{1} \leq 20 and n220n_{2} \leq 20: U1=R1n1(n1+1)2,U2=R2n2(n2+1)2U_{1} = R_{1} - \frac{n_{1} \left(n_{1}+1\right)}{2}, U_{2} = R_{2} - \frac{n_{2} \left(n_{2}+1\right)}{2}. U=Min(U1,U2)U = \text{Min} \left(U_{1}, U_{2}\right) CV uses table in Figures 13-8 or 13-9. If critical value is not in tables then use an online calculator: https://www.socscistatistics.com/tests/mannwhitney/default.aspx. When n1>20n_{1} > 20 and n2>20n_{2} > 20 use z-test statistic:

z=(U(n1·n22))(n1·n2(n1+n2+1)12)z = \frac{\left(U - \left(\dfrac{n_{1} \cdot n_{2}}{2}\right) \right)}{\sqrt{\left( \dfrac{n_{1} \cdot n_{2} \left(n_{1} + n_{2} + 1\right)}{12} \right)}} \nonumber

“For instance, a race of hyperintelligent pan‐dimensional beings once built themselves a gigantic supercomputer called Deep Thought to calculate once and for all the Answer to the Ultimate Question of Life, the Universe, and Everything. For seven and a half million years, Deep Thought computed and calculated, and in the end announced that the answer was in fact Forty‐two - and so another, even bigger, computer had to be built to find out what the actual question was.”

(Adams, 2002)

Adapted from Mostly Harmless Statistics by Rachel Webb (Portland State University, https://mostlyharmlessstat.wixsite.com/webpage), © Rachel Webb, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.