Question: Write a python script to do the following: Generate 5 arrays (of length 1000) of random integers in [1, 5] with uniform distribution. For each

 Write a python script to do the following: Generate 5 arrays

Write a python script to do the following: Generate 5 arrays (of length 1000) of random integers in [1, 5] with uniform distribution. For each array X, compute the array S, where S [i], i = 0, 1, ..., 999, is the average of the first i + 1 elements of X. Plot all the 5 arrays S computed above in the same figure, and save the figure (see instructions below). You may only use the following packages: numpy, matplotlib, os, sys, getopt

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!