Answers:
- mean: 2.667
- variance: 0.889
Explanation:To get the mean and variance of x, we need to verify
first whether...
- x is discrete or continuous random variable
- f is probability mass or probability density function
because if we cannot verify the 2 statements above, we can't compute the mean and the variance.
Since 0 < x < 4,
x is a continuous random variable because x can be any positive number less than, which includes a non-integer.
Note that if the random variable is continuous and

for any values of x in the domain of f, then f is a probability density function (PDF).
Note that

Hence, for any x in the domain of f, 0 < f(x) < 1. Moreover, since x is a continuous random variable, thus
f is a PDF.
First, we use the following notations for mean and variance:
E[x] = mean of x
Var[x] = variance of x
Since f is a probability density function, we can use the following formulas for the mean and the variance of x:
![\boxed{\text{mean of }x = E[x] = \int_{-\infty}^{\infty}{xf(x)}dx}](https://tex.z-dn.net/?f=%5Cboxed%7B%5Ctext%7Bmean%20of%20%7Dx%20%3D%20E%5Bx%5D%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%7Bxf%28x%29%7Ddx%7D)
![\boxed{\text{Variance of }x = \text{Var}[x] = E[x^2] - (E[x])^2}}](https://tex.z-dn.net/?f=%5Cboxed%7B%5Ctext%7BVariance%20of%20%7Dx%20%3D%20%5Ctext%7BVar%7D%5Bx%5D%20%3D%20E%5Bx%5E2%5D%20-%20%28E%5Bx%5D%29%5E2%7D%7D%20)
To compute for the mean of x,
![\text{mean of }x = E[x] \\ = \int_{-\infty}^{\infty}{xf(x)}dx} \\ = \int_{-\infty}^{\infty}{x(0.125x)}dx} \\ \boxed{\text{mean of }x = \int_{-\infty}^{\infty}{0.125x^2}dx}}](https://tex.z-dn.net/?f=%5Ctext%7Bmean%20of%20%7Dx%20%3D%20E%5Bx%5D%0A%5C%5C%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%7Bxf%28x%29%7Ddx%7D%0A%5C%5C%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%7Bx%280.125x%29%7Ddx%7D%0A%5C%5C%20%5Cboxed%7B%5Ctext%7Bmean%20of%20%7Dx%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%7B0.125x%5E2%7Ddx%7D%7D)
The integral seems complicated because of the infinity sign. But because the domain of f is the set of positive numbers less than 4, that is,

the bounds of the integral for the mean can be changed from

to

so that

Hence, the mean is computed as
![\text{mean of }x = \int_{0}^{4}{0.125x^2}dx \\ = \left[ \frac{0.125x^3}{3} \right]_{0}^{4} \\ \\ = \left[ \frac{0.125(4)^3}{3} \right] - \left[ \frac{0.125(0)^3}{3} \right] \\ \\ \boxed{\text{mean of }x = \frac{8}{3} \approx 2.667}](https://tex.z-dn.net/?f=%5Ctext%7Bmean%20of%20%7Dx%20%3D%20%5Cint_%7B0%7D%5E%7B4%7D%7B0.125x%5E2%7Ddx%0A%5C%5C%20%3D%20%5Cleft%5B%20%5Cfrac%7B0.125x%5E3%7D%7B3%7D%20%20%5Cright%5D_%7B0%7D%5E%7B4%7D%0A%5C%5C%0A%5C%5C%20%3D%20%5Cleft%5B%20%5Cfrac%7B0.125%284%29%5E3%7D%7B3%7D%20%20%5Cright%5D%20-%20%5Cleft%5B%20%5Cfrac%7B0.125%280%29%5E3%7D%7B3%7D%20%20%5Cright%5D%20%0A%5C%5C%0A%5C%5C%20%5Cboxed%7B%5Ctext%7Bmean%20of%20%7Dx%20%3D%20%5Cfrac%7B8%7D%7B3%7D%20%20%5Capprox%202.667%7D%20)
Since the formula for variance is computed as
![\text{Variance of }x = \text{Var}[x] = E[x^2] - (E[x])^2](https://tex.z-dn.net/?f=%5Ctext%7BVariance%20of%20%7Dx%20%3D%20%5Ctext%7BVar%7D%5Bx%5D%20%3D%20E%5Bx%5E2%5D%20-%20%28E%5Bx%5D%29%5E2)
we must first compute for
![E[x^2]](https://tex.z-dn.net/?f=E%5Bx%5E2%5D)
for which
![E[x^2] = \int_{-\infty}^{\infty}{x^2 f(x)}dx \\ \\ = \int_{-\infty}^{\infty}{x^2(0.125x)}dx \\ \\ \boxed{E[x^2] = \int_{-\infty}^{\infty}{0.125x^3}dx}](https://tex.z-dn.net/?f=E%5Bx%5E2%5D%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%7Bx%5E2%20f%28x%29%7Ddx%0A%5C%5C%0A%5C%5C%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%7Bx%5E2%280.125x%29%7Ddx%0A%5C%5C%0A%5C%5C%20%5Cboxed%7BE%5Bx%5E2%5D%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%7B0.125x%5E3%7Ddx%7D)
Similar to the computation of integral of the mean, we take note that

so that we can change the bounds of the integral, that is,
![\boxed{E[x^2] = \int_{-\infty}^{\infty}{0.125x^3}dx = \int_{0}^{4}{0.125x^3}dx}](https://tex.z-dn.net/?f=%5Cboxed%7BE%5Bx%5E2%5D%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%7B0.125x%5E3%7Ddx%20%3D%20%5Cint_%7B0%7D%5E%7B4%7D%7B0.125x%5E3%7Ddx%7D)
Hence,
![E[x^2] = \int_{0}^{4}{0.125x^3}dx \\ \\ = \int_{0}^{4}{0.125x^3}dx \\ \\= \left[ \frac{0.125x^4}{4} \right]_{0}^{4} \\ \\ = \left[ \frac{0.125(4)^4}{4} \right] - \left[ \frac{0.125(0)^4}{4} \right] \\ \\ \boxed{E[x^2] = 8}](https://tex.z-dn.net/?f=E%5Bx%5E2%5D%20%3D%20%5Cint_%7B0%7D%5E%7B4%7D%7B0.125x%5E3%7Ddx%0A%5C%5C%0A%5C%5C%20%3D%20%5Cint_%7B0%7D%5E%7B4%7D%7B0.125x%5E3%7Ddx%0A%5C%5C%0A%5C%5C%3D%20%5Cleft%5B%20%5Cfrac%7B0.125x%5E4%7D%7B4%7D%20%5Cright%5D_%7B0%7D%5E%7B4%7D%20%0A%5C%5C%20%0A%5C%5C%20%3D%20%5Cleft%5B%20%5Cfrac%7B0.125%284%29%5E4%7D%7B4%7D%20%5Cright%5D%20-%20%5Cleft%5B%20%5Cfrac%7B0.125%280%29%5E4%7D%7B4%7D%20%20%5Cright%5D%20%0A%5C%5C%20%0A%5C%5C%20%5Cboxed%7BE%5Bx%5E2%5D%20%3D%208%7D)
Because
![E[x] = \frac{8}{3}](https://tex.z-dn.net/?f=E%5Bx%5D%20%3D%20%20%5Cfrac%7B8%7D%7B3%7D%20)
,