Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Python , the aim is to fill two vector arrays xv and yv with x and f(x) values, respectively, where the probability density function
Using Python, the aim is to fill two vector arrays xv and yv with x and f(x) values, respectively, where the probability density function for pareto is:
f(x,b) = b/xb+1
for x>1 and b>0.
Pareto takes b as a shape parameter for b. Let the xv values be uniformly spaced in xv = [1,5] with 100 grid points.
Write a loop to fill in the values for xv and yv = f(xv,b), for b=1, b=2 and b=3.
- So at the end you should have a vector xv with the X-values and a vector yv with the function values f(x,b) for any given b.
Plot yv against xv using the plot command (you should have three lines in a single figure - one for each b).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started