# Expected value of a random variable that represents diameter of a circle

Let $X$ be a random variable that represents the length of the diameter of a circle, we know that $X:\mathcal{U}(5,7)$. Find expected value of circle area.

As far as i know, first, we need density function for this random variable. We know that this variable is uniformly distributed so $f(x)=\frac{1}{2}$. Now, we know that area of a circle is $A=\pi r^2$ where $r$ is radius. As far as i know, formula for expected value is: $$E(X)=\int_{-\infty}^{\infty}xf(x)dx$$ I have that $f(x)=\frac{1}{2}$. How am i supposed to include formula for area of circle into all of this? Any help appreciated!

• You need to compute $E(\pi X^2)$, right? – GEdgar May 8 '18 at 18:26

Two observations:

$\qquad(1)$: $f(x)$ is not $\frac12$, but rather $\frac12 \chi_{[5,7]}$. In other words, $f$ is $0$ outside $[5,7]$.

$\qquad(2)$: You wish to calculate the expectation of the area, which is $\pi\, (X/2)^2$. Hence, you wish to calculate

$$\mathbb E\left(\pi {(X/2)}^2\right) = \frac\pi4\,\mathbb E\left( X^2\right).$$

Can you conclude?

• why $\chi ..$ ? – G Cab May 8 '18 at 18:31
• @GCab Because the density function is $0$ on $\mathbb R\setminus[5,7]$. – Fimpellizieri May 8 '18 at 18:32
• yes, clear, but what do you mean with $\chi$ ? the uniform distr. ? – G Cab May 8 '18 at 18:34
• Ok so it is actually $\frac{1}{2}$ at segment $[5,7]$ and zero otherwise and when calculating expectation i could actually insert whole function into the integral or just use properties of expectation and just find $E(X)$, multiply it by itself and then by $\frac{\pi}{4}$. Is that right? – cdummie May 8 '18 at 18:35
• @cdummie That would be good, yes! – Fimpellizieri May 8 '18 at 18:45