Friedman Test for k=4
With n= The logic and computational details of the Friedman test are described in Subchapter 15a of Concepts and Applications.

 count A B C D 11 22 33  :   nn A1A2A3 :  An B1B2B3 :  Bn C1C2C3 :  Cn D1D2D3 :  Dn
Given k=4 correlated samples of n measures each, of the general form shown in the adjacent table, the Friedman test begins by rank-ordering the values across each of the rows, which is tantamount to ranking the measures within each of the n subjects or within each of the n randomized blocks, depending on the design. The resulting ranks are then summed down the columns. On the null hypothesis that there is no difference among the k sets of measures, the sum of each column of ranks should approximate n(k+1)/2. As a measure of the aggregate degree to which the observed column rank sums differ from this null-hypothesis value, the Friedman test calculates a version of the chi-square statistic, which is symbolized here as csqr.

ProcedureQ
Direct Entry: Enter the observed measures for samples A, B, C, and D into the designated cells under the heading "Raw Data," beginning in the top-most cell of each column. Pressing the "tab" key after each entry will take you down to the next cell in the column. After all values have been entered, click the "Calculate" button. The rank-ordering within rows will be performed automatically.Q
Option for Importing Raw Data from a Spreadsheet ... Data EntryT
 Ranks within Rows Raw Data for Sample count A B C D A B C D

 Mean Ranks for Sample A B C D csqr = df = P =

If n is sufficiently large, the sampling distribution of csqr is a close approximation of the sampling distribution of chi-square with df=k1. With k=4 and df=3, "sufficiently large" begins at about n=5. If the size of your sample is smaller than 5, you should treat the calculated P-value as an imperfect approximation.

 Home Click this link only if you did not arrive here via the VassarStats main page.

Disregard these cells.
They are merely place holders.