Question: Python program show code Task 2: Generate 20,000 random numbers, each of which is a sum of X and Y. X follows a log-normal distribution

 Python program show code Task 2: Generate 20,000 random numbers, each

of which is a sum of X and Y. X follows a

Python program

show code

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 u = 0.2 and 0 =0.5; Y follows a normal distribution with j = 0.2 and o =0.5. 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 the first 10 rows and the last 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 task2outputHW6_a.txt and task2outputHW6_b.txt, respectively. Add a screenshot (see below for a sample) to your notebook indicating that output text file is generated. distribution with parameters u = 0.2 and 0 =0.5; Y follows a normal distribution with u = 0.2 and o =0.5. 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 the first 10 rows and the last 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 task2outputHW6_a.txt and task2outputHW6_b.txt, respectively. Add a screenshot (see below for a sample) to your notebook indicating that output text file is generated. task2outputHW7_a - Notepad File Edit Format View Help 1.579 0.773 1.589 0.808 1.577 0.811 1.592 0.803 1.583 0.806 1.593 0.806 1.576 0.780 1.579 0.777 1.583 0.790 1.585 0.794 1.591 0.789 1.582 0.777 1.584 0.790 1.583 0.782 1.598 0.825

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!