![]() |
Sampling in excel
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 |
Sampling in excel
On 11 Dec, 21:48, " wrote:
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 |
Sampling in excel
On Dec 11, 5:26 pm, wrote:
On 11 Dec, 21:48, " wrote: 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 Hi James Let me give it a shot. Will get back. thanks! chet |
All times are GMT +1. The time now is 08:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com