NivaarExam PrepOfficial exam papers ↗

23-Ind-A6 Systems Simulation · Undated paper

Question 4 of 10: pdf Validity, Inverse Transform, Multiplicative Congruential Variates

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

National Exams May 2019 — 17-Ind-A6, Systems Simulation, 3 hours duration. Section A: do 3 of 5 (30 marks); Section B: do 1 of 2 per the front-page summary table — the Part B section instructions on the page itself read “do 2 of 3” instead, a genuine inconsistency in the source paper's own front matter (flagged below); Section C: do 1 of 2 (20 marks). This study resource answers all ten questions across the three parts.

Check — front-page/section instructions disagree. The cover page's summary table states “Section B: Do 1 of 2 Questions, Total marks: 20,” but Part B's own section banner (page 4) reads “Complete two of the following three sets of questions,” and Part B in fact contains three questions worth 15 marks each. The cover page's own overall total (70 marks across “5 Questions”) is likewise only consistent with the “2 of 3” reading (30+30+... does not match 70 either way exactly, since 30(A)+2×15(B)+20(C)=80, one section choice short of 70); this is an internal inconsistency in the exam's own printed materials. All three Part B questions are answered in full below regardless.

Reference texts. Banks, Carson, Nelson & Nicol, Discrete-Event System Simulation (5th ed.) — primary text for random-variate generation, input/output analysis, variance reduction, verification & validation, and design of simulation experiments.

Question 4 (Part A.4): pdf Validity, Inverse Transform, Multiplicative Congruential Variates (10 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. $f(x)=2x/9$ on $0\le x\le3$ (zero otherwise); multiplicative congruential generator (MCG) with $a=23,\ m=100,\ X_0=99$.

Find. (a) proof that $f$ is a valid pdf; (b) the inverse-transform formula $x=F^{-1}(U)$; (c) two variates generated by pushing the MCG stream through that inverse transform.

Approach. Check the two Kolmogorov conditions for (a); integrate $f$ to get $F$ and invert for (b); iterate $X_{i+1}=(aX_i)\bmod m$ twice and push each $U_i=X_i/m$ through the inverse transform for (c).

  1. Prove validity. $f(x)=2x/9\ge0$ on its support (and is $0$ elsewhere), so non-negativity holds. Total probability: $$\int_0^3\frac{2x}{9}\,dx=\left[\frac{x^2}{9}\right]_0^3=\frac{9}{9}=\boxed{1}.$$ Both Kolmogorov conditions hold, so $f(x)$ is a valid pdf.
  2. Derive the inverse transform. $$F(x)=\int_0^x\frac{2t}{9}\,dt=\frac{x^2}{9},\qquad U=\frac{x^2}{9}\ \Rightarrow\ \boxed{x=3\sqrt U}.$$
  3. Generate two variates from the MCG stream. Iterating $X_{i+1}=(23\,X_i)\bmod100$ from $X_0=99$: $$X_1=(23\times99)\bmod100=2277\bmod100=77,\qquad U_1=0.77$$ $$X_2=(23\times77)\bmod100=1771\bmod100=71,\qquad U_2=0.71$$ Substituting into $x=3\sqrt U$: $$x_1=3\sqrt{0.77}=\boxed{2.632},\qquad x_2=3\sqrt{0.71}=\boxed{2.528}.$$
ItemResult
(a) validity$f\ge0$ and $\int_0^3 f\,dx=1$ — valid pdf
(b) inverse transform$x=3\sqrt U$
(c) two variates$X_1=77\Rightarrow x_1=2.632$; $X_2=71\Rightarrow x_2=2.528$