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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:27:19+00:00 2026-05-18T22:27:19+00:00

I have a movie database where I need to populate with data so it

  • 0

I have a movie database where I need to populate with data so it becomes easier to test and develop the application. There’s tables to hold movie ratings and user accounts, the users rate the movies.

I’ve started to develop a script to populate the database with fake and generic data but I don’t know how to randomize the rating. For each movie I select a random number of users, 100, 500, 1000, whatever. And for each of those users I randomize a rating from 1 through 10. But these ratings are resulting in the same average, around 5. Which means the distribution of ratings (1 through 10) for a specific movie is basically the same. This is not “realistic” at all as all movies with ratings generated like this will have the same average, thus the same ratings from different users and different amount of users, doesn’t really matter.

I wanted movie A to have an average of 7, movie B average of 5, movie C average of 8, etc… But I just don’t want the average to be different for every movie. I mean, it would be nice to produce ratings like this (for a specific number of users):
http://www.imdb.com/title/tt1046173/ratings or this http://www.imdb.com/title/tt0486640/ratings

You know, something random that could produce two different variations like those above. I hit refresh and I get the first graph, I hit refresh and get the second, hit again and get something different or similar, something “random” and “realistic”.

I’m also going to display graphs like this on my app so it would look nice to have different distributions. But I have no idea how can I randomly accomplish this with a simple script to generate all that.

How can I solve this? Maybe it’s too much work not worth it?

Maybe something simpler, like select a point (between 1 and 10) and then create a normal distribution of ratings where that selected point is the highest one, that would work for me.

  • 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-18T22:27:20+00:00Added an answer on May 18, 2026 at 10:27 pm

    You want to fix the mean, and probably the variance, and generate random numbers around those.

    This should help you get started:
    Generating random numbers with known mean and variance

    Edit:
    Actually, if you think about it this can be solved easily: the reason your numbers are tending towards 5, is because your scale is between 1 and 10 (so the mean is 5).

    Just take your random numbers, add 8 to all of them, and round any number greater than 10 down to 10, and you’ll get something centered around 8-ish (but skewed above). Probably good enough for your purposes?

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

Sidebar

Related Questions

I have two tables in my database, called ratings and movies . Ratings: |
I have 28,000 images I need to convert into a movie. I tried mencoder
I have a lingo script which runs some data processing for a Flash movie.
I have a flash movie that loads images dynamically from an xml file. I
I have a nested movie clip instance that I want to access. The path
I have created a bunch of movie clips which all have similar names and
I have a flash program that loads movie clips dynamically and sometimes they want
I'm trying to get a dynamic movie clip from the timeline. I have a
In the past, some of my projects have required me to create a movie
We are using SQL Server 2000 and have to move data across servers to

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.