Stratified random sampling in Access 2007

lg502

New member
Local time
Today, 03:24
Joined
Jan 31, 2012
Messages
1
Hi,

I'm trying to build a query that will create a stratified random sample of the records in a database. I want to randomly select 10% of the records entered by each user in the database. For example, in a table called TblHousehold, I record various bits of information about households, as well as recording the individual who entered the data [DataEntry], using a numeric code. Each record is assigned a incremental autonumber as primary key [HouseholdID].

So for each unique value of DataEntry, I want to randomly select 10% of the records, and return a list of selected HouseholdID values.

Any ideas?

Thank you!

Louise
 
I am thinking that you may want to have a query with the Rnd function in an expression. Before you start you identify the random number range you will select. Let Access generate the random numbers and in your criteria, you set it to only show the range you pre-determine. Here is a tutorial on how to use the Rnd function

http://www.techonthenet.com/access/functions/numeric/rnd.php

Alan
 

Users who are viewing this thread

Back
Top Bottom