Joint distribution of number of crossings and longest run with empirical median.
In statistical quality control the midline is in many cases the median in the sample itself. Then the calculations so far included in the package crossrun do not apply. This case is addressed here. An iterative computation procedure is developed that resembles the procedure of crossrunsymm in crossrun has been developed. However, these computations require a three-dimensional array and are therefore more time consuming than the procedures in crossrun. So far the procedure has been run and tested for n up to 64. The iterative procedure is documented in the R script in this repo and may eventually be included in the R package crossrun. The R workspace crossrunem.Rdata contains full results up to n=60 and some additional objects, all produced in the script. The workspace crossrunem3.Rdata contains the joint distributions for even n=2m, m=1 to 32. The jointy distributions have been compared with the corresponding distributions from ordinary crossrun in the symmetric case, file comparison.odt.