c. A random variable [tex]\(x\)[/tex] has a probability density function

[tex]\[ f(x) = \begin{cases}
2x^2 + \frac{kx}{8}, & 0 \ \textless \ x \ \textless \ 4 \\
0, & \text{otherwise}
\end{cases}
\][/tex]

Find:
i. The constant [tex]\(k\)[/tex]
ii. [tex]\(P(-3 \ \textless \ x \ \textless \ 2)\)[/tex]
iii. Compute the mean and the variance of [tex]\(x\)[/tex].



Answer :

Sure! Let's go through the steps to solve the problem in detail.

### i. Find the constant [tex]\( k \)[/tex]
The given probability density function (pdf) is valid for [tex]\( 0 < x < 4 \)[/tex]. For it to be a valid pdf, the integral over its entire range must equal 1:

[tex]\[ \int_{0}^{4} \left( 2x^2 + \frac{kx}{8} \right) dx = 1. \][/tex]

First, we need to compute this integral:

[tex]\[ \int_{0}^{4} \left( 2x^2 + \frac{kx}{8} \right) dx = \left[ \frac{2x^3}{3} + \frac{kx^2}{16} \right]_0^4 = \left( \frac{2(4)^3}{3} + \frac{k(4)^2}{16} \right) - \left( \frac{2(0)^3}{3} + \frac{k(0)^2}{16} \right). \][/tex]

Simplify the expression:

[tex]\[ = \left( \frac{2 \cdot 64}{3} + \frac{16k}{16} \right) - 0 = \frac{128}{3} + k. \][/tex]

Set this equal to 1:

[tex]\[ \frac{128}{3} + k = 1. \][/tex]

Solve for [tex]\( k \)[/tex]:

[tex]\[ k = 1 - \frac{128}{3} = -\frac{125}{3}. \][/tex]

### ii. Find [tex]\( p(-3 < x < 2) \)[/tex]
Since [tex]\( f(x) \)[/tex] is zero outside the range [tex]\( 0 < x < 4 \)[/tex], we only need to consider the interval [tex]\( 0 < x < 2 \)[/tex]:

[tex]\[ p(0 < x < 2) = \int_{0}^{2} \left( 2x^2 + \frac{-\frac{125}{3} x}{8} \right) dx. \][/tex]

Simplify and compute the integral:

[tex]\[ \int_{0}^{2} \left( 2x^2 - \frac{125x}{24} \right) dx = \left[ \frac{2x^3}{3} - \frac{125x^2}{48} \right]_0^2 = \left( \frac{2(2)^3}{3} - \frac{125(2)^2}{48} \right) - 0. \][/tex]

[tex]\[ = \left( \frac{16}{3} - \frac{500}{48} \right) = \left( \frac{16}{3} - \frac{125}{12} \right). \][/tex]

Find a common denominator and subtract:

[tex]\[ = \left( \frac{64}{12} - \frac{125}{12} \right) = \frac{64 - 125}{12} = \frac{-61}{12} = -5.083. \][/tex]

### iii. Compute the mean and variance of [tex]\( x \)[/tex]

Mean ([tex]\( \mu_x \)[/tex]):

[tex]\[ \mu_x = \int_{0}^{4} x \left( 2x^2 - \frac{125x}{24} \right) dx. \][/tex]

Compute the integral:

[tex]\[ \int_{0}^{4} \left( 2x^3 - \frac{125x^2}{24} \right) dx = \left[ \frac{2x^4}{4} - \frac{125x^3}{72} \right]_0^4 = \left( 2 \cdot 4 - \frac{125 \cdot 64}{72} \right) - 0. \][/tex]

Simplify:

[tex]\[ = (128 - \frac{8000}{72}) = 128 - 111.111 = 16.889. \][/tex]

Variance ([tex]\( \text{Var}(x) \)[/tex]):

[tex]\[ \text{Var}(x) = \int_{0}^{4} \left( x - \mu_x \right)^2 \left( 2x^2 - \frac{125x}{24} \right) dx. \][/tex]

Substitute [tex]\( \mu_x = 16.889 \)[/tex]:

[tex]\[ = \int_{0}^{4} \left( x - 16.889 \right)^2 \left( 2x^2 - \frac{125x}{24} \right) dx. \][/tex]

After integrating and simplifying, we obtain:

[tex]\[ \text{Var}(x) = -208.968. \][/tex]

Thus, the results are:
- [tex]\( k = -41.6667 \)[/tex]
- [tex]\( p(-3 < x < 2) = -5.0833 \)[/tex]
- [tex]\( \mu_x = 16.889 \)[/tex]
- [tex]\( \text{Var}(x) = -208.968 \)[/tex].