Define pdf function correctly.