Problem to calculate a marginal function in probability

57 Views Asked by At

I have a problem in probability. I have $f(x, y) = \frac 14 \cos(y) $, if $x$ is between $0$ and $\pi$, and if$ y$ is between $-\frac x2$ and $\frac x2$.

I have to calculate $f(y)$.

I calculated the integral function over x (that I know that it is the procedure) and my result is $ \frac 14 \cos (y) * \pi$

But my teacher says that the results is $\frac 14 (\pi-2|y|)\cos (y) $.

Does anyone can help me to understand why the result is so different?

1

There are 1 best solutions below

1
On

The interval $-\frac{x}2<y<\frac{x}2$ is equivalent to $|y|<\frac{x}2$. Multipliying the inequality by 2 gives $x>2|y|$. Therefore the marginal distribution of y is

$$f_Y(y)=\int_{2 |y|}^{\pi} 1/4\cdot \cos( y) \, dx=1/4\cdot\cos(y)\cdot x \huge|_{\normalsize 2\cdot |y|}^{\normalsize\pi}$$