The function RAND() gives a random number between 0 and 1. In a cell enter the formula =RAND(). Copy the formula down into approximately twenty cells. Use Excel to calculate the average and the standard deviation of the numbers. Notice the property that every time you do a calculation using a cell containing rand(), that the cell changes, i.e. you get a new random number. The same thing happens when you copy and paste a cell or cells. That's because you are copying and pasting a formula and the formula gives a random number. To copy and paste the actual numbers instead of the formulas, copy and then under the Edit menu, choose Paste Special and click "values" in the dialog box that arises.
Recall the syntax of the IF function
IF(A1<0.5,1,0)
The IF function has three arguments, the first is a condition (something that may be true or false), the second argument is the value the function takes on if the condition is true, the third argument is the value the function takes on if the condition is false. We can combine the IF and RAND functions, to simulate random events. If your random numbers start in A1, then put enter into B1 the formula
=IF(A1>0.5,"HEAD","TAIL")
We have simulated the toss of a coin.
In the following exercise, we will simulate the changing of one element into another by nuclear decay. We will represent the first element by a 1 and the second by a 0. We will begin with all 1's, and they will in the course of the simulation become 0's.
In spontaneous nuclear decay, we cannot tell if a given nucleus is going to decay. We can only say that in a given time interval, it has some probability of decaying. This is where the function RAND() will come in. We will use it to determine whether each of our nuclei decays or not.
Instructions