# Simulate dice/coin averages using TI-84 calculator?

1. Dec 25, 2011

### moonman239

I want to create a histogram that shows the averages of 5000 samples of 500 dice each. How do I do this?

2. Dec 28, 2011

### moonman239

Never mind that. I created a program that generates a list of averages for a six-sided dice. I will post the code as soon as the calculator's done running a simulation. Maybe I'll even post a shot of the histogram (which is not in the program.)

Feel free to do whatever you want with the code.

3. Dec 28, 2011

### moonman239

As promised, here is the code I used to simulate the means of samples of 6-sided dice.

:ClrHome
:Output(1,1,"HI")
:Input "SIZE",S
:Input "SAMPLENUM",N
:For(I,1,N)
:mean(randInt(1,6,S)) -> L1(I)
:Disp(N-1)
:End

For you non-coders, this program will first clear the home screen of basically whatever you were looking at before you hit the "PRGM" button. Then it will say "Hi." Then it will ask for the sample size. Then it will ask for the number of samples. Then it will take one sample, calculate the mean, then store the mean in the first row of list 1. Then it will take another sample, calculate the average, then store the mean in the next row of list 1. It will keep taking samples, calculating the means, and storing the means in list 1 until it has taken as many samples as you wanted it to take.