NivaarExam PrepOfficial exam papers ↗

23-Ind-A6 Systems Simulation · May 2018

Question 4 of 9: Variate Generation Across Five Distribution Families

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 4 (Part A.4): Variate Generation Across Five Distribution Families (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. Same LCG as Q3(b) ($a=21,\ m=100,\ c=13,\ X_0=7$), explicitly restarted at $X_0=7$ for each sub-part, so every sub-part's first draw is $X_1=60\Rightarrow U_1=0.60$; sub-parts needing more than one uniform continue that same restarted stream (e.g. Gamma consumes $U_1,\dots,U_5$).

Find. One random variate from each of Normal(15,5), Gamma(5,4), Poisson(2), Weibull(2,2), Triangular(1,2,5).

Approach. Apply the exact or standard approximate variate-generation recipe for each family — inverse-CDF where closed-form or table-based, sum-of-exponentials for integer-shape Gamma, cumulative search for the discrete Poisson — consuming only as many restarted-stream uniforms as each method needs.

  1. (a) Normal($\mu=15,\sigma=5$) via table/inverse-CDF. (Check: "Normal(15,5)" is read as $(\mu,\sigma)=(15,5)$ — the second parameter as standard deviation, the usual exam convention when no unit is stated.) With $U_1=0.60$, find $z$ such that $\Phi(z)=0.60$ from the supplied Normal table: $\Phi(0.25)=0.5987$, $\Phi(0.26)=0.6026$; interpolating gives $z\approx0.2533$. $$x=\mu+z\sigma=15+0.2533(5)=\boxed{16.267}$$
  2. (b) Gamma(shape $k=5$, scale $\theta=4$) via sum-of-Exponentials (valid since $k$ is a positive integer): draw five fresh uniforms from the restarted stream, $U_1,\dots,U_5=0.60,0.73,0.46,0.79,0.72$: $$x=-\theta\sum_{i=1}^{5}\ln U_i=-4(\ln0.60+\ln0.73+\ln0.46+\ln0.79+\ln0.72)=-4(-2.1662)=\boxed{8.665}$$
  3. (c) Poisson($\lambda=2$) via the cumulative method with $U_1=0.60$: $p(0)=e^{-2}=0.1353$ (cum $0.1353$); $p(1)=2e^{-2}=0.2707$ (cum $0.4060$); $p(2)=2e^{-2}=0.2707$ (cum $0.6767$). Since $0.4060\le U_1=0.60<0.6767$: $$\boxed{x=2}$$
  4. (d) Weibull(shape $k=2$, scale $\lambda=2$) via the closed-form inverse CDF $x=\lambda(-\ln(1-U))^{1/k}$, with $U_1=0.60$: $$x=2(-\ln(1-0.60))^{1/2}=2(0.9163)^{1/2}=\boxed{1.914}$$
  5. (e) Triangular(min $a=1$, mode $c=2$, max $b=5$) via the piecewise inverse CDF. The mode's own CDF value is $F(c)=(c-a)/(b-a)=1/4=0.25$. Since $U_1=0.60>0.25$, use the upper branch: $$x=b-\sqrt{(1-U)(b-a)(b-c)}=5-\sqrt{(0.40)(4)(3)}=5-\sqrt{4.8}=\boxed{2.809}$$
DistributionVariate
Normal(15,5)16.267
Gamma(5,4)8.665
Poisson(2)2
Weibull(2,2)1.914
Triangular(1,2,5)2.809