<< 
      DiscreteMath`Combinatorica`

    << Statistics`ContinuousDistributions`

    ndist = 
      NormalDistribution[0, 
        1]



    x =  { .225,   .262,  .217,   .240,   .230,   .229,   .235,  .217}

    y =  { .209,  .205,  .196,   .210,  .202,   .207,   .224,   .223,   .220,   .201}

    z = Join[x, y]

    m1 = Mean[x]

    m2 = Mean[y]

    s12 = Variance[x]

    s22 = Variance[y]

    diff = m1 - m2

    18!

    Binomial[18, 8]

    zb = Mean[z]

    sz2 = Variance[z]

    sN2 = (1 - 7/17)*sz2/8

    tau = (m1 - zb)/Sqrt[sN2]

    W1Side = (Mean[x] - Mean[y])/
        Sqrt[s12/8 + 
            s22/10]





    PermStatist[m_Integer, n_Integer,  
        z_List] := {
Lx = 
          Table[j, {j, 1, m}]; 
Ly = 
          Table[j, {j, m + 1, m + n}]; 
p = 
          RandomPermutation[m + n]; 
px = 
          p[[Lx]]; 
py = 
          p[[Ly]]; 
xp = 
          z[[px]]; 
yp = 
          z[[py]]; 
wald = (Mean[xp] - Mean[yp])/
            Sqrt[(Variance[xp]/m) + (Variance[yp]/
                    n)]
}




    WLD = 
        Flatten[Table[
            PermStatist[8, 10, z], {k, 1, 
              100000}]];



    nn = Length[WLD];

    zz = Sort[WLD];

    hh = Table[k, {k, 1, nn}]*(1/nn); // N

    nq = 
        Table[Quantile[ndist, k/(nn + 1)], {k, 1, 
            nn}];

    J1 = 
        Table[{zz[[i]], hh[[i]]}, {i, 1, nn}];

    J2 = 
        Table[{zz[[i]], nq[[i]]}, {i, 1, nn}];

    ListPlot[J1]

    ListPlot[J2]

    Delta[x_] := 0 /; x < 0

    Delta[x_] := 1 /; x ≥ 0

    DE[x_] := Table[{Delta[zz[[i]] - x]}, {i, 1, nn}]

    EDF[nn_, x_] := 
      1.  - Apply[Plus, DE[x]]*(1/nn) // N

    P1 = Plot[EDF[nn, x], {x, -3, 3}, PlotRange -> {0, 1}, 
        PlotStyle -> {Thickness[1/100], RGBColor[0.400, 0.000,  .6], 
            Dashing[{}]}]

    1 - EDF[nn, tau] 

    1 - EDF[nn, tau] + 
      EDF[nn, -tau]