Thread: Mixing a uniform distribution with a normal distribution

1. Mixing a uniform distribution with a normal distribution

Here is my Problem.

Let X~Uniform(0,2) and Y~Normal(0,1) be independent random variables. Let

Z ={1 if X > Y
{2 if X <Y

Find E[Z] and V ar[Z]. You may leave your answers in terms of de nite integrals.

My big question is, how can we join a uniform and a normal distribution on the same probability density function.

Thank you

2. Re: Mixing a uniform distribution with a normal distribution

Originally Posted by solvj
Here is my Problem.

Let X~Uniform(0,2) and Y~Normal(0,1) be independent random variables. Let

Z ={1 if X > Y
{2 if X <Y

Find E[Z] and V ar[Z]. You may leave your answers in terms of denite integrals.

My big question is, how can we join a uniform and a normal distribution on the same probability density function.

Thank you
If you know $\displaystyle x$ you can find $\displaystyle P(Y<x)$, which is the conditional probability $\displaystyle P(Z=1|X=x)$ that $\displaystyle Z=1$. Then integrate this multiplied by the pdf of $\displaystyle X$ to get the unconditional probability that $\displaystyle Z=1$.

CB

3. Re: Mixing a uniform distribution with a normal distribution

Originally Posted by solvj
Here is my Problem.

Let X~Uniform(0,2) and Y~Normal(0,1) be independent random variables. Let

Z ={1 if X > Y
{2 if X <Y

Find E[Z] and V ar[Z]. You may leave your answers in terms of denite integrals.

My big question is, how can we join a uniform and a normal distribution on the same probability density function.

Thank you
Some cautions have to be taken because X and Y are continuos variables and Z is a discrete variable. The most sure way is to valuate the probability...

$\displaystyle P\{X > Y\}= P\{X > \alpha\}\ P\{Y < \alpha\}$ (1)

The first step...

$\displaystyle P\{X > \alpha\} = 1- \frac{\alpha}{2}\ ,\ 0< \alpha<2 ; 1 , \alpha<0 ; 0 , \alpha > 2$ (2)

$\displaystyle P\{Y < \alpha\} = \frac{1}{2}\ (1+ \text{erf}\ \frac{\alpha}{\sqrt{2}})$ (3)

Now other steps are...

a) use (2) and (3) to obtain (1)...

b) compute the derivative $\displaystyle \pi (\alpha)$ of (1) respect to $\displaystyle \alpha$ ...

c) compute...

$\displaystyle P\{Z=1\} = \int_{-\infty}^{+ \infty} \pi(\alpha)\ d \alpha$ (4)

d) use the result c) to compute $\displaystyle P\{Z=2\}$ , $\displaystyle E \{Z\}$ , $\displaystyle V\{Z\}$...

All these steps are left to You...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

4. Re: Mixing a uniform distribution with a normal distribution

So if I understand quite good, I should get P(x>Y)=P(Z=1|X=x)

I need to find P(X>Y)=P(Z=1)=integral from 0 to 2 (P(Z=1|X=x)*P(X=x)dx)
But what is P(x>Y)??

5. Re: Mixing a uniform distribution with a normal distribution

Thanks to both of you, my problem is solved.