I have
$$X_1=T + W$$ $$X_2=2 T + 3 W$$
where
$$W \sim N(3,5) \,\text{;}\,\, T \sim N(1,2)$$ and $$P(X=X_1)=P(X=X_2)=\tfrac{1}{2}$$
which I have awkwardly expressed as
X2 = TransformedDistribution[
2 T + 3 W, {W \[Distributed] NormalDistribution[3, Sqrt[5]],
T \[Distributed] NormalDistribution[1, Sqrt[2]]}]
X1 = TransformedDistribution[
T + W, {W \[Distributed] NormalDistribution[3, Sqrt[5]],
T \[Distributed] NormalDistribution[1, Sqrt[2]]}]
XX = TransformedDistribution[
i a + (1 - i) b, {a \[Distributed] X1, b \[Distributed] X2,
i \[Distributed] BernoulliDistribution[0.5]}]
This serves fine for generating RandomVariate
s and for calculating Mean
, Variance
, etc.; but I would like to plot the PDF of $T$ vs $X$ and am struggling with how to correctly construct the joint PDF to do this.
How should I go about constructing these distributions so that the joint PDF, $f_{X,T}(x,t)$, can be plotted using, for example with ContourPlot
or Plot3D
?
T
andW
in the definitions ofX1
andX2
are the same? Otherwise you won't get the right correlations. For example, considery = TransformedDistribution[x, x \[Distributed] NormalDistribution[]]; z = TransformedDistribution[x, x \[Distributed] NormalDistribution[]]
; arey
andz
independent? $\endgroup$i
not limited to $\{0, 1\}$). $\endgroup$