Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 Data Analysis - Sampling | Excel Worksheet Functions | |||
Sampling | Excel Discussion (Misc queries) | |||
Excel 2003: Charting Two Datasets with Different Sampling Rates (T | Charts and Charting in Excel | |||
how to use excel to do random sampling | Excel Discussion (Misc queries) | |||
Sampling | Excel Discussion (Misc queries) |