Rejection Method Experiment

Description

This app simulates values from a random variable with a specified continuous special distribution using the rejection method. The probability density function \(f\) of the selected distribution is shown in both graphs. In the top graph, a bounding rectangle is also shown. Random point \((X, Y)\) is uniformly distributed on the bounding rectangular region. If \(Y \le f(X)\), the point is accepted and is colored red. In this case, \(X\) is the simulated value. If \(Y \gt f(X)\), the point is rejected and the point is colored green. The Boolean variable \(A\) takes the value 1 if the point is accepted and 0 if the point is rejected. The variables \(X\), \(Y\), and \(A\) are recorded in the data table. The special distribution can be chosen from the drop-down box and then the parameters of the distribution can be varied with the scrollbars. Hover over a scrollbar to see information about the type of the parameter.