Question
Often times, it is necessary to remove certain entries from a data set, list, etc., then create a new file or list with those results.
- Often times, it is necessary to remove certain entries from a data set, list, etc., then create a new file or list with those results. a. Use a file created by your Lab 4 data file creator, which has at least 10 values in the file. b. Write the code that will create a new data file, which contains only the values form the first file that are over 20 and less than 50
2. Generating truly random numbers is quite difficult. Random numbers are used in countless processes. The question of "how random" are the values created by a given random number generator sometimes needs to be verified. In order to do this, a large number of values needs to be created and tested. Minimally, this would be 100,000 values or often far higher.
Use the Number generator script to create data files that have 100,000 1,000,000 and 10,000,000 random values.
Write a script (.py file) that will create a histogram, showing the number of times a value is between 0-9, 10-19, 20-29, ...... 90-99. Display the number of values in each category when the script is finished. If the random number generator were perfect, each category would have 10% of the values in it.
For each of the 3 sets of results, calculate the Standard Deviation in percent (i.e. for the case of 100,000 numbers if the standard deviation for one category was 233, convert that value to percent based on 10,000 expected. 233/10,000, then expressed as a percent.
Step by Step Solution
3.28 Rating (148 Votes )
There are 3 Steps involved in it
Step: 1
To complete the tasks described you can follow the steps below Task 1 Creating a new data file with values between 20 and 50 from an existing file a A...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started