Simulate dice/coin averages using TI-84 calculator?

  • Thread starter Thread starter moonman239
  • Start date Start date
  • Tags Tags
    Calculator Ti-84
moonman239
Messages
276
Reaction score
0
I want to create a histogram that shows the averages of 5000 samples of 500 dice each. How do I do this?
 
Physics news on Phys.org
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.
 
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.
 
If there are an infinite number of natural numbers, and an infinite number of fractions in between any two natural numbers, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and... then that must mean that there are not only infinite infinities, but an infinite number of those infinities. and an infinite number of those...

Similar threads

  • · Replies 16 ·
Replies
16
Views
4K
Replies
4
Views
2K
  • · Replies 41 ·
2
Replies
41
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 2 ·
Replies
2
Views
22K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K