I have an n-dimensional multivariate distribution:  $$ Y| \mu \sim N(\mu, A) $$  and a prior of:  $$ \mu \sim N(\mu_0, B) $$  I would like to show that the marginal distribution of $Y$ is:  $$ Y \sim N(\mu_0, A+B) $$  My approach is to recognize:  $$ p(Y) = \int_{-\infty}^{\infty} p(Y|\mu) p(\mu) d\mu $$  This ultimately yields:  $$ p(Y) = \int_{-\infty}^{\infty} 2^{-\frac{k}{2}}|A|^{-\frac{1}{2}} e^{-\frac{1}{2}(y-\mu)^{T}A^{-1}(y-\mu)} 2^{-\frac{k}{2}}|B|^{-\frac{1}{2}} e^{-\frac{1}{2}(\mu-\mu_0)^{T}B^{-1}(\mu-\mu_0)} d\mu $$  To solve this is a mess and I am stuck here. Is there a simpler way to find the marginal? Thanks.
46319
I have been trying to derive the posterior distribution in the case of weighted Bayesian regression in the case of multivariate normal distribution for a few days and have been stuck. I am not sure if this is due to lack of my linear algebra skills or if I have done something really wrong.  In my case, the distributional assumptions are:  $$ y = N (B x, W^{-1} \nabla) $$  The parameters $B$ have a normal prior.   $$ P(B) = N (B_0, \Sigma_{B}) $$  The conditional posterior distribution for $B$ is proportional to $P(y|B) P(B)$. This is proportional to:  $$ \exp \big((B - B_0)^T \Sigma (B - B_0) + (y - Bx)^T \nabla (y - Bx)\big) $$  I have seen the textbooks mention something called completing the square which as far as I can tell equates to matching like terms. Even though I could work out for scalar variance terms, I am having trouble figuring out how to deal with the precision matrices and how this can be decoupled.   [EDIT]:  So, I tried to make a run with Glen_b's suggestion and came this far:  Original expression without the exponential (I will simplify notation slightly):  $$ (B - B_0)^T \Sigma (B - B_0) + ( y - Bx)^T \nabla (y - Bx) $$ Expanding:  $$ B^T\Sigma B - 2 B_0^T \Sigma B + B_0^T \Sigma B_0 + y^T \nabla y - 2 y^T \nabla B x + (Bx)^T \nabla Bx $$  $$ = B^T(\Sigma + x^T \nabla x)B - 2 (B_0^T \Sigma B + y^T \nabla B x) + C $$  So I am not sure how to make further progress with the second term. I guess I have to make it in the form 2(some_term)B but not sure how that can be done.
84330
Suppose that I have two univariate marginal distributions, say $F$ and $G$, which I can simulate from. Now, construct their joint distribution using a , denoted $C(F,G;\Sigma)$. All the parameters are known.  Is there a non-MCMC method for simulating from this copula?
102954
Let $X$ ~ $U(0,2)$ and $Y$ ~ $U(-10,10)$ be two independent random variables with the given distributions. What is the distribution of $V=XY$?   I have tried convolution, knowing that   $$h(v) = \int_{y=-\infty}^{y=+\infty}\frac{1}{y}f_Y(y) f_X\left (\frac{v}{y} \right ) dy$$  We also know that $f_Y(y) = \frac{1}{20}$,    $$h(v)= \frac{1}{20} \int_{y=-10}^{y=10} \frac{1}{y}\cdot \frac{1}{2}dy$$ $$h(v)=\frac{1}{40}\int_{y=-10}^{y=10} \frac{1}{y}dy$$  Something tells me, there is something weird here since it is discontinuous at 0. Please help.
102047
Let $\mathbf{X} \sim \mathcal{N}_n( \mathbf{m}, \mathbf{C})$ be an $n$-dimensional gaussian vector, where $\mathbf{C} \in \mathbb{R}^{n \times n}$ is not diagonal, but it is positive-definitive, $\mathbf{C} \succ 0$, and $\mathbf{m} \neq \mathbf{0}$. Let $$ Y = \| \mathbf{X} \|^2 $$ where $\| \cdot \|$ denotes the $L_2$-norm (Euclidean norm), should follow a . Unfortunately, the Wikipedia page contains little information.  My question is: What is the PDF (probability density function) of $Y$ ?
19246
The Multivariate Gaussian pdf is given by  $$(2\pi)^{-\frac{K}{2}} \det(\Sigma)^{-\frac{1}{2}} \exp({-\frac{1}{2}}(X-\mu)' \Sigma^{-1} (X-\mu)) $$  The wikipedia for multivariate Gaussians is    However I could not find a pdf for the multivariate lognormal distribution. Does it exist? If so, what is it?
10448
Given a $n$-dimensional multivariate normal distribution $X=(x_i) \sim \mathcal{N}(\mu, \Sigma)$ with mean $\mu$ and covariance matrix $\Sigma$, what is the probability that $\forall j\in {1,\ldots,n}:x_1 \geq x_j$?
20786
For a random variable $X \in \mathcal{R}^n$ from a uniform distribution, are the components independent? i.e,  $Pr(X_1,X_2,...,X_n) = Pr(X_1)Pr(X_2)....Pr(X_n)$   If so, does it depend on the uniform distribution? e.g if the uniform distribution is a p-dimensional hypercube.
59871
I've been given a problem where I have  $$ X \sim \mathcal{N}(\mu = 2, \sigma^2 = 9) $$  $$ Y \sim \mathcal{N}(\mu = 3, \sigma^2 = 4) $$  Their correlation is $ \rho_{XY} = 0.6 $. First I am asked for the mean and standard distribution of X+Y, which I found as  $$ \mu_{X+Y} = \mu_X + \mu_Y = 2 + 3 = 5 $$  $$ \sigma_{X+Y} = \sqrt{\sigma_{X}^2 + \sigma_{Y}^2 + 2 \rho_{XY} \sigma_x \sigma_y} $$  However, I am also asked what the distribution of $ X + Y $ is, what if $X$ and $Y$ are jointly normally distributed, and what if $X$ and $Y$ are not jointly normally distributed. I am unsure how I would go about determining what the distribution of $X + Y$ is, though I assume that    If $X$ and $Y$ are jointly normally distributed then $X + Y$ is normally distributed If $X$ and $Y$ are not jointly normally distributed then $X + Y$ is not normally distributed   How do I determine what the distribution of $X + Y$ is when I am not told whether they are jointly distributed?    Related  I read the following post, but wasn't sure how to apply what was said to my current problem, if I could at all.
99773
Let $X_1, X_2,\ldots $ be independent, Cauchy $C(0,1)-$distributed random variables. Determine the limit distribution of   $$Y_n=\frac 1 {n} \cdot \max{(X_1,X_2,\dots,X_n)}$$   as $n \rightarrow \infty$.    Remark. It may be helpful to know that    $\arctan x + \arctan \frac 1 {x} = \frac \pi 2$ and that  $\arctan y = y - \frac {y^3} 3 + \frac {y^5} 5 - \frac {y^7} 7 + \dots$   I not sure how to attack this question, nor how I should handle the $\max{(X_1,X_2,\ldots,X_n)}$ in order to find the limit distribution. Any advice appreciated.
43549
We have a multivariate normal vector ${\boldsymbol Y} \sim \mathcal{N}(\boldsymbol\mu, \Sigma)$. Consider partitioning $\boldsymbol\mu$ and ${\boldsymbol Y}$ into  $$\boldsymbol\mu = \begin{bmatrix}  \boldsymbol\mu_1 \\  \boldsymbol\mu_2 \end{bmatrix} $$ $${\boldsymbol Y}=\begin{bmatrix}{\boldsymbol y}_1 \\  {\boldsymbol y}_2 \end{bmatrix}$$  with a similar partition of $\Sigma$ into $$  \begin{bmatrix} \Sigma_{11} &amp; \Sigma_{12}\\ \Sigma_{21} &amp; \Sigma_{22} \end{bmatrix} $$ Then, $({\boldsymbol y}_1|{\boldsymbol y}_2={\boldsymbol a})$, the conditional distribution of the first partition given the second, is  $\mathcal{N}(\overline{\boldsymbol\mu},\overline{\Sigma})$, with mean $$ \overline{\boldsymbol\mu}=\boldsymbol\mu_1+\Sigma_{12}{\Sigma_{22}}^{-1}({\boldsymbol a}-\boldsymbol\mu_2) $$ and covariance matrix $$ \overline{\Sigma}=\Sigma_{11}-\Sigma_{12}{\Sigma_{22}}^{-1}\Sigma_{21}$$  Actually these results are provided in Wikipedia too, but I have no idea how the $\overline{\boldsymbol\mu}$ and $\overline{\Sigma}$ is derived. These results are crucial, since they are important statistical formula for deriving Kalman filters. Would anyone provide me a derivation steps of deriving $\overline{\boldsymbol\mu}$ and $\overline{\Sigma}$ ? Thank you very much!
41436
Suppose that $(U,V)$ has the following joint pdf: $$f_{U,V}(u,v)=\exp(-\theta u-\theta^{-1}v)$$ , where $u\geq0$, $v\geq0$, $\theta&gt;0$. Define $X=UV$ and $Y=U/V$. Find the marginal pdf of $X$ and $Y$.  With transformation, I got $U=\sqrt{XY}$ and $V=\sqrt{X/Y}$ and the absolute value of Jacob is $1/2Y$. Then, the joint pdf of $(X,Y)$ is  $$f_{X,Y}(x,y)=\exp(-\theta \sqrt{XY}-\theta^{-1}\sqrt{X/Y})1/2Y, X,Y&gt;0.$$  But I am not sure how to get the marginal pdf?  Thank you!
67399
If $X$ is distributed $\mathcal{N}\sim(\mu,1)$ then what is the distribution of $X^2$? My try: \begin{align*}     P(X^2&lt;x)\\      P(-\sqrt{x}&lt;X&lt;\sqrt{x})\\     \int_{-\sqrt{x}}^{\sqrt{x}} f(x) \,dx  \end{align*} Then: \begin{align*}     f_{X^{2}}(x)=\frac{d}{dx}\int_{\sqrt{-x}}^{\sqrt{x}} f(x) \,dx\\     =f_X(\sqrt{x})\frac{1}{2\sqrt{x}}+f_X(-\sqrt{x})\frac{1}{2\sqrt{x}}\\     =\frac{1}{\sqrt{2\pi x}} e^{\frac{-(\sqrt{x}-\mu)^2}{2}} \end{align*} How should I continue?
116851
If I observe the following:  $X \sim N(\mu_x,\sigma^2_x)$  $Y|X=x \sim N(x,\sigma^2_y)$  My objective is to calculate the marginal distribution of $Y$.  (Since the variance term does not address some form of correlation $\rho$, the dependence between both random variables clearly needs to be addressed w.r.t. to the expected value of $Y$)  By the usual formulas we will get $f(y)$ by:  $f(y) = \int_{-\infty}^\infty f(x,y)dx$  where $f(x,y) = f(y|X=x) f(x) = \frac{1}{\sqrt{2\pi\sigma_x^2}}\frac{1}{\sqrt{2\pi\sigma_y^2}}exp\{-\frac{1}{2}[(\frac{y-x}{\sigma_y})^2 + (\frac{x-\mu_x}{\sigma_x})^2 ]\}$  I know the usual bivariate case and this looks like that case, where the correlation $\rho$ is zero and solving would be easy. But here in both terms the $x$ factor needs to be addressed and I'm not quite sure how to solve for $x$.
118110
$X,Y\sim U(0,1)$  are independent, $W=\max (X,Y)$.      How do I find the PDF of $W$? How do I find the expectation of $W$ at two ways: 1. with the PDF of $W$ and without the PDF of $W$.   I ask this Q before few days, but now I want show you me solution and ask if it's right (and ask to tell me where I wrong):  We assume that $0&lt;t&lt;1$ becuase otherwise the function $(f)$ returns 0. 1. Lets say: $W=\max(X,Y)\Rightarrow W(t)=P(t&gt;X)\cdot P(t&gt;Y)=(1-P(t&lt;X))(1-P(t&lt;Y))$ because they are independent. We know that $P(t&lt;X)=F_X(t)=t$ (Because $X\sim U(0,1)$), and this is why: $F_W(t)=(1-t)^2$ (if $0&lt;t&lt;1$ otherwise is $0$). So $f_W(t)=F'_W(t)=2t-2$.  2: a. $$E(W(t))=\int _{0}^1 t\cdot f_W dt=\int_0^12t^2-2tdt=\left[\frac{2t^3}{3}-\frac{2t^2}2\right]^1 _0$$ I dot here something negative and I don't know why... Please tell me where my mistake here....  b. Here I'll show you the idea, and I'd like to know if I'm right...  $$\iint_{D_1}\max(X,Y)dxdy+\iint_{D_2}\max(X,Y)dxdy \\= \iint_{D_1}xdxdy+\iint_{D_2}ydxdy$$  I'm right? If I'm wrong please tell me where are my mistakes (at all the question). Thank you!
70859
We have a multivariate normal vector $\mathbf{X} \sim \mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma})$, where $\mathbf{X} =  \left[ \begin{matrix} X_1 \\ X_2 \\ \dot\\\\ \dot\\\\ X_n \end{matrix} \right]$,    $\boldsymbol{\mu} =  \left[ \begin{matrix} \mu_1 \\ \mu_2 \\ \dot\\\\ \dot\\\\ \mu_n \end{matrix} \right]$, and  $\boldsymbol{\Sigma} =  \begin{bmatrix} \sigma_1^2 &amp; \sigma_1\sigma_2 &amp; \dots &amp; \sigma_1\sigma_n   \\ \sigma_2\sigma_1 &amp; \sigma_2^2 &amp; \dots &amp; \sigma_2\sigma_n  \\ \dot\\\\ \dot\\\\ \sigma_n\sigma_1 &amp; \sigma_n\sigma_2  &amp; \dots &amp; \sigma_n^2 \end{bmatrix} $ is the covariance matrix.  Y is a random scalar of the form $Y = \beta_0 + \boldsymbol{\beta^TX} + \epsilon$, where $\epsilon \sim \mathcal{N}(0, \sigma_\epsilon^2)$  How can we go about deriving the joint probability density function(pdf) of the random vector $(Y, \boldsymbol{X^T})$?  The marginal multivariate pdf of $\boldsymbol{X}$ is given by  $ pdf(\boldsymbol{x}) = \frac{1}{\sqrt{(2\pi})^n. \begin{vmatrix} \boldsymbol{\Sigma} \end{vmatrix}}.exp\left[ \frac{-1}{2}\boldsymbol{(x-\mu)}^T \boldsymbol{\Sigma^{-1}}\boldsymbol{(x-\mu)} \right]$  The conditional probability density function of $Y \,\mid \, \boldsymbol{X=x}$ is given by  $pdf(y\mid \boldsymbol{X=x}) = \frac{1}{2\pi\sigma_\epsilon}.exp\left[  \frac{-1}{2\sigma_\epsilon^2}(y - \beta_0 - \boldsymbol{\beta^Tx})^2  \right]   $  To compute the joint probability density function, we can use the fact that   $pdf(y, \boldsymbol{x})=  pdf(y\mid \boldsymbol{X=x}).pdf(\boldsymbol{x})$  I am unable to do the witty manipulation required in the algebra to arrive at the result the joint distribution will have a probability density function of a normal distribution. All questions previously asked seem to address the problem of deriving the conditional density function given the joint probability density function, for example,   Edit:  Multiplying the pdfs, we get $pdf(y, \boldsymbol{x}) = \frac{1}{\sqrt{(2\pi})^n. \begin{vmatrix} \boldsymbol{\Sigma} \end{vmatrix}}. \frac{1}{2\pi\sigma_\epsilon}.exp\left[ \frac{-1}{2}\boldsymbol{(x-\mu)}^T \boldsymbol{\Sigma^{-1}}\boldsymbol{(x-\mu)} + \frac{-1}{2\sigma_\epsilon^2}(y - \beta_0 - \boldsymbol{\beta^Tx})^2 \right]$   Like the comment below mentions, most manipulations dealing with normal pdfs involve completing squares; but since this specific algebraic expression contains $\boldsymbol{x}$ in both terms within the exp term, I'm unsure on how to go about completing the squares.
117790
Let $X$ be a binomial random variable with parameters $n$ and $p$. Next, let: $$ Y = aX + b $$ I know that: $$ \mathbb{E}[Y] = \mathbb{E}[aX+b] = a\mathbb{E}[X] + b = anp + b \\ \text{Var}(Y) = \text{Var}(aX+b) = a^2 \text{Var}(X) = a^2np(1-p) $$ But how is $Y$ distributed?
116875
let $Z \sim N(0,1)$ and $W \sim \chi^2(s)$.  If $Z$ and $W$ are independently distributed then the variable $Y = \frac{Z}{\sqrt{W/s}}$ follows a $t$ distribution with degrees of freedom $s$.  I am looking for a proof of this fact, a reference is good enough if you do not want to write down the complete argument.