Iam looking for random sampling selection for one table set based on criteria from other table. Below is just a sample data where we select sample of 50 samples out of 20000 ids available in system where we could have a repetitive Name, Rating, Dept
Based on below total population, I have 1 sample each from Sales(High) and Sales(Medium) to be picked on random basis.
1. If random tool picks Dan(High) from CA, then name Dan, state CA and rating High then the next pick should go to Joy(Medium) with state AU. Now state CA, AU should be given second priority as they are already picked in first 2 samples.
2. Marketing(Low). As state CA and AU are already covered in above sample, now row8-Ross should be second priority and next sample should be either from Row9-Peter or Row#15-John.
This is how the final sample should be picked up basis which should cover maximum states, Rating and Dept as per sample with unique Name(No repeat). Sample must be picked on random basis only
Total Population
| State | Dept | Rating | Name |
1 | CA | Sales | High | Dan |
2 | CA | Sales | Medium | Dan |
3 | CA | Sales | Low | Dan |
4 | CA | Sales | High | Dan |
5 | AU | Sales | High | Joy |
6 | AU | Sales | Medium | Joy |
7 | AU | Marketing | High | Ross |
8 | AU | Marketing | Low | Ross |
9 | TX | Marketing | Low | Peter |
10 | CA | Collection | High | Audrey |
11 | CA | Collection | Medium | Audrey |
12 | AU | Sales | Medium | Joy |
13 | IN | Collection | High | Jack |
14 | BJ | Audit | Low | Audrey |
15 | AR | Marketing | Low | John |
16 | AR | Collection | High | Bob |
17 | FR | Collection | Low | Alice |
Sample Size to be picked.
Dept | Rating | No of samples to be picked |
Sales | High | 1 |
Sales | Medium | 1 |
Marketing | Low | 1 |
Collection | High | 1 |