Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I've finished i. : here is my code # importing module from statistics import mean import random import numpy as np # numpy.random.uniform() method random_array

I've finished i. : here is my code

# importing module from statistics import mean import random import numpy as np # numpy.random.uniform() method random_array = np.random.uniform(0.0, 2.0, 10)

# printing 1D array with 10 random samples that are uniformly distributed in the range of [0,2] print("1D Array with random values : ", random_array)

#computing mean of 5 numbers

def Average(l): avg = mean(l) return avg my_list = random.choices(random_array, k=5) average = Average(my_list) print("Random selected 5 numbers from list are :", my_list) print ("Average of my_list is", average)

Need help with ii-vi

image text in transcribed

Use Python to complete all parts of the problem. a. Implement the following: i. Generate n=10 samples that are uniformly distributed numbers in the range of [0,2] and compute the mean of these 5 numbers. ii. Repeat this step 1000 times to obtain 1000 means. iii. Plot a histogram of these 1000 values. iv. Calculate the mean and standard deviation of this distribution. v. Calculate the percentage of the 1000 values that are within 1,2 , and 3 standard deviations of the mean. vi. Using vertical lines overlaid on the histogram, indicate the values corresponding to 1,2 , and 3 , standard deviations from the mean

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

Step: 3

blur-text-image

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

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

Students also viewed these Databases questions

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago

Question

Question What are the requirements for a SIMPLE 401(k) plan?

Answered: 1 week ago