Question: PLEASE SHOW CODE ON THE PYTHON NOTEBOOK AND SCREENSHOT OF RESULT Task 2: Generate 20,000 random numbers, each of which is a sum of X

PLEASE SHOW CODE ON THE PYTHON NOTEBOOK AND SCREENSHOT OF RESULT  PLEASE SHOW CODE ON THE PYTHON NOTEBOOK AND SCREENSHOT OF RESULT

Task 2: Generate 20,000 random numbers, each of which is a sum of X and Y. X follows a log-normal distribution with parameters -0.2 and 0.5; Y follows a normal distribution with -0.2 and -05. Once random numbers are generated, compute the mean and variance Repeat this process for 1000 times and record all results in an array. Save only top 10 rows and 5 rows to a text file You are required to complete this task using TWO approaches: (a) without for-loops and (b) with for-loops. Name those two files as "task2outputHW7 a.txt" and "task2outputHW7 b.txt", respectively. Add a screenshot (see below for a sample) to your notebook indicating that output text file is generated. task2outputHW7a-Notepad Eile Edit Format Yiew Help 1.519 0.801 1.550 0.940 1.639 0.962 1.645 1.061 1.544 0.572 1.633 1.350 1.774 1.441 1.656 1.056 1.604 0.743 1.505 0.843 1.555 0.706 1.652 0.632 1.408 0.668 1.584 0.863 1.710 1.309

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!