Let $X$ be a continuous random variable with p.d.f $f(x)$ given by $$f(x)= \begin{cases} \theta x + \frac {1} {2} \ , & \text -1<x<1 \\ 0 \ , & \text elsewhere \\ \end{cases}$$
where $\theta$ is a constant. Then the value of $\theta$ for which $\mathrm {Var}(X)$ is maximum is
$(a)$ $1.$
$(b)$ $2.$
$(c)$ $\frac {1} {4}.$
$(d)$ $0.$
I have computed it and found that $\mathrm{E}(X) = \frac {2 \theta} {3}$ and $\mathrm {Var} (X) = \frac {1} {3} - \frac {4 {\theta}^2} {3}$ and hence the maximum value of $\mathrm {Var} (X)$ is $\frac {1} {3}$. Which does not meet my purpose.
Would anybody tell me the given options are correct or not?
Thank you in advance.
We have that $$ \mathbb EX = \int_{-1}^1{x(\theta x+1/2)dx} = \frac{2\theta}{3} $$ and $$ \mathbb EX^2 = \int_{-1}^1{x^2(\theta x+1/2)dx} = \frac{1}{3}. $$ Subsequently, $$ \mathrm{Var}[X] = \mathbb E[X^2] - (\mathbb EX)^2 = \frac{1}{3}-\frac{4\theta^2}{9} =: f(\theta). $$ Taking derivatives of $f$ with respect to $\theta$ and equating it to zero, we get $$ f'(\theta) = -\frac{8}{9}\theta = 0 \Longrightarrow \theta^*=0. $$ The maximum variance is then $f(\theta^*) = 1/3$.