I have a simple question about simulation from joint distribution. Suppose $(X,Y)$ has a joint distribution $p(x,y)$, and we know the marginal of $Y$, $p(y)$, and the conditional distribution of $X$ given $Y$, $p(x|y)$. If we want to sample from $p(x,y)$ in any software, say, Matlab or R, is it true that we can just first sample a $y$ from $p(y)$ and then given this $y$ sampled, sample $x$ from conditional distribution $p(x|Y=y)$?
2025-01-13 05:35:08.1736746508
how to simulate from joint distribution by conditioning
1.3k Views Asked by Sean https://math.techqa.club/user/sean/detail At
1
There are 1 best solutions below
Related Questions in STATISTICS
- Finding the value of a constant given a probability density function
- How to find probability after finding the CDF of a max?
- Is the row space of a matrix (order n by m, m < n) of full column rank equal to $\mathbb{R}^m$?
- Rate of growth of expected value of maxima of iid random variables under minimal assumptions
- Lower bound for the cumulative distribution function on the left of the mean
- Hypergeometric Probability
- $\mathbb E[(\frac{X+1}{4}-\theta)^2]=?$
- What value of $\alpha$ makes $\sum_{i=0}^n (x_i-\alpha)^2$ minimum?
- The distribution of fourier coefficients of a Rademacher sequence
- small sample (1 point) MLE estimation
Related Questions in SIMULATION
- Generate a whole random variate uniformly distributed
- Self learning complex systems modeling
- Mistake in generating random numbers - no irrational ones
- Euler-Maruyama simulation of an SDE
- Calculating integral with antithetic variables
- Does elevator passenger's wait time depend on floor (on average)?
- Optimal strategy for unlocking Cho'gall (probability intuition question)
- Looking for good books about simulating stochastic processes.
- Find expected value of time to reach a state in Markov chain, by simulation
- Simulation of Brownian motion and white noise.
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Refuting the Anti-Cantor Cranks
- Find $E[XY|Y+Z=1 ]$
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- What are the Implications of having VΩ as a model for a theory?
- How do we know that the number $1$ is not equal to the number $-1$?
- Defining a Galois Field based on primitive element versus polynomial?
- Is computer science a branch of mathematics?
- Can't find the relationship between two columns of numbers. Please Help
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- A community project: prove (or disprove) that $\sum_{n\geq 1}\frac{\sin(2^n)}{n}$ is convergent
- Alternative way of expressing a quantied statement with "Some"
Popular # Hahtags
real-analysis
calculus
linear-algebra
probability
abstract-algebra
integration
sequences-and-series
combinatorics
general-topology
matrices
functional-analysis
complex-analysis
geometry
group-theory
algebra-precalculus
probability-theory
ordinary-differential-equations
limits
analysis
number-theory
measure-theory
elementary-number-theory
statistics
multivariable-calculus
functions
derivatives
discrete-mathematics
differential-geometry
inequality
trigonometry
Popular Questions
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- How to find mean and median from histogram
- Difference between "≈", "≃", and "≅"
- Easy way of memorizing values of sine, cosine, and tangent
- How to calculate the intersection of two planes?
- What does "∈" mean?
- If you roll a fair six sided die twice, what's the probability that you get the same number both times?
- Probability of getting exactly 2 heads in 3 coins tossed with order not important?
- Fourier transform for dummies
- Limit of $(1+ x/n)^n$ when $n$ tends to infinity
Yes. By the definition of conditional distributions $p(x,y)=p(y)p(x|y)$. The two step procedure you describe first returns $Y=y$ with probability $p(y)$ and then $X=x$ with probability $p(x|y)$, and so it is returning the pair $(x,y)$ with exactly the probability of $p(x,y)$. This will be true independent of the software used.