Random variables

Exercise 4

(1) Assuming that the birth rates of boys and girls are equal, find the value of the random variable $X$ and the probability distribution $f$ for a household with four children. .

(2) One bag contains 4 red balls and 6 white balls. To take out three balls at the same time, find the random variable $X$ and the probability distribution $f$, which represent the number of red balls, and draw the graph. Also, find $P(X = 1), P(1 \leq X \leq 3)$

3. Given $a,b \ (a < b)$ and the function $\displaystyle{f(x) = \left\{\begin{array}{ll}
k & (a < x \leq b) \\
0 & (x \leq a, x > a)
\end{array} \right. }$

(a)
What value is the constant $k$ for $f(x)$ to be a probability density function?
(b)
Find $P(X \leq c)$ for $c$, which is $a\ leq c \leq b$.

4. The probability density is given by

$\displaystyle f(x) = \left\{\begin{array}{cl}
0 , x \leq 0 \\
6x(1 - x) & 0 < x \leq 1 \\
0 & x > 1
\end{array} \right. $

(a)
Find the distribution function $F(x)$
(b)
Find $P(X \leq 0.7)$, $P(0.2 < X \leq 0.8)$.

5. A function is given by

$\displaystyle f(x) = \left\{\begin{array}{cl}
e^{-x} &, x \geq 0 \\
0 &, x \leq 0
\end{array} \right. $

(a)
Show that $f(x)$ gives a probability density function.
(b)
Find $a,b$ so that $P(X \leq a) = 0.1$, $P( X > b) = 0.05$

Answer

1. Let $X$ be the number of boys in a household with 4 children,Then

$\displaystyle P(x = 0) = \binom{4}{0}\left(\frac{1}{2}\right)^4 = \frac{1}{16} $

$\displaystyle P(x = 1) = \binom{4}{1}\left(\frac{1}{2}\right)^4 = \frac{4}{16} $

$\displaystyle P(x = 2) = \binom{4}{2}\left(\frac{1}{2}\right)^4 = \frac{6}{16} $

$\displaystyle P(x = 3) = \binom{4}{3}\left(\frac{1}{2}\right)^4 = \frac{4}{16} $

$\displaystyle P(x = 4) = \binom{4}{4}\left(\frac{1}{2}\right)^4 = \frac{1}{16} $

Thus the probabilty distribution $f$ is given by

$\displaystyle f(i) = P(X = i) = \binom{4}{i}\left(\frac{1}{2}\right)^4$

2. There are ${}_{10}C_{3}=120$ combinations for extracting 3 out of 10. Also, the fact that red is zero out of three means that white is the same as three, so three are taken out from six whites, and the combination is ${}_6C_{3} = 20$. Therefore, if $X$ is the number of red balls,

$\displaystyle P_{r}(x = 0) = \frac{{}_6 C_{3}}{{}_{10} C_{3}} = \frac{6\cdot 5 \cdot 4}{10\cdot 9 \cdot 8} = \frac{1}{6} $

One out of three is red then the other two are white. Thus

$\displaystyle P_{r}(X = 1) = \frac{{}_4 C_{1} \cdot {}_6 C_{2}}{{}_{10} C_{3}} ...
... 6 \cdot 5}{2\cdot 1}\cdot \frac{3\cdot2\cdot1}{10\cdot 9\cdot8} = \frac{1}{2} $

Similarly,,

\begin{displaymath}\begin{array}{\vert c\vert cccc\vert} \hline
X & 0 & 1 & 2 & ...
...frac{1}{2} & \frac{6}{20} & \frac{1}{30} \\ \hline
\end{array} \end{displaymath}

$\displaystyle P_{r}(1 \leq X \leq 3) = 1 - P_{r}(X = 0) = 1 - \frac{1}{6} = \frac{5}{6} $

3.

(a) For $f(x)$ to be a probability density function, we need to show the followings are satisfied.

  1. $f(x) \geq 0 \ (-\infty < x < \infty)$
  2. $\int_{-\infty}^{\infty}f(x) dx = 1$

Then,

1. If the constant $k$ is 0 or more, $f(x)\geq 0$ is satisfied.

2. $\int_{-\infty}^{\infty}f(x)dx = \int{a}^{b}kdx = kx\mid_{a}^{b} = k(b-a)$. Then we set $k = \frac{1}{b-a}$

(b) $P(X \leq c) = F(c) = \int_{-\infty}^{c}f(x)dx$ implies

$\displaystyle P(X \leq c) = \int_{a}^{c}f(x)dx = \int_{a}^{c}\frac{1}{b-a}dx = \frac{c-a}{b-a}$

(4)

(a) Note that the distribution function $F(x)$ is given by

$\displaystyle F(x) = P_{r}(X \leq x) = \int_{-\infty}^{x} f(t) dt $

For $x \leq 0$,

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

For $0 < x < 1$,
$\displaystyle F(x)$ $\displaystyle =$ $\displaystyle \int_{-\infty}^{x} f(t) dt = \int_{-\infty}^{0} 0 dt + \int_{0}^{x} 6t(1-t)dt$  
  $\displaystyle =$ $\displaystyle 0 + \left[3t^2 - 2t^3\right]_{0}^{x} = 3x^2 - 2x^3$  

For $x > 1$,

$\displaystyle F(x) = \int_{-\infty}^{x} f(t) dt = \int_{-\infty}^{0} 0 dt + \int_{0}^{1} 6t(1-t) dt + \int_{1}^{x} 0 dt = 1 $

(b)

$\displaystyle P_{r}(X \leq 0.7)$ $\displaystyle =$ $\displaystyle P_{r}(0 < X \leq 0.7) = F(0.7) - F(0) = \left[F(x)\right]_{0}^{0.7}$  
  $\displaystyle =$ $\displaystyle \left[3x^2 - 2x^3\right]_{0}^{0.7} = 3(0.7)^2 - 2(0.7)^3$  


$\displaystyle P_{r}(0.2 < X \leq 0.8)$ $\displaystyle =$ $\displaystyle \left[F(x)\right]_{0.2}^{0.8} = \left[3x^2 - 2x^3\right]_{0.2}^{0.8}$  
  $\displaystyle =$ $\displaystyle 3(0.8)^2 - 2(0.8)^3 - (3(0.2)^2 - 2(0.2)^3)$  

4.

(a)

We need to show $f(x)\geq 0$ and $\int_{-\infty}^{\infty}f(x) dx = 1$.

1. $f(x) = e^{-x}$ is exponential function. So, for all $x$, $f(x) > 0$.

2.

$\displaystyle \int_{-\infty}^{\infty} f(x) dx$ $\displaystyle =$ $\displaystyle \int_{-\infty}^{0}f(x) dx + \int_{0}^{\infty}f(x) dx$  
  $\displaystyle =$ $\displaystyle \int_{-\infty}^{0} 0 dx + \int_{0}^{\infty} e^{-x} dx$  
  $\displaystyle =$ $\displaystyle \left[0 + -e^{-x} \right]_{0}^{\infty -} = 1$  

(b) We find $a$ which satisfies $P_{r}(X \leq a) = 0.1$.

$\displaystyle P_{r}(X \leq a) = P_{r}(X \leq 0) + P_{r}(0 \leq X \leq a) = \int_{0}^{a}e^{-x}dx = 1 - e^{-a} = 0.1 $

Then $e^{-a} = 0.9$.Therefore, $a = -\log{0.9}$

$\displaystyle P_{r}(X > b) = 1 - P_{r}(X \leq b) = 1 - (1 - e^{-b}) = e^{-b} $

Then $b$ that satisfies $P_{r}(X > b) = 0.05$ is

$\displaystyle b = - \log{0.05} $