Distribution of a random sample and uniform distribution

42 Views Asked by At

Here's the problem:

"Consider a random sample $X_1, ... , X_n$ from the distribution given by $\ p\ U[0,a]+(1-p)\ U[0,b]$, i.e $X_i$ follows the uniform distribution on $[0,a]$ with probability $p$ and the uniform distribution on $[0,b]$ with probability $1-p$. Find the distribution and density of $X_1$. Suppose that $0<a<b$ with $a$ and $b$ fixed and known"

Here's my attempt. By simply using the law of total probability, I got the following: $$P(X_1 < x) = p\ \frac{x}{a} \cdot I(0\leq x \leq a) \ + \ (1-p)\ \frac{x}{a} I(0 \leq x \leq b) \ + \ 1\cdot I(x>b) $$Finding the density would now just be a matter of differentiation...

Now, the teacher has a different answer. Here's what he has:$$F_{X_1}(x) = \begin{cases} 0 & x < 0 \\ p\frac{x}{a}+ (1-p)\frac{x}{b}& 0\leq x\leq a \\ p+(1-p)\frac{x}{b} & a\leq x \leq b \\ 1 & x>b \end{cases} $$ My answer matches my teacher's, except for the case when $a \leq x \leq b$, where I don't understand why he has $\ p \ +\ (1-p)\frac{x}{b}$ and not simply $(1-p)\frac{x}{b}$.

1

There are 1 best solutions below

2
On BEST ANSWER

In general:$$P(X_1\leq x)=$$$$P(X_1\leq x|X_1\sim\mathsf{Unif}[0,a])P(X_1\sim\mathsf{Unif}[0,a])+P(X_1\leq x|X_1\sim\mathsf{Unif}[0,b])P(X_1\sim\mathsf{Unif}[0,b])$$

If $a\leq x\leq b$ then this equals:$$1\cdot p+\frac{x}{b}(1-p)$$

Note that $P(X_1\leq x)=1$ if $x\geq a$ and $X_1$ has uniform distribution over $[0,a]$.