Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 06-28-2009, 07:41 PM
lillianjbrown lillianjbrown is offline
Registered User
 
Join Date: 20 Jun 2009
Location: Mableton
MS Office Version:Excel 2003
Posts: 13
lillianjbrown is becoming part of the community
Sampling/Random Selection

Please Register to Remove these Ads

I have a file (see SAMPLE file attached) with over 2000 records. I need to know if there is a way to do a sampling or random selection by ethnicity and gender in order to get a diverse population for only 60 individuals. The selection criteria should be on ethinicity and gender.

Is this possible?

Thanks.
Attached Files
File Type: xls Test-Sampling.xls (196.5 KB, 4 views)
Reply With Quote
  #2  
Old 06-28-2009, 08:12 PM
martindwilson's Avatar
martindwilson martindwilson is offline
Forum Guru
 
Join Date: 23 Jun 2007
Location: London,England
MS Office Version:office 97 ,2003 ,2007
Posts: 6,084
martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding
Re: Sampling/Random Selection

example doesnt show either of those criteria!
__________________
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code

how to enter array formula


recommended reading
wiki Mojito

how to say no convincingly

most important think you need
Reply With Quote
  #3  
Old 06-29-2009, 04:08 PM
lillianjbrown lillianjbrown is offline
Registered User
 
Join Date: 20 Jun 2009
Location: Mableton
MS Office Version:Excel 2003
Posts: 13
lillianjbrown is becoming part of the community
Re: Sampling/Random Selection

Sorry about that. I have upload new file to include ethnicity and gender criteria. Would you please take a look?

Thanks.
Attached Files
File Type: xls Test-Sampling.xls (227.0 KB, 2 views)
Reply With Quote
  #4  
Old 06-29-2009, 04:43 PM
martindwilson's Avatar
martindwilson martindwilson is offline
Forum Guru
 
Join Date: 23 Jun 2007
Location: London,England
MS Office Version:office 97 ,2003 ,2007
Posts: 6,084
martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding
Re: Sampling/Random Selection

i must admit i know not a fig about stats!
but so far i have how many required from each to make up 60
but as the data isnt realistic there are very few of some groups(i added a few but got bored!) see sheet 1
Attached Files
File Type: xls Test-Sampling(2).xls (231.5 KB, 2 views)
__________________
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code

how to enter array formula


recommended reading
wiki Mojito

how to say no convincingly

most important think you need
Reply With Quote
  #5  
Old 06-29-2009, 04:56 PM
shg's Avatar
shg shg is online now
Forum Guru
 
Join Date: 20 Jun 2007
Location: The Great State of Texas
MS Office Version:2003, 2007
Posts: 18,545
shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay
Re: Sampling/Random Selection

Here's an alternative. Enter the sample size in H2; col I shows the lucky selectees.
Attached Files
File Type: zip 689493 - Allocation.zip (173.0 KB, 8 views)
__________________
Entia non sunt multiplicanda sine necessitate.

Last edited by shg; 06-29-2009 at 06:06 PM.
Reply With Quote
  #6  
Old 06-29-2009, 04:59 PM
lillianjbrown lillianjbrown is offline
Registered User
 
Join Date: 20 Jun 2009
Location: Mableton
MS Office Version:Excel 2003
Posts: 13
lillianjbrown is becoming part of the community
Re: Sampling/Random Selection

Martin,

Thanks for your assistance. I guess I need to be more specific on what I need to make happen. I need to actually pull the names of the 60 so that I establish an invite list to an event.

Is there anyway to do that?

Thanks.
Reply With Quote
  #7  
Old 06-29-2009, 05:31 PM
martindwilson's Avatar
martindwilson martindwilson is offline
Forum Guru
 
Join Date: 23 Jun 2007
Location: London,England
MS Office Version:office 97 ,2003 ,2007
Posts: 6,084
martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding
Re: Sampling/Random Selection

here's how id approach it i havent opened SHG's coz its probably very clever and simple!
and it would break my heart to see i had wasted so much time lol
Attached Files
File Type: zip Test-Sampling(2).zip (114.6 KB, 5 views)
__________________
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code

how to enter array formula


recommended reading
wiki Mojito

how to say no convincingly

most important think you need
Reply With Quote
  #8  
Old 07-01-2009, 08:40 AM
lillianjbrown lillianjbrown is offline
Registered User
 
Join Date: 20 Jun 2009
Location: Mableton
MS Office Version:Excel 2003
Posts: 13
lillianjbrown is becoming part of the community
Re: Sampling/Random Selection

Quote:
Originally Posted by shg View Post
Here's an alternative. Enter the sample size in H2; col I shows the lucky selectees.
WOW! You took this to the next level! Thanks. I have taken an opportunity to plug in the real data records and it works like a charm. MISSION ACCOMPLISHED.

I would however like to discuss the detail of the formulas and the functionality of the spreadsheet in more detail.

How do you know so much? How did you gain so much knowledge about Excel?

Much appreciation to you and what you do for others!!!!!!
Reply With Quote
  #9  
Old 07-01-2009, 07:34 PM
shg's Avatar
shg shg is online now
Forum Guru
 
Join Date: 20 Jun 2007
Location: The Great State of Texas
MS Office Version:2003, 2007
Posts: 18,545
shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay
Re: Sampling/Random Selection

Lillian,

The sheet applies the same method twice: fractional allocation of a number across categories. In the upper section, there is this formula in I4 and down:

=IF(G4=0, 0, ROUND( G4 * ($H$2 - SUM(H$3:H3) ) / ($G$14 - SUM(G$3:G3)), 0) )

Paraphrased, it says "select people in this proportion: (SampleSize - PeopleSelectedSoFar) / (TotalNumberOfPeople - PeopleConsideredSoFar)

The ROUND function acknowledges that you can only select whole people.

The formula in I17 and down is

=IF(RAND() < (INDEX($H$4:$H$13, E84) - SUMPRODUCT( (E$16:E83=E84) * (I$16:I83="x") ) ) / (INDEX($G$4:$G$13, E84) - COUNTIF(E$16:E83, E84) ), "x", "")

This uses a random number to select someone (or not), based on

(DesiredSampleSizeByCategory - PeopleSelectedInCategorySoFar) / (PeopleInCategory - PeopleInCategoryConsideredSoFar)

This fraction is the percentage of remaining people that must be selected to achieve the required sample for the category.

Column I just verifies that the sampling worked as desired.
__________________
Entia non sunt multiplicanda sine necessitate.
Reply With Quote
  #10  
Old 07-01-2009, 07:35 PM
martindwilson's Avatar
martindwilson martindwilson is offline
Forum Guru
 
Join Date: 23 Jun 2007
Location: London,England
MS Office Version:office 97 ,2003 ,2007
Posts: 6,084
martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding
Re: Sampling/Random Selection

told you he was clever!
__________________
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code

how to enter array formula


recommended reading
wiki Mojito

how to say no convincingly

most important think you need
Reply With Quote
  #11  
Old 07-04-2009, 06:28 AM
lillianjbrown lillianjbrown is offline
Registered User
 
Join Date: 20 Jun 2009
Location: Mableton
MS Office Version:Excel 2003
Posts: 13
lillianjbrown is becoming part of the community
Re: Sampling/Random Selection

I think clever is an understatment...I would say he is a freaking genius!
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump