6: Simulations in Excel In this lesson you will design a simulation, using a spreadsheet. Before you start this lesson, you should know how to copy formulas across an excel spreadsheet. You also need some printing credit! By the end of the lesson you should know how to translate random numbers to events, and perform lots of trials. Don’t be afraid to ask for help in this lesson especially – the lesson is quite easy, but hard to learn from a worksheet. The lesson also works in google sheets. Activity You are running a hairdressers, which usually has 10 customers a day. There is a 50% chance the customer will want a cut 25% a wash and 25% want their hair dyed. What is the probability that more than 3 customers in a day want their hair dyed? COPY these sentences: The DEVICE is a spreadsheet with a random number generator making random numbers 1-100: randbetween (1, 100) 1-50 will mean a cut 51-75 will mean a wash 76-100 will mean a dye. When we make one random number, this simulates one customer. This is AN EVENT. For each TRIAL, we need 10 customers (random numbers). We need to know if there are more than 3 dyes: If we got random numbers 17, 84, 53, 28, 12, 91, 58, 100, 62, 64 this would mean CDWCCDWDWW (this is ONE TRIAL, ie 10 customers). This is 3 dyes, so the OUTCOME is NO (not more than 3 dyes in a day). You need these sentences to ACHIEVE. To set up the spreadsheet, type =randbetween(1, 100) into a cell like this (obviously a number will appear): The, copy the formula across 10 cells, and make the columns narrower: This gives you 10 random numbers. At this point, you could print them and right down what they mean, but it’s easier to get the computer to do it! Look at the formula: =IF(B2<51, “C”…… This part of the formula says: Write a C (for “Cut”) if the cell B2 is 50 or less (because 50/100 will be cuts). Look – cell B2 is 86 in my line. So it goes onto the next part: =IF(B2<51, “C”, IF (B2<76, “W”….. This part of the formula says: Write a W (for “Wash”) if the cell B2 is 75 or less (because 25/100 ie 51-75 will be washes). It isn’t. So it goes onto the last part: =IF(B2<51, “C”, IF (B2<76, “W”, “D”)) … and writes a “D” – the number in B2 is bigger than 75 but less than 100, so it must be a Dry. YOU DO NOT NEED TO REMEMBER HOW TO DO THIS BUT YOU MUST UNDERSTAND WHAT IT MEANS. Look again: =IF(B2<51, “C”, IF (B2<76, “W”, “D”)) Why is B2 there? Why <51? Why “C” (the quote marks are important)? Why 76? If you don’t know the answer to these, then you need to ask!! But now it’s easy. Drag this formula across 10 cells, and make them narrow: I also gave the last column a heading. Now, select the whole row, and drag it down about 10 lines: Trial one has the numbers 42, 37, 100, 99, 100, 86, 3, 51, 27, 29 meaning that the 10 events are C C D D D D C W C C. So the outcome for trial 1 is “YES” – there are more than 3 customers wanting a dye. Unfortunately, everytime we type in the spreadsheet the events change. So at this point, print the sheet, and work out the outcomes by hand.1 The probability of more than 3 customers wanting a dye will be the number of YES ÷ the number of trials (about 10). In theory, we can quickly do hundreds of trials. But we still have to count the outcomes by hand! For this exercise, we’ll just do 30, which should fit on one printed page. Go to 7 Your own simulation 1 You could, instead of printing it, copy and paste it into a word document. This might work in google docs.
© Copyright 2026 Paperzz