This preview shows page 1. Sign up to view the full content.
Stat 133, Fall 2009
Short assignment 7: Working with nonstandard 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
speciﬁc 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
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 12/20/2009 for the course STAT 133 taught by Professor Staff during the Fall '08 term at University of California, Berkeley.
 Fall '08
 Staff

Click to edit the document details