fixed PDFS to work for len(Zmean) != len(Z)