Generate a Multivariate Random Variable

In summary, the economics graduate student is trying to generate random variables that follow the extreme-value distribution. She uses the limit as ##x_2## goes to infinity to find the marginal distribution of ##F(x_1, x_2)## and the conditional distribution of ##F(x_1, x_2)## given ##x_1##. She then inverts these distributions to get a random variable that follows the distribution described by ##F(x)##.
  • #1
Jeffack
14
0
Hi,

I'm an economics graduate student doing some work on a nested logit model.

I am trying to generate random variables that follow the following CDF:
[itex] F(x_1, x_2) =\textrm{exp}[ -(e^{-2x_1}+e^{-2x_2}) ^{1/2}] [/itex]
(This is an extreme-value distribution)

With a single random variable, I know that (assuming you can invert the CDF), you can just draw ##u## from the Uniform [0,1] distribution and do ##x=F^{-1}(u)## to get a random variable that follows the distribution described by ##F(x)##.

With the multivariate case, I think what I need to do is:

1) Find ## F_{x_1}(x_1, x_2)##, the marginal distribution of ##F(x_1, x_2)##. I do this by taking the limit as ##x_2## goes to infinity, so ## F_{x_1}(x_1, x_2)=\textrm{exp}[ -(e^{-2x_1}) ^{1/2}]##

2) Find ## F(x_1, x_2 | x_1)##, the conditional distribution of ##F(x_1, x_2)## given ##x_1##. This is calculated this way: ## F(x_1, x_2 | x_1)= {\frac{F(x_1, x_2)}{F_{x_1}(x_1, x_2)}} ##

3) Invert ## F_{x_1}(x_1, x_2)=u_1## to get ## F_{x_1}^{-1}(u)=x_1 ##. This gives us a random ##x_1## for an value of ##u_1 \in (0,1) ##

4) Use the value of ##x_1## generated in the previous step in this step. Invert ## F(x_1, x_2 | x_1)=u_2 ## to get ## F^{-1}(u_2)=x_2##

Here are the formulas I use for determining the random variables (Sorry they're not all pretty and Latex-y... I pulled them from Excel)

x_1=(LN((LN(u_1))^2))/-2

x_2=(LN(((LN(u_2*(EXP(-1*((EXP(-2*x_1))^(1/2))))))/-1)^2-(EXP(-2*x_1))))/-2

I did all of these steps and, at first, thought I got a decent result; As long as I pick ##u##'s that are between 0 and 1, I get a real answer; larger u's generate larger x's; and u's that are arbitrarily close to zero (one) give x's that are very small (large). However, when I ran a simulation and looked at average values of each, my ##x_1##'s tend to be much larger than my ##x_2##'s (about .66 for ##x_1## and -.1 for ##x_2##. Since the CDF is symmetric, I think that these variables should have the same average.

Any help will be much appreciated. This is my first post ever on this site!
 
Physics news on Phys.org
  • #2
Hey Jeffack and welcome to the forums.

A key question you need to answer: Are x1 and x2 independent variables or are they dependent? (If the limits of integration are tied up or if you have correlation or one variable has the property of being a function of the other then you have dependence).
 
  • #3
I think that, based on the CDF, the variables are dependent, correct? The conditional density of ##x_2## depends on the value of ##x_1##.
 
  • #4
Yes I agree with you but once you find the relationship between X1 and f(X1) = X2 then you calculate Cov(X1,X2) = E[X1*X2] - E[X1]E[X2] = E[X1*f(X1)] - E[X1]*E[f(X1)] using only the PDF for X1.
 
  • #5
Thanks for your help. The variables are definitely correlated. Now I just need to figure out how to generate the random variables.
 

1. How do you generate a multivariate random variable?

To generate a multivariate random variable, you first need to define the variables that will make up the variable. Then, you can use a statistical software or programming language to generate random values for each variable according to a specified distribution. Finally, combine the random values for each variable to create the multivariate random variable.

2. What is the purpose of generating a multivariate random variable?

The purpose of generating a multivariate random variable is to simulate a real-world scenario where multiple variables are dependent on each other. This allows for more accurate and realistic data analysis and modeling, as many real-world phenomena involve multiple variables that are interrelated.

3. What are the common distributions used to generate multivariate random variables?

The common distributions used to generate multivariate random variables include the normal distribution, uniform distribution, and multivariate normal distribution. The choice of distribution depends on the nature of the variables and the assumptions made about their relationship.

4. Can you customize the correlation between variables in a multivariate random variable?

Yes, it is possible to customize the correlation between variables in a multivariate random variable. This can be done by specifying the covariance matrix, which determines the strength and direction of the correlation between variables. Adjusting the values in the covariance matrix can result in different levels and types of correlation.

5. How can multivariate random variables be used in statistical analysis?

Multivariate random variables can be used in statistical analysis to model and analyze complex relationships between multiple variables. They can also be used to generate simulated data for predictive modeling and testing hypotheses. Additionally, multivariate random variables are useful in risk assessment and decision-making processes.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
485
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
927
  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
789
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
747
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
890
Back
Top