Codes can be found in the paper by J.A.C. Weideman and S.C. Reddy, "A Matlab differentiation suite" (link attached), or in L.N. Trefethen book "Spectral Methods in Matlab".
Chebyshev's inequality is mostly base in probability, perhapse we may search its detailed in probability distribution theory and Jacobin differentiations too!