Question: Please use Python to solve this problem. Let x1, x2,x3....xn be independent random variables having a common distribution X. We can use ( s u

Please use Python to solve this problem.

Let x1, x2,x3....xn be independent random variables having a common distribution X. We can use (sum i=1 to xi )/n as an estimation for the expected value of X. Let N0=1000, and S=1000.

(a) Use np.random.pareto(alpha, n) from the Numpy library to create n instance of a Pareto distribution with parameters alpha= 2 and m=1

(b) Choose a value N1> N0+50S. Vary n from N0 to N1 by steps of size S, and estimate the expect value of the Pareto distribution for each n. Plot your estimation for each value of n.

(c) By observing the plot of part b, find (by trial and error) the value N1 for which your estimation lies within 2% of the expected value of the Pareto distribution for 50 consecutive steps before N1, ie. your estimation must lie within 2% of the expected value for n= N1-50S, N1-49S, N1-48S......,N1

(d) Repeat parts a-c for an exponential distribution with parameter lambda=2. You can use np.random.exponential (lambda,n) from the Numpy library

(e) Compare N1 derived in part c for the Pareto and exponential distributions. What is your observation?

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 Mathematics Questions!