Lecture Assignments - Summer 2017

Assignment # 1: Hand Simulation.
Point: 100
Due Date: 5:00pm Friday July 14, 2017

See the attached file in PDF.

Assignment # 2: Generating Random Numbers - 1.
Point: 100
Due Date: Wednesday July 19th, 12:50pm

Problem 1: Generate all possible random numbers by the LCG (93, 7, c, X0). For X0 use the day number of you birthday. For c value, add the digits of your birth year.You can use Excel for calculations and copy it into your report, but you must explain what the numbers are and how they are calculated. Identify the period of LCG and if it is not a full period identify the random numbers that are missing. Use only three digits of decimals. Find U437 for this LCG without using Excel.

Problem 2: An experiment involves throwing a die three times and recording the total number of dots observed. Generate 8 random numbers simulating this experiment using the first 8 random numbers generated in problem 1.

Problem 3: Add all digits of your phone number. Now, divide it by 3. Use that as a decimal value between 0 and 1 to represent the probability of success in a Bernoulli experiment. For example, a phone number of 443-885-3235 will be 4+4+3+8+8+5+3+2+3+5 = 45 and third of it will be 15 making p=0.15. Use Excel to generate 100 Bernoulli (p) and 100 Geo (p) using your RV-bank beginning from a cell that has closest value to 0.5 and moving column-wise. Use the generated Bernouli values to generate 8 values from Bin (7, p). Use the generated Geometric values to generate 8 values from NegBin (7, p).

Problem 4: Generate two values from Poi (6.nn) where nn is the total values of phone number digits you calculated in Problem 3. Use RV-bank beginning with the last value, going row-wise.

Problem 5: Generate four values from LogNor (n, 2.25). Where n is the largest digit of Student ID. Use RV-bank beginning with the closest value to 0.66, going column-wise.

Assignment # 3: Generating Random Numbers - 2.
Point: 60
Due Date: Friday July 21st, 4:00pm

Problem 1: Use Microsft Excel for steps 1, 2 and 3.
1. Use Data Analysis Add-ins tool to generate 2600 random variables distributed as Poisson with parameter λ. Parameter λ is in the form of N.nn where N is the largest digit of your student ID and nn is the day number of you birthday. The generated values must be in 100 rows (rows 1 through 100) and 26 columns (column A through Z). They must be with three decimal values.
2. For each row calculate the average of the values in that row (in column AA).
3. Use these values in ARENA to find the distribution that is the best fit and report it. If that distribution is Normal, go to the next step, otherwise fit a normal distribution to the data and go to the next step.
4. Use the Normal distribution that you came up with and analytically find the Pr(μ- 2 σ ≤ x ≤ μ + 2σ).Now count the actual number of averages that fall into that range. Are they very close or not?

Problem 2: Use your RV-Bank beginning from random number in row 8, column 8 and moving columnwise. Generate one random number from a gamma distribution where β = 2nd largest number in your cell phone number and α = 0.length of your longest finger in millimeters.

Problem 3: Use your RV-Bank beginning from random number in row 4, column 4 and moving rowwise. Generate one random number from a gamma distribution where β = 2nd largest number in your student ID number and α = month of your birth.length of your shortest finger in millimeters.

Archive Assignments - Spring 2017

Assignment # 1: Hand Simulation.
Point: 100
Due Date: Tuesday January 31st, 5:00pm

See the attached file in PDF.

Assignment # 2: Generating Random Numbers - 1.
Point: 100
Due Date: Friday February 3rd, 5:00pm

Problem 1: Generate all possible random numbers by the LCG (97, 7, 11, X0). For X0 use your the day number of you birthday. You can use Excel for calculations and copy it into your report, but you must explain what the numbers are and how they are calculated. Identify the period of LCG and if it is not a full period identify the random numbers that are missing. Use only three digits of decimals. What is U831 for this LCG?

Problem 2: An experiment involves throwing a die twice and recording the total number of dots observed. Generate 5 random numbers simulating this experiment using the first 5 random numbers generated in problem 1.

Problem 3: Launch Excel. on A1 cell enter =RAND().
A random number between 0 and 1 will appear. Click on that number and drag the handle at the lower corner of the highlighted box to the right for 20 columns, then down for 20 rows. You should now have 400 random values all between 0 and 1.
Note: These numbers are dynamic and will change with any action take on the sheet. For example, move the cursor to a blank cell and press Delete few times and watch how the values change with every Delete pressing. The reason is that every cell is represented by the function RAND() which when invoked will generate a new value. We need to fix the values.
Highlight (select) all 400 cells again and right-click inside the box and select Format Cells .... On the ensuing window select Number tab, Number option and change Decimal place to 4 and click OK.
While still the whole set is selected, click on Copy icon from Home tab of Excel ribbon (or, just simply use Ctrl+C from keyboard.)
Launch Notepad and use Edit, Paste (or Ctrl+V) to paste the values into the Notepad.
Block all values and copy them. Go to back to Excel and paste the clipboard onto Excel over the same values (which still be highlited).
Change Sheet1 name to My RV Bank.
Save you Excel file using standard file saving guidelines and email it to the instructor and inclue a copy in your report. Identify (color) the larges, smallest values in the table and the cell that has closest value to 0.5.

Assignment # 3: Generating Random Numbers - 2.
Point: 70
Due Date: Tuesday February 7th, 5:00pm

General Instruction: When you are instructed to use your RV-bank starting from a cell (i, j) row-wise, here is what you need to do:
1. Pick the value at row i and column j of your RV-bank as your first number.
2. Move to cell (i, j+1) and pick that number as your second number.
3. Continue until you reach the last value on row i.
4. If you need more numbers continue to the next row (i+1).
5. If you happened to be at the last row (row 20) and need more numbers go to row 1.
6. Similar approch is used for column-wise selection but instead of the next number being (i, j+1) it will be (i+1, j).

Problem 1: Add all digits of your phone number and then divide it by 2. Use that as a decimal value between 0 and 1 to represent the probability of success in a Bernoulli experiment. For example, my phone number of 443-885-3135 will be 4+4+3+8+8+5+3+1+3+5 = 44 and half of it will be 22 making p=0.22. Use Excel to generate 100 Bernoulli (p) and 100 Geo (p) using your RV-bank beginning from a cell that has closest value to 0.5 and moving column-wise. Use the generated Bernouli values to generate 10 values from Bin (10, p). Use the generated Geometric values to generate 10 values from NegBin (10, p).

Problem 2: Generate two values from Poi (5.nn) where nn is the total values of phone number digits you calculated in Problem 1. Use RV-bank beginning with the first value, going row-wise.

Problem 3: Generate four values from LogNor (n, 1.69). Where n is the largest digit of Student ID. Use RV-bank beginning with the first value, going column-wise.

Assignment # 4: RV Maze.
Point: 70
Due Date: Monday February 13, 5:00pm

See the attached file in PDF.

Assignment # 5: Generating Random Numbers - 3.
Point: 60
Due Date: Wednesday February 15th, 5:00pm

Problem 1: Use your all 400 values from your RV-bank. If your birth month is in January through June, then select row-wise, otherwise, column-wise. Generat 400 random numbers from TRIA (4.63, 7.05, 13.94) using the formula in the handout.

Problem 2: Use your all 400 values from your RV-bank. If your birth month is in January through June, then select column-wise, otherwise, row-wise. Generat 400 random numbers from TRIA (4.63, 7.05, 13.94) using the Acceptance-Rejection method. (Note that you may need to generate more random numbers from U(0,1)because some of the numbers from your RV-bank may be rejected).  See solution [Link]

Problem 3: Use ARENA Input Analyzer to identify the best distribution fit to the data in problems 1 and 2 and compare. If there are any differences, research to find out why such differences migh exist.

Bonus Problem 20 points: University has Matlab, SPSS, and Maple licensed software on most computer labs. Research and find out how you can use one of those software to fit a distribution to your two datsets. Is the answer different than the ones you found in in Problem 3?

Assignment # 6: Generating Random Numbers -4 & Queuing- 1.
Point: 60
Due Date: Before Monday February 27th, 9:00am

Problem 1: Use your your RV-bank starting at (7, 14) row-wise. Generat 5 random numbers from UNIF (4.33, 4.85) using the accepatnce-rejection method with a Triangular majorizing function with a = 2.78 and m = 4.62. (20 points)

Problems 2-5: Solve problems 1-4, Chapter 2 of your textbook (40 points)

Bonus Problem 20 points: Problem12 of same Chapter.