How do you verify and show independence/dependence of a pair of uniform random variables?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
If A is a subset of R and X is a random variable. I have two variables and . I being 1 if X in subset A, and 0 if not in A. U~ Let and determine if this pair is independent. Verify your claim using simulation in Matlab.
I determined that this pair is not independent because and similarly for . However, . Now I am quite unfamiliar with MATLAB. To verify, do I call on many times and tally how many times the values fall within the bounds of each random variable and make a histogram? Or do I make a plot of various values ranging from and show how the two random variables act at each value? Any type of suggestions will help get me started! I've searched forums for examples, but with no luck of understanding. I do have about 5 different pairs of uniform random variables with same setup, some being independent and some not. I must run and verify each pair.
0 comentarios
Respuestas (1)
Jeff Miller
el 21 de Abr. de 2019
The math isn't showing up well in my browser so I don't entirely understand the question. But the general approach would be to generate (X1,X2) pairs and then look at their joint distribution f_j(X1,X2) (e.g., crosstab) and their marginal distributions f_1(X) and f_2(X) (e.g., histogram). The random variables are independent iff the joint probability (density) f_j(X1,X2) = f_1(X1)*f_2(X2).
2 comentarios
Jeff Miller
el 23 de Abr. de 2019
It is difficult to give example code without understanding your random variables better. Can you give an example of code that would generate (say) 1,000 random values of the X1,X2 pairs?
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!