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 3596370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:58:45+00:00 2026-05-18T19:58:45+00:00

I need to probabilistically select a sample from a set of data. Say I

  • 0

I need to probabilistically select a sample from a set of data.

Say I had a set of values array[12, 15, 29, 17, 12, 29]. The standard approach would be calculate the total (12 + 15 + 29 + 17 + 12 + 29) and then create a spinner that favors the higher value. Kinda like a pie chart where we select at random from the sample set but favor the Individual with the highest value.

An example with the numbers above the chance you will randomly select array[0] is 11% while the chance that array[5] is 25%. That’s fine

What I want to do though is favor the lower numbers and with all my brainstorming power I cannot figure out a way to give the lower number a statistically equal probability of selection as if we were to select the larger number.

One way I have approached the problem is to add array[] then subtract each value from the total giving you a array2[102, 99, 85, 102, 85] then recalculating the percents from array2[]. Giving array[0] a 21%. The problem with this solution is that elements with close statistical probability of selection in array[1] have distant selection percentages.

We also attempted just swapping the lowest and highest then next lowest with next highest percent values but that gives you the same problem as our first attempt.

I feel like there has to be an easy way to to this.

Note: If you are familiar with Evolutionary/Genetic Computation we are trying to do parent selection based on fitness proportion. However, our fitness value is reversed (the lower the better). So how do we do fitness proportion selection for parents if the lower the fitness the better?

  • 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. Editorial Team
    Editorial Team
    2026-05-18T19:58:46+00:00Added an answer on May 18, 2026 at 7:58 pm

    Why don’t you work with inverses? The base array for the probabilities in your example would be array[1.0/12, 1.0/15, 1.0/29, 1.0/17, 1.0/12, 1.0/29], the rest would stay the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to probabilistically select a sample from a set of data. Say I
I need to send hundreds of newsletters, but would like to check first if
need javascript to set an selected index for RAD combobox to 0
Need to modify Log4PostSharp project by inheriting from the ready-made (and working) custom attribute.
Need to store the tag from a clicked button: - (IBAction)buttonClicked:(id)sender { UIButton *button
Need a function that takes a character as a parameter and returns true if
Need a way to allow sorting except for last item with in a list.
Need to an expression that returns only things with an I followed by either
Need to locate the following pattern: The letter I followed by a space then
need ask you about some help. I have web app running in Net 2.0.

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.