Sampling in excel

F

FortisChet

Hi Folks

I'm trying to WRITE down all possible sample sizes from a single toss
of 3 dice. The sample space I have is 216.(6*6*6).

I have the data listed as follows in excel :


1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6


What I want to do is write a code that picks up all possible samples
of size 3. Sampling is with replacement. The code would go through the
list and say pick up 1,1,1 as sample 1, 1,2,1 as sample 2. It would
also recognize that 1,2,1 is not the same as 1,1,2 etc. The ultimate
goal is to add up the components of each of the samples and see what
distribution I will get as the sample size gets larger( Central Limit
Theorem).

Any suggestions on how to get started?

thanks
Chet
 
J

james.billy

Hi Folks

I'm trying to WRITE down all possible sample sizes from a single toss
of 3 dice. The sample space I have is 216.(6*6*6).

I have the data listed as follows in excel :

1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6

What I want to do is write a code that picks up all possible samples
of size 3. Sampling is with replacement. The code would go through the
list and say pick up 1,1,1 as sample 1, 1,2,1 as sample 2. It would
also recognize that 1,2,1 is not the same as 1,1,2 etc. The ultimate
goal is to add up the components of each of the samples and see what
distribution I will get as the sample size gets larger( Central Limit
Theorem).

Any suggestions on how to get started?

thanks
Chet

Hi Chet,

Not quite sure that I understand but if you wanted to output all the
combinations from 3 dice then try:

Sub DiceGames()
For i = 1 To 6
For j = 1 To 6
For k = 1 To 6
ActiveCell = i & ", " & j & ", " & k
ActiveCell.Offset(1, 0).Select
Next k
Next j
Next i
End Sub

James
 
F

FortisChet

Hi Chet,

Not quite sure that I understand but if you wanted to output all the
combinations from 3 dice then try:

Sub DiceGames()
For i = 1 To 6
For j = 1 To 6
For k = 1 To 6
ActiveCell = i & ", " & j & ", " & k
ActiveCell.Offset(1, 0).Select
Next k
Next j
Next i
End Sub

James

Hi James
Let me give it a shot. Will get back.
thanks!
chet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top