Project – Simulations in Excel Objective: Use Excel for random number generation in order to answer probabilistic questions. Materials: You will need Microsoft Excel with the Analysis ToolPak installed. Procedure: Here¹s how to do Random Number Generation in Excel. Create a column of the possible digits (i.e. 0-9, or 00-99 or 000-999, etc.) Put the associated probabilities of each digit in the column next to each digit. o For example, if every digit is equally like and you have ten digits, then each probability is 0.1. (If you had 100 digits, each probability would be 0.01. ) o Go to Tools Data Analysis. (A pop-up window should appear.) o Scroll down to Random Number Generation. Click OK. o For Number Of Variables: 20 This is the number of simulations you want to perform. If you wanted to do 100 simulations, you¹d put ³100² in this box. o For Number Of Random: 30 (This would generate 30 random #s) Here, you can always tell it how many random numbers you want created o For Random Seed: Leave Blank o For Distribution: Discrete We¹ll work with some of the other distributions later o For Value and Probability Input: Click on A2 and drag to B11 Obviously, if you were working with two digit or three digit numbers, you¹d click and drag from the first possible digit (upper left) to the last possible probability (lower right) o For Output Range: Click ³New Worksheet Ply² and name it ³Random Output² This will create a new worksheet that will display 20 columns of 30 random digits. o The window below shows how to do 20 simulations of 30 random digits and displays them in a new worksheet called ³Random Output.² o SAMPLE Question: Corinne is a 75% free throw shooter. In a particular game she had 12 attempts and made only 7. Simulate 50 trials of 12 shots. With what probability did she make 7 or fewer baskets? Column A = 00-99 (Use the ³Fill Down² <Control-D> feature to quickly create the list of 100 numbers) i. Let A2 be 00. Let A3 = SUM(A2, 1). Then do Fill Down. Assign 00-74 to ³make² and 75-99 to ³miss² Column B = 0.01. Use Fill Down again. Use the RNG to create 50 sets of 12 random numbers on a new worksheet. For each column, you need to figure out if she made fewer than 7 baskets. i. Use this in A14: =CountIF(A1..A12, ³<75²) 1. Note: could also use: =CountIF(A1..A12, "<=74") ii. Use the Fill Right <Control-R> command to calculate for all 50 simulations. iii. Then, in A15, use this: =IF(A14 < 8, 1, 0) 1. This will become a ³1² if she made fewer than 7 baskets and a ³0² if she made seven or more. 2. Note: could also use: =IF(A14 <= 7, 1, 0) iv. Use the Fill Right command to calculate for all 50 simulations. v. To calculate the probability, just take the sum of everybody in row 15 and divide by 50. This will give you the experimental probability she made less than 7 baskets. For example, you could let A17 = SUM(A15..A64)/50 Conclusion: Does it seem like Corinne choked? Why or why not? YOUR PROJECT: Elaine is enrolled in a self-paced course that allows three attempts at passing an examination on the material. She does not study and has only a 2 out of 10 chance of passing. o Mathematically, what is Elaine¹s probability of passing at least one of the three attempts? (You may assume the attempts are independent since the exam is different each time.) o Simulate 50 repetitions. What is your estimate of Elaine¹s likelihood of passing the course based on your simulation? A more realistic model for Elaine is as follows: She has a 20% chance of passing the first exam, a 30% chance the second time around, and a 40% chance the third time around. She will, of course, stop taking the test as soon as she passes but she is only allowed at most three attempts at the test. o o Explain how to simulate one repetition of Elaine¹s tries at the exam. Simulate 50 repetitions and estimate the probability Elaine eventually passes the exam.