Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q2: Random number distributions (8 points) In this problem, you are going to visualize random number distributions, using a sideways graph of asterisks (which you

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Q2: Random number distributions (8 points) In this problem, you are going to visualize random number distributions, using a sideways graph of asterisks (which you can 'cout'), eg.: The code you are going to implement, is for random numbers that fall between 0.0 and 1.0 (not 0 to 32767, etc). Out of N random numbers that you generate (eg. N can be 1000000), you are going to count how many lie between these ranges: 0.2 -0.3 This is called 'binning' (where we assign each random number to one of 10 bins/buckets). If the bins are numbered 0,1,2..9, then you can determine a random number r's bin using: floor (r*1e) 11 eg. if r is e.5980345, r10 is 5.900345, and floor(r 10) is 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions