Density and distribution functions exercise [closed]

Exercise :

Let $X$ be a random variable and $f(x)$ the function :

$$f(x) = \begin{cases} c, -4<x<0 \\ 0.25, 2 < x < 4 & \\ 0, \text{anywhere else} \end{cases}$$

(a) Find such $c$, so that the function $f(x)$ is a density probability function of $X$.

(b) Find the distribution function of the random variable $X$.

(c) Let a random sample $X_1, \dots, X_{100}$ be under the same distribution. Find the probability of their Sample Mean to be no greater than $1$.

Solution-Attempt :

(a) For $f(x)$ to be a density probability function, it has to be :

$$\int_{-4}^{0}c dx =1 \Leftrightarrow \big[cx\big]_{-4}^0 = 1 \Leftrightarrow 4c = 1 \Leftrightarrow c = \frac{1}{4}= 0.25$$

So we have :

$$f(x) = \begin{cases} 0.25, -4<x<0 \\ 0.25, 2 < x < 4 & \\ 0, \text{anywhere else} \end{cases}$$

(b) Suppose that $X$ is a real-valued random variable. The (cumulative) distribution function of $X$ is the function $F$ given by :

$$F(x) = P(X \le x), \quad x \in \mathbb R$$

Although I know this is the definition of the distribution function, I cannot seem how to produce it in this particular example, so I would really appreciatea thorough explanation.

I also know you can calculate the distribution function of a continuous random variable $X$ by :

$$F(x)=\int_{-\infty}^x f(t)dt$$

for $- \infty < x <\infty$.

(c) Cannot grasp on how to proceed for solving this one at all, so please elaborate thoroughly if possible.

Any help will be really, really appreciated. I missed most of the semester due to illness so I am doing my best to get my self ready for an upcoming exam and I'm trying to get all the help and knowledge possible.

closed as off-topic by NCh, Did, callculus, Claude Leibovici, user223391 Jun 7 '17 at 23:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – NCh, Did, callculus, Claude Leibovici, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

• For (a), the entire area under the distribution should be 1, and you are ignoring the part between 2 and 4. – Paul Jun 5 '17 at 15:00
• By "Same Mean" I think your problem is saying "sample mean." If not it is probably a misprint in the problem, because question c is meaningless as it stands. – Mark Fischler Jun 5 '17 at 15:08
• @Paul Yep, understood, thanks for the correction. – Rebellos Jun 5 '17 at 15:15
• @MarkFischler Yes, I do mean "Sample Mean", it was a misprint. I would really appreciate a thorough solution at (b) and (c) . – Rebellos Jun 5 '17 at 15:16
• @CharalamposFilippatos Were you able to calculate the correct value of the constant c ? – callculus Jun 5 '17 at 15:21

For part (a), as pointed out in a comment, you need the integral of the whole distribution to be $1$. $$\int_{-\infty}^\infty f(x)\, dx = \int_{-\infty}^{-4} f(x)\, dx + \int_{-4}^0 f(x)\, dx + \int_{0}^2 f(x)\, dx + \int_{2}^4 f(x)\, dx + \int_{4}^\infty f(x)\, dx = \\ 0+\int_{-4}^0 c\, dx +0+\int_{2}^4 \frac14\, dx+0= 4c+\frac12\\ 4c+\frac12 = 1 \implies c=\frac18$$ For part (b), the easy way is indeed to use $F(x) = \int_{-\infty}^x f(x) \, dx$ but you can do it in pieces; in places where $f(x)=0$, the CDF does not grow. Thus

• $x<-4 \implies F(x) = 0$.
• $-4 \leq x < 0 \implies F(x) = c (x-(-4)) = \frac{x}8+\frac12$.
• $0 \leq x < 0 \implies F(x) = F(0) = \frac12$.
• $2 \leq x < 4 \implies F(x) = \frac12 + \frac14 (x-2) = \frac{x}4$.
• $x>4 \implies F(x) = F(4) = 1$.

For part (c), the sample mean $\hat{x}$ will be (by definition of mean) $$\hat{x} = \frac1{100} \left( x_1+x_2+\cdots+x_{99}+x_{100}\right)$$ so we want to find $P(\left( x_1+x_2+\cdots+x_{99}+x_{100}\right) \leq 100\times 1 = 100.$

Now let's say $x_1+x_2+\cdots+x_{99}= y$; then we would need to have $x_{100} \leq 100-y$. But we know that is just $F(100-y)$ because that's exactly what the CDF tells you.

But what is $y$? Well, a given value of $y$ could come about by quite a few possible combinations of the $x_n$, but whatever combination you have, it must be the case that $x_{99} = y-( x_1+x_2+\cdots+x_{98})$. And so on down the line. In each case, we integrate probabilities using the pdf.

So the probability wanted is $$P\left( \sum_{n=1}^{100} x_n \leq 100 \right) = \\ \int_{x_1 = -\infty}^{\infty} f(x_1) \int_{x_2 = -\infty}^{\infty} f(x_2) \cdots \int_{x_{99} = -\infty}^{\infty} f(x_{99}) F\left(100- \sum_{n=1}^{99} x_n\right) \, dx_{99} \,dx_{98} \cdots dx_1$$ You can see how this is done by doing the integral over $dx_{99}$ first; that gives you a function of the first $98$ $x_n$s, and next you do the integral $dx_{98}$ and so forth. You will see a pattern soon enough.

• Is there a (relevant) typo at the third bullet ? – callculus Jun 5 '17 at 16:02
• "You will see a pattern soon enough" Sorry but I do not get the argument at all. Are you saying that all the intermediate integrals and the complete one can be computed explicitely? I doubt that. – Did Jun 6 '17 at 14:10