histogram_pdf_sample_test


histogram_pdf_sample_test, a MATLAB code which calls histogram_pdf_sample(), which demonstrates how sampling can be done by starting with the formula for a PDF, creating a histogram, constructing a histogram for the CDF, and then sampling.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

histogram_pdf_sample, a MATLAB code which demonstrates how sampling can be done by starting with the formula for a PDF, creating a histogram, constructing a histogram for the CDF, and then sampling.

Source Code:

CHEBYSHEV1 is a test case for the PDF rho(x)=1/sqrt(1-x*x)/pi for x between -1 and +1, which is infinite at the endpoints.

CHEBYSHEV13 is a test case for the PDF rho(x)=(1-x*x)^(-1/6) for x between -1 and +1, which is infinite at the endpoints. (In order to integrate to 1 over [-1,+1], multiply by the factor gamma(4/3)/sqrt(pi)/gamma(5.6).)

CHEBYSHEV2 is a test case for the PDF rho(x)=2*sqrt(1-x*x)/pi for x between -1 and +1.

-
Last revised on 30 January 2019.