# Generate data from a bivariate power-law distribution in R

I need to generate data from a random vector that follows a bivariate power-law: $$f_{X,Y}(x,y) = \frac{C}{XY} \left(\frac{X}{X_0} \right)^{-\alpha} \left(\frac{Y}{Y_0} \right)^{-\beta} ,$$ where $X_0,Y_0,C>0$ are constants. I can generate data from a univariate power-law by using a uniform random variable and transform it (I am using $\texttt{R}$), but I have no idea how to do it for a random vector. Do you have any suggestions ?

• Comment: If $C\neq\alpha\beta$, then $f_{X,Y}$ is not a density function (since it doesn't integrate 1). $C=\alpha\beta$ is the only value that makes $f_{X,Y}$ a density function. This is easy to prove by integrating with respect to $x$ and $y$. If you want to use a copula to modelling the dependence between the marginals, then the expression for the density will be different. Cheers.
– user52640
Jul 23, 2014 at 12:59

The bivariate density you are presenting is nothing but the product of two Pareto densities with parameters $(X_0,\alpha)$ and $(Y_0,\beta)$, respectively, and $C=\alpha\beta$. So, you can re-write it as follows:

$$f_{X,Y}(x,y) = \left[\dfrac{\alpha}{X}\left(\dfrac{X}{X_0}\right)^{-\alpha}\right]\left[\dfrac{\beta}{Y}\left(\dfrac{Y}{Y_0}\right)^{-\beta}\right],$$

which implies that $X$ and $Y$ are independent Pareto random variables. Therefore, you can generate from the bivariate distribution by generating two independent univariate Pareto samples with the corresponding parameters:

library(actuar)

# Parameters
ns = 100
alpha = 1
beta = 2
X0 = 1
Y0 = 1

# Samples

Z = cbind(rpareto(n=ns, shape=alpha, scale=X0),rpareto(n=ns, shape=beta, scale=Y0))

• Actually $C$ is a fixed constant. You can't choose its value, so we don't have the pareto index. I computed the marginals and found that the variables are not independent, I'm thinking about using copulas to have the joint effect. Jul 23, 2014 at 12:42
• +1 This answer is correct. If you believe the variables are not independent, then your question is wrong, not this answer, because the question implies the variables are independent.
– whuber
Jul 23, 2014 at 13:14