Acceptance-Rejection Sampling of Normal Distribution

Acceptance-Rejection Sampling of Normal Distribution
Loading the math board and drawing, please wait…
2020-06-06 04:13
This example demonstrates how to generate normally distributed random numbers using the acceptance-rejection sampling method. Key math concepts include normal distribution, acceptance-rejection sampling algorithm, and integral calculations. GeoGebra commands/objects used in construction are Segment, Point, Intersect, Integral, and IntegralBetween. Suitable for high school and above students to understand sampling methods in probability and statistics.

GeoGebra Commands & Parameters

  1. Segment((0, 1), (1, 1)) → f
  2. Point(xAxis) → v_i
  3. Intersect(g, Line[v_i, v_i + (0, 1)], (0.4613402061855664, -0.0804723532225744)) → B
  4. Point(yAxis) → u_i
  5. Intersect(Line[u_i, u_i + (1, 0)], Line[v_i, v_i + (0, 1)]) → A_i
  6. Segment(v_i, B) → i
  7. Intersect(Line[B, B + (1, 0)], yAxis) → y_i
  8. Segment(B, y_i) → h
  9. Segment(v_i, A_i) → j
  10. Segment(A_i, u_i) → k
  11. Segment((1, 0), (1, 1)) → l
  12. Integral(w, 0, 1) → accept
  13. IntegralBetween(f, w, 0, 1) → reject

AI Drawing Prompt Reference

Draw the acceptance-rejection sampling for a normal distribution. Start by drawing a horizontal line segment, then take a point on the x-axis and find point B by intersecting the line through this point and a unit vector with the horizontal line. Next, take a point on the y-axis and find point A_i by intersecting the line through this point and point B with the y-axis. Connect points v_i and B, B and y_i, v_i and A_i, A_i and u_i, and (1,0) and (1,1). Calculate the integral from 0 to 1 of line segment f and the integral difference from w to 1 of f, representing the accept and reject areas.
The prompt above was compiled from the original drawing commands and is for reference only.