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

  • SEARCH
  • Home
  • 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 6635869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:06:40+00:00 2026-05-25T23:06:40+00:00

I have been trying to search answer for this, but all discussions that I

  • 0

I have been trying to search answer for this, but all discussions that I have found are either in language that I don’t understand or relies on having a collection where each element has its own weight.

I want to basically just get a random number between 0 and 10, which is “middle-weighted” as in 5 comes more often than 0 and 10. Basically I have been trying to figure out an algorithm where I can give any number to be the “weighted number” between min and max values that I have defined and all the numbers generated would be weighted appropiately. I know that this may sound like “I dont want to think about this, I’ll just sit back and wait someone else to do this”, but I have been thinking and searching about this for like an hour and I’m really lost 😐

So in the end, I want that I could call ( via extension method )

random.NextWeighted(MIN, MAX, WEIGHT);
  • 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-25T23:06:41+00:00Added an answer on May 25, 2026 at 11:06 pm

    You have an inverse normal distribution method available.

    1. Scale your random number so that it’s a double between zero and one.

    2. Pass it to InverseNormalDistribution.

    3. Scale the returned value based on the weight. (For example, divide by weight over 100.)

    4. Calculate [ (MIN + MAX) / 2 ] + [ (ScaledValue) X (MAX – MIN) ]

    5. If that’s less than MIN, return MIN. If it’s more than MAX, return MAX. Otherwise, return this value.

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

Sidebar

Related Questions

I have search all over the web but could not find answer to this
I have been trying to search around and have not really found an answer
I have been trying to create a new google custom search engine, but when
I have been trying to search for this and am not sure I am
I have been trying to work out the bug on this but can't seem
I have been trying to make this search engine for a MySQL database. Taking
I have been trying to write a recursive function that searches a stack, but
I have been stuck on this all afternoon, and even tried the following search:
I'm new to Python and I have been trying to search through html with
I have been trying to use array_unique to remove duplicates from the search results

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.