Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 59937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:05:01+00:00 2026-05-10T18:05:01+00:00

How do I distribute a small amount of data in a random order in

  • 0

How do I distribute a small amount of data in a random order in a much larger volume of data?

For example, I have several thousand lines of ‘real’ data, and I want to insert a dozen or two lines of control data in a random order throughout the ‘real’ data.

Now I am not trying to ask how to use random number generators, I am asking a statistical question, I know how to generate random numbers, but my question is how do I ensure that this the data is inserted in a random order while at the same time being fairly evenly scattered through the file.

If I just rely on generating random numbers there is a possibility (albeit a very small one) that all my control data, or at least clumps of it, will be inserted within a fairly narrow selection of ‘real’ data. What is the best way to stop this from happening?

To phrase it another way, I want to insert control data throughout my real data without there being a way for a third party to calculate which rows are control and which are real.


Update: I have made this a ‘community wiki’ so if anyone wants to edit my question so it makes more sense then go right ahead.


Update: Let me try an example (I do not want to make this language or platform dependent as it is not a coding question, it is a statistical question).

  • I have 3000 rows of ‘real’ data (this amount will change from run to run, depending on the amount of data the user has).
  • I have 20 rows of ‘control’ data (again, this will change depending on the number of control rows the user wants to use, anything from zero upwards).

I now want to insert these 20 ‘control’ rows roughly after every 150 rows or ‘real’ data has been inserted (3000/20 = 150). However I do not want it to be as accurate as that as I do not want the control rows to be identifiable simply based on their location in the output data.

Therefore I do not mind some of the ‘control’ rows being clumped together or for there to be some sections with very few or no ‘control’ rows at all, but generally I want the ‘control’ rows fairly evenly distributed throughout the data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:05:01+00:00Added an answer on May 10, 2026 at 6:05 pm

    There’s always a possibility that they get close to each other if you do it really random 🙂

    But What I would do is:

    1. You have N rows of real data and x of control data
    2. To get an index of a row you should insert i-th control row, I’d use: N/(x+1) * i + r, where r is some random number, diffrent for each of the control rows, small compared to N/x. Choose any way of determining r, it can be either gaussian or even flat distribution. i is an index of the control row, so it’s 1<=i<x
    3. This way you can be sure that you avoid condensation of your control rows in one single place. Also you can be sure that they won’t be in regular distances from each other.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 68k
  • Answers 68k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I think this will do it for you <asp:DataList ID='dlImages'… May 11, 2026 at 12:17 pm
  • added an answer There's no way to raise a mousemove and have it… May 11, 2026 at 12:17 pm
  • added an answer If the method attribute is set to GET, the browser… May 11, 2026 at 12:17 pm

Related Questions

How do I make the most out of a MS in Business Analytics?
How do I tell my new employer that I can’t use the computer they gave me?
There is small system, where a database table as queue on MSSQL 2005. Several
I wrote a small PHP application that I'd like to distribute. I'm looking for

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.