ketikadansecara independen


12

X dan adalah variabel acak yang didistribusikan secara independen di mana dan . Apa distribusi ?YX∼χ(n−1)2Y∼Beta(n2−1,n2−1)Z=(2Y−1)X

Kepadatan sambungan diberikan oleh(X,Y)

fX,Y(x,y)=fX(x)fY(y)=e−x2xn−12−12n−12Γ(n−12)⋅yn2−2(1−y)n2−2B(n2−1,n2−1)1{x>0,0<y<1}

Using the change of variables (X,Y)↦(Z,W) such that Z=(2Y−1)X and W=X,

I get the joint density of (Z,W) as

fZ,W(z,w)=e−w22wn−3(14−z24w2)n2−22n−12Γ(n−12)B(n2−1,n2−1)1{w>0,|z|<w}

Marginal pdf of Z is then fZ(z)=∫|z|∞fZ,W(z,w)dw, which does not lead me anywhere.

Again, while finding the distribution function of Z, an incomplete beta/gamma function shows up:

FZ(z)=Pr(Z≤z)

=Pr((2Y−1)X≤z)=∬(2y−1)x≤zfX,Y(x,y)dxdy

What is an appropriate change of variables here? Is there another way to find the distribution of Z?

I tried using different relations between Chi-Squared, Beta, 'F' and 't' distributions but nothing seems to work. Perhaps I am missing something obvious.


As mentioned by @Francis, this transformation is a generalization of the Box-Müller transform.


4
Looks like a generalization of Box-Muller transformation
— Francis

Jawaban:


10

Here's an algebraic proof. I'm going to instead let X∼χn−1 (not squared) so that we need to find Z:=(2Y−1)X. These are all guaranteed to be valid densities so I'm not going to track normalization constants. We have

fX,Y(x,y)∝xn−2e−x2/2[y(1−y)]n/2−21{0<x,0<y<1}.
Let Z=(2y−1)X and W=X so the inverse transforms are x(z,w)=w and y(z,w)=z+w2w=z2w+12. This gives us |J|=12w. This leads us to
fZ,W(z,w)∝wn−1e−w2/2[z+w2w(1−z+w2w)]n/2−21{0<w,−1<zw<1}
∝we−w2/2(w2−z2)n/2−21{|z|<w}.
Thus
fZ(z)∝∫w>|z|we−w2/2(w2−z2)n/2−2dw.

For convenience let m=n/2−2. Multiply both sides by ez2/2 to get

ez2/2fZ(z)∝∫|z|∞we−(w2−z2)/2(w2−z2)mdw.
Now let 2u=w2−z2 so du=wdw. This gives us
ez2/2fZ(z)∝2m∫0∞ume−udu=2mΓ(m+1).
Because this final integral doesn't depend on z, we have shown that ez2/2fZ(z)∝1, therefore
Z∼N(0,1).

1
+1. I am glad you restored this answer, because it covers all values of n, not just integral ones.
— whuber

@whuber thanks, I somehow put z2−w2 instead of w2−z2 and it took me a while to figure out why I was getting weird behavior when n is odd
— jld

9

2Y−1 is distributed like one coordinate of a uniform distribution on the n−1 sphere; X has the distribution of the sum of squares of n−1 iid standard Normal variates; and these two quantities are independent. Geometrically (2Y−1)X has the distribution of one coordinate: that is, it must have a standard Normal distribution.

(This argument applies to integral n=2,3,4,….)

If you need some numerical convincing (which is always wise, because it can uncover errors in reasoning and calculation), simulate:

Figure showing four histograms for n=2,3,4,5

The agreement between the simulated results and the claimed standard Normal distribution is excellent across this range of values of n.

Experiment further with the R code that produced these plots if you wish.

n.sim <- 1e5
n <- 2:5
X <- data.frame(Z = c(sapply(n, function(n){
  y <- rbeta(n.sim, n/2-1, n/2-1)  # Generate values of Y
  x <- rchisq(n.sim, n-1)          # Generate values of X
  (2*y - 1) * sqrt(x)              # Return the values of Z
})), n=factor(rep(n, each=n.sim)))

library(ggplot2)
#--Create points along the graph of a standard Normal density
i <- seq(min(z), max(z), length.out=501)
U <- data.frame(X=i, Z=dnorm(i))

#--Plot histograms on top of the density graphs
ggplot(X, aes(Z, ..density..)) + 
  geom_path(aes(X,Z), data=U, size=1) +
  geom_histogram(aes(fill=n), bins=50, alpha=0.5) + 
  facet_wrap(~ n) + 
  ggtitle("Histograms of Simulated Values of Z",
          paste0("Sample size ", n.sim))

1
Thank you, @Stubborn. It does matter that the parameters are consistent, for otherwise the conclusion is incorrect. I'll fix it.
— whuber

3

As user @Chaconne has already done, I was able to provide an algebraic proof with this particular transformation. I have not skipped any details.


(We already have n>2 for the density of Y to be valid).

Let us consider the transformation (X,Y)↦(U,V) such that U=(2Y−1)X and V=X.

This implies x=v and y=12(uv+1).

Now, x>0⟹v>0 and 0<y<1⟹−v<u<v,

so that the bivariate support of (U,V) is simply S={(u,v):0<u2<v<∞,u∈R}.

Absolute value of the Jacobian of transformation is |J|=12v.

Joint density of (U,V) is thus

fU,V(u,v)=e−v2vn−12−1(uv+1)n2−2(12−u2v)n2−2Γ(n−2)(2v)2n−12+n2−2Γ(n−12)(Γ(n2−1))21S

=e−v2vn−42(v+u)n2−2(v−u)n2−2Γ(n−2)22n−32+n2−2(v)n−4Γ(n−12)(Γ(n−22))21S

Now, using Legendre's duplication formula,

Γ(n−2)=2n−3πΓ(n−22)Γ(n−22+12)=2n−3πΓ(n−22)Γ(n−12) where n>2.

So for n>2,

fU,V(u,v)=2n−3e−v2(v−u2)n2−2π23n−72Γ(n2−1)1S

Marginal pdf of U is then given by

fU(u)=12n−12πΓ(n2−1)∫u2∞e−v2(v−u2)n2−2dv

=e−u222n−12πΓ(n2−1)∫0∞e−t2t(n2−1−1)dt

=12n−12π(12)n2−1e−u22

=12πe−u2/2,u∈R

2

This is more of a black box answer (i.e., the algebraic details are missing) using Mathematica. In short as @whuber states the answer is that the distribution of Z is a standard normal distribution.

(* Transformation *)
f = {(2 y - 1) Sqrt[x], Sqrt[x]};
sol = Solve[{z == (2 y - 1) Sqrt[x], w == Sqrt[x]}, {x, y}][[1]]
(*{x -> w^2,y -> (w+z)/(2 w)} *)
(* Jacobian *)
J = D[f, {{x, y}}]

(* Joint pdf of Z and W *)
{jointpdf, conditions} = FullSimplify[PDF[BetaDistribution[n/2 - 1, n/2 - 1], y] 
  PDF[ChiSquareDistribution[n - 1], x] Abs[Det[J]] /. sol,
  Assumptions -> {w >= 0, 0 <= y <= 1}][[1, 1]]

(* Integrate over W *)
Integrate[jointpdf Boole[conditions], {w, 0, \[Infinity]}, Assumptions -> {n > 2, z == 0}]
(* 1/Sqrt[2 \[Pi]] *)

Integrate[jointpdf Boole[conditions], {w, 0, \[Infinity]}, Assumptions -> {n > 2, z > 0}]
(* Exp[-(z^2/2)]/Sqrt[2 \[Pi]] *)

Integrate[jointpdf Boole[conditions], {w, 0, \[Infinity]}, Assumptions -> {n > 2, z < 0}]
(* Exp[-(z^2/2)]/Sqrt[2 \[Pi]] *)

1

Not an answer per se, but it may be worthwhile to point out the connection to Box-Muller transformation.

Consider the Box-Muller transformation Z=−2ln⁡Usin⁡(2πV), where U,V∼U(0,1). We can show that −ln⁡U∼Exp⁡(1), i.e. −2ln⁡U∼χ22. On the other hand, we can show that sin⁡(2πV) has the location-scale arcsine distribution, which agrees with the distribution of 2B⁡(1/2,1/2)−1. This means Box-Muller transformation is a special case of (2Y−1)X when n=3.

Related:

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.