{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

SA7 - Stat 133 Fall 2009 Short assignment 7 Working with...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Stat 133, Fall 2009 Short assignment 7: Working with non-standard distributions Due Tuesday Nov. 24 at 11 pm on bSpace The Pareto distribution is often used to model data that has a long right tail, such as incomes. Its pdf is f ( x ) = ακ α x α +1 , x > κ and its cdf is F ( x ) = 1 - κ x α , x > κ Functions for working with the Pareto distribution are not built into R , so in this assignment you’ll write your own. Write two functions, dpareto and ppareto , to calculate the pdf and cdf. Both should have arguments x , alpha , and kappa , and both should include a check that all values in x are greater than kappa , producing an error message if not. Create a sequence of x values and use it to make two plots illustrating the pdf and cdf for a specific choice of α and κ . The inverse CDF method is an algorithm for generating random samples from a distribution when its CDF F ( x ) has an inverse that’s available in closed form. To generate B samples, we 1. simulate B random samples y (1) , . . . , y ( B ) from a uniform distribution on [0 ,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '08
  • Staff
  • Probability distribution, probability density function, Cumulative distribution function, Inverse transform sampling, random samples, inverse cdf method

{[ snackBarMessage ]}

Ask a homework question - tutors are online