Philadelphia University Faculty of Information Technology Lecturer: Dr. Nameer N. EL-Emam Department of CS Internal Examiner: Dr. Raad Alwan Marking Scheme Coordinator: Dr. Nameer N. EL-Emam Module Name: Simulation and Modelling Second Exam Semester one of the academic year: Module Number: 750472 2016-2017 Date: 18/12/2016 Time 50 Min. Familar Part: Objective: This part aims to show student capability to answer the problem solving questions. Q1/ (12-marks): Let us define the following set of observations (inter-arrival times X) for airplanes landing: X 3.1 6.5 2.5 1.3 3.7 0.4 4.2 8.0 where the experimental mean of these observations is equal to (0.333). Answer the following: a) ( 4 marks) Derive a mathematical formula to generate random numbers (RNs) from the corresponding observations X and then apply this formula to calculate RNs. 1 X i Ln (RN i ) (1) Xi Ln (RN i ) (2) Multiply Eq.(1) by ( - ) then Take the Exp. on both side of Eq. (2) then we find RNs e Xi RN i Apply Eq. (3) to find RNs (3) Xi 3.1 6.5 2.5 1.3 3.7 0.4 4.2 8 RNi 0.35585569 0.11458367 0.43463443 0.64837244 0.29135582 0.87518499 0.24663149 0.06950198 b) (4 marks) Apply KS-test algorithm to check uniformity of random numbers which were generated in section (a), where the KS benchmark table is defined below: SIZE (N) 1 2 3 4 5 6 7 8 9 10 11 LEVEL OF CONFIDENCE 98% .900 .684 .565 .494 .446 .410 .381 .358 .339 .322 .307 97% .925 .726 .597 .525 .474 .436 .405 .381 .360 .342 .326 .96% .950 .776 .642 .564 .510 .470 .438 .411 .388 .368 .352 .95% .975 .842 .708 .624 .565 .521 .486 .457 .432 .410 .391 .90% .995 .929 .828 .733 .669 .618 .577 .543 .514 .490 .468 Class Boundary class index [0-0.2] [0.21-0.4] [0.41-0.6] [0.61-0.8] [0.81-1] 1 2 3 4 5 fi 2 3 1 1 1 ACC 2 5 6 7 8 Fn(ACCi)= ACCi / n Fi(index)= index / s ei 0.25 0.625 0.75 0.875 1 1/5 = 0.2 2/5 = 0.4 3 / 5 = 0.6 4 / 5 = 0.8 1 0.05 0.225 0.15 0.075 0 K-S Theoretically=max(ei)=0.225 K-S Experimentally = 0.457 Then RNs are not belong to uniform distribution since K-S Theoretically> K-S Experimentally c) (4 marks) Using Poisson distribution to find the number of airplanes arrived in the time period 13 time unit. n RN i e i 1 T n 1 RN i i 1 e T e 0.33313 e 4.329 =0.01318 3 4 i 1 i 1 RN i 0.01318 RN i Then we conclude that the number of airplanes arrived in time period 13 is equal to 3. OR Applying the following on observation directly: n X i 1 i T n 1 X i i 1 Q2/ (8-marks): a) (4 marks) Derive a uniform distribution formula to generate observations (By converting a probability density function PDF to a cumulative distributed function CDF and then using the inverse method). b) (4 marks) Apply the uniform distribution formula to find the observations within the interval [5, 15] of the following random numbers: RN 0.7 0.1 0.4 0.2 0.5 RVi = 5 + (15 - 5) * RNi 12 6 9 7 10
© Copyright 2025 Paperzz