NivaarExam PrepOfficial exam papers ↗

23-Ind-A6 Systems Simulation · May 2018

Question 1 of 9: Valid PDF, Inverse Transform, MCG Variates

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

Notes on this paper

National Exams — May 2018 — 17-Ind-A6 Systems Simulation. Three-hour, closed-book exam; one of two permitted calculators (Sharp or Casio), one 8.5″×11.0″ aid sheet (both sides). Format: three sections — Section A (four concept questions, candidates choose any two, 10 marks each, 20 marks total), Section B (three methods questions built around one continuing warehouse-simulation case study, candidates choose any two, 15 marks each, 30 marks total), Section C (two applications questions, candidates choose any one, 20 marks each). All nine questions are solved below for completeness. Two source anomalies are flagged where they occur: the front-page summary table states Section A is "Do 2 of 3," while Section A's own instructions and its four printed question sets read "two of the following four" — the printed four-question section is answered in full here; and Part C Question 2's sub-parts (a)–(c) are never printed anywhere in the paper, even though the results text for (d)–(f) explicitly refers back to "the factorial design matrix in (a)." Two-page Normal-distribution tables were supplied with the exam; the values below are the same table values obtained by direct computation.

Reference texts: Banks, Carson, Nelson & Nicol, Discrete-Event System Simulation (5th ed., Pearson) — random-number/random-variate generation, input modeling and goodness-of-fit testing, output analysis (warm-up, replication length, batch means vs. replication/deletion), and comparing alternative systems; Montgomery, Design and Analysis of Experiments (current ed., Wiley) — single-factor ANOVA, multiple comparisons, and 2k factorial designs with interaction analysis (Part C).

Question 1 (Part A.1): Valid PDF, Inverse Transform, MCG 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/25$ on $0\le x\le5$ (zero otherwise); multiplicative congruential generator (MCG) with $a=23,\ m=100,\ X_0=17$.

Find. (a) proof that $f$ is a valid pdf; (b) the inverse-transform formula $x=F^{-1}(U)$; (c) two variates generated by feeding 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/25\ge0$ on its support (and is identically $0$ elsewhere), so non-negativity holds. Total probability: $$\int_0^5 f(x)\,dx = \int_0^5\frac{2x}{25}\,dx = \left[\frac{x^2}{25}\right]_0^5 = \frac{25}{25} = \boxed{1}.$$ Both Kolmogorov conditions ($f\ge0$, total area $=1$) hold, so $f(x)$ is a valid pdf.
  2. Derive the inverse transform. Integrating from $0$ gives the CDF, then solving $F(x)=U$ for $x$: $$F(x)=\int_0^x\frac{2t}{25}\,dt=\frac{x^2}{25},\qquad U=\frac{x^2}{25}\ \Rightarrow\ \boxed{x=5\sqrt{U}}.$$
  3. Generate two variates from the MCG stream. Iterating $X_{i+1}=(23\,X_i)\bmod100$ from $X_0=17$: $$X_1=(23\times17)\bmod100=391\bmod100=91,\qquad U_1=0.91$$ $$X_2=(23\times91)\bmod100=2093\bmod100=93,\qquad U_2=0.93$$ Substituting into $x=5\sqrt{U}$: $$x_1=5\sqrt{0.91}=\boxed{4.770},\qquad x_2=5\sqrt{0.93}=\boxed{4.822}.$$
ItemResult
(a) validity$f\ge0$ and $\int_0^5 f\,dx=1$ — valid pdf
(b) inverse transform$x=5\sqrt{U}$
(c) two variates$X_1=91\Rightarrow x_1=4.770$; $X_2=93\Rightarrow x_2=4.822$
← Paper overview