# Expectation of a shorter piece

The original question is:

Suppose a 12 inch metal rod inside a factory of some sort is secured at both ends. The rod is then placed under significant pressure until it breaks cleanly. Let $X$ be the distance from the left end where the break occurs, and the pdf of $X$ is given as: $$f_X(x)=\left\{\begin{array}{rl} \left(\dfrac{x}{24}\right)\left(1-\dfrac{x}{12}\right), & 0\le x \le 12 \\ 0, & \text{otherwise} \end{array}\right.$$ Find the expected length of the shorter segment when the rod breaks.

I found the expected value using: $$E[X]=\dfrac{1}{24} \int_0^{12}\left({x^2-\dfrac{x^3}{12}}\right)dx=6$$ But the answer is given as $3.75$ and I have no idea how they got that. Wouldn't I expect the rod to break exactly in the middle, and therefore, there wouldn't be a shorter or longer segment in the first place? Or is this conditional expectation?

• so if the rod breaks into 2 perfectly its 6. what is the probability of it doing this? how many standard deviations off will we be on average? – shai horowitz Oct 21 '16 at 20:11
• @shaihorowitz The probability of breaking perfectly is $P(X=6)=0$ since it's a continuous distribution, but I'm not sure what else you mean. The standard deviation was $\sigma_X \approx 2.6834$. – nexicon Oct 21 '16 at 20:17
• Notice that the question looks for $\mathbb{E}(\min\{X,12-X\})$ rather than $\mathbb{E}(X)$. – Fimpellizieri Oct 21 '16 at 20:20
• @Fimpellizieri Could you explain how to find the density function for that minimum in this context, please? – nexicon Oct 21 '16 at 20:29

Let $Y = \min\{X,12-X\}$. Observing that $0 \leq X \leq 12$, we have that:
• When $X\leq 6$, $Y=X$
• When $X \geq 6$, $Y=12-X$
$$\mathbb{E}(Y)=\int_0^6x\cdot \left(\dfrac{x}{24}\right)\left(1-\dfrac{x}{12}\right)\,dx\,+\,\int_6^{12}(12-x)\cdot \left(\dfrac{x}{24}\right)\left(1-\dfrac{x}{12}\right)\,dx$$