Sign Up |  Live StatsLive Stats    Articles 35,345| Comments 159,790| Members 17,820, Newest waheguruhelpme| Online 225
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

Random Samples

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 35 USD (9%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
Punjab to test 6 lakh soil samples this year: Langah (New Kerala) Sikh News Reporter Sikh News 0 30-Aug-2008 11:34 AM
Random Process in Sikhism vijaydeep Singh Sikh Sikhi Sikhism 2 21-Aug-2008 13:17 PM
Random of Act of kindness... Aman Singh Inspirational Stories 1 25-Mar-2008 22:21 PM
generate random number Kirt84 Information Technology 3 28-Jul-2006 08:42 AM


Tags
random, samples
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:28 AM
dejaqhsa's Avatar dejaqhsa
Guest
 
Posts: n/a
   
   
Random Samples

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Using Access2000
I have a database of 16,000 names and addresses. I want to be able to pull
off two groups of names - both groups need to have 2000 names each. I want to
mail these cells with different mailing packs and test which pack worked best.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12301-random-samples.html

So both cells need to be exactly the same size and both a random sample of
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301
the whole file.

In a previous bespoke database I was able to use a "1 in N" function - i.e.
to get 2000 names from 16,000 names - the system automatically selected 1 in
every 8 names - therefore giving me a random sample of 2000 names.

But I can't seem to find a funtion in access?
If anyone can help I would be most grateful.




 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:28 AM
Joseph Meehan's Avatar Joseph Meehan
Guest
 
Posts: n/a
   
   
Re: Random Samples

dejaqhsa wrote:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301
> Using Access2000
> I have a database of 16,000 names and addresses. I want to be able
> to pull off two groups of names - both groups need to have 2000 names
> each. I want to mail these cells with different mailing packs and
> test which pack worked best.
>
> So both cells need to be exactly the same size and both a random
> sample of the whole file.
>
> In a previous bespoke database I was able to use a "1 in N" function
> - i.e. to get 2000 names from 16,000 names - the system automatically
> selected 1 in every 8 names - therefore giving me a random sample of
> 2000 names.
>
> But I can't seem to find a funtion in access?
> If anyone can help I would be most grateful.


One way would be to use an autonumber field and use the random version
of auto number, then you would only need to sort on that field and pick off
the first 2,000 names. The second group could be the next 2,000 or the last
2,000 if you like or if you want to include the possibility of someone being
selected for both samples, just do an additional random autonumber.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301

--
Joseph Meehan

Dia duit


Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:28 AM
dejaqhsa's Avatar dejaqhsa
Guest
 
Posts: n/a
   
   
Re: Random Samples

Thanks for the suggestion, most appreicated. Thought it might be the cure,
but although it works for new records added to the database, it just gives
the existing data sequential numbers! Any other suggestions? or am I doing
it wrong?
(in design view - added new field to the database, changed datatype to
autonumber and under general/new values changed to random?)

"Joseph Meehan" wrote:

> dejaqhsa wrote:
> > Using Access2000
> > I have a database of 16,000 names and addresses. I want to be able
> > to pull off two groups of names - both groups need to have 2000 names
> > each. I want to mail these cells with different mailing packs and
> > test which pack worked best.
> >
> > So both cells need to be exactly the same size and both a random
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301
> > sample of the whole file.
> >
> > In a previous bespoke database I was able to use a "1 in N" function
> > - i.e. to get 2000 names from 16,000 names - the system automatically
> > selected 1 in every 8 names - therefore giving me a random sample of
> > 2000 names.
> >
> > But I can't seem to find a funtion in access?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301
> > If anyone can help I would be most grateful.

>
> One way would be to use an autonumber field and use the random version
> of auto number, then you would only need to sort on that field and pick off
> the first 2,000 names. The second group could be the next 2,000 or the last
> 2,000 if you like or if you want to include the possibility of someone being
> selected for both samples, just do an additional random autonumber.
>
> --
> Joseph Meehan
>
> Dia duit
>
>
>

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:28 AM
Joseph Meehan's Avatar Joseph Meehan
Guest
 
Posts: n/a
   
   
Re: Random Samples

dejaqhsa wrote:
> Thanks for the suggestion, most appreicated. Thought it might be the
> cure, but although it works for new records added to the database, it
> just gives the existing data sequential numbers! Any other
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301
> suggestions? or am I doing it wrong?
> (in design view - added new field to the database, changed datatype to
> autonumber and under general/new values changed to random?)
>
> "Joseph Meehan" wrote:
>


You could try making a new table with the additional field and then use
an update query to populate it. (Making an new table by copying just the
structure of the existing table would make it easier.)

--
Joseph Meehan

Dia duit


Reply With Quote
  #5 (permalink)  
Old 28-Jul-2006, 08:28 AM
John Vinson's Avatar John Vinson
Guest
 
Posts: n/a
   
   
Re: Random Samples

  Donate Today!  
On Thu, 29 Jun 2006 03:42:02 -0700, dejaqhsa
wrote:


>In a previous bespoke database I was able to use a "1 in N" function - i.e.
>to get 2000 names from 16,000 names - the system automatically selected 1 in
>every 8 names - therefore giving me a random sample of 2000 names.


You can use the Top Values property of a query, with help
from a little VBA. Put this little function into a Module:

Public Function RndNum(vIgnore As Variant) As Double
Static bRnd As Boolean
If Not bRnd Then
'Initialize the random number generator once only
bRnd = True
Randomize
End If
RndNum = Rnd()
End Function

Then add a calculated field to your Query by typing

Shuffle: RndNum([fieldname])

in a vacant Field cell, where [fieldname] is any field in
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301
your table - this forces Access to give a different random
number for each record.

Sort the query by Shuffle, and set its Top Values property
to the number of records you want to see.

Note that if you run the query twice, there's no guarantee that you
won't get repeats (the same customer selected in both runs). You may
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12301
want to adapt this to use a constant to generate the same random
number sequence twice; instead of calling Randomize use

Dim vDiscard As Variant
vDiscard = Rnd(3456)

using any arbitrary seed number. Then run the query sorting ascending
for the "top" 2000, then descending for the "bottom".

John W. Vinson[MVP]

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

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

Advanced Search
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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Active Discussions
sikhism Who is "Mohan"?
Today 08:46 AM
22 Replies, 335 Views
sikhism How important is Matha...
Today 08:12 AM
59 Replies, 1,038 Views
sikhism need urgent advice.......
Today 06:46 AM
6 Replies, 81 Views
sikhism ਨਾਮਾ
Today 06:37 AM
2 Replies, 53 Views
sikhism Sikh Diamonds Video...
Today 04:23 AM
6 Replies, 116 Views
sikhism Are Creator and Creation...
Today 01:30 AM
44 Replies, 2,837 Views
sikhism Herman Hesse,...
Today 00:54 AM
13 Replies, 229 Views
sikhism On a Scale of Most...
Yesterday 21:42 PM
30 Replies, 1,277 Views
sikhism I became victim by...
Yesterday 19:50 PM
0 Replies, 44 Views
sikhism Sikh Books downloads
Yesterday 15:39 PM
2 Replies, 66 Views
sikhism Salok Sheikh Farid ji...
Yesterday 09:35 AM
0 Replies, 47 Views
sikhism In Punjab, three farmers...
Yesterday 05:36 AM
0 Replies, 49 Views
sikhism Supernatural Sikhs, what...
Yesterday 03:45 AM
19 Replies, 414 Views
sikhism Sukhmani Sahib Astpadi...
26-May-2012 22:57 PM
0 Replies, 51 Views
Do You Think You Are...
26-May-2012 09:59 AM
94 Replies, 8,258 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 08:56 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.38995 seconds with 30 queries