# Thread:

1. ## minimizing value

Let x be a random variable with support {1, 2, 3, 5, 15, 25, 50}, each point of which has the same probability 1/7. Argue that c=5 is the value that minimizes h(c)=E(|X-c|). Compare this to the value of b that minimizes g(b)=E[(X-b)^2].

2. Hello,
Originally Posted by antman
Let x be a random variable with support {1, 2, 3, 5, 15, 25, 50}, each point of which has the same probability 1/7. Argue that c=5 is the value that minimizes h(c)=E(|X-c|). Compare this to the value of b that minimizes g(b)=E[(X-b)^2].
You can have a look here : http://www.medicine.mcgill.ca/epidem...n-elevator.pdf
and here for a "similar" problem : http://www.mathhelpforum.com/math-he...blem-50-a.html (I think that the relevant messages are from post #15)

For b, it's the problem of least squares. You can google for "least squares"

3. Originally Posted by antman
Let x be a random variable with support {1, 2, 3, 5, 15, 25, 50}, each point of which has the same probability 1/7. Argue that c=5 is the value that minimizes h(c)=E(|X-c|). Compare this to the value of b that minimizes g(b)=E[(X-b)^2].
Consider $\{a,b\},\ b>a$, for any $c \in [a,b]$

$<br /> |a-c|+|b-c|=b-a<br />$

and if $c \not\in [a,b]$ :

$|a-c|+|b-c|>b-a$

Hence any $c \in [a,b]$ minimises $|a-c|+|b-c|$

Apply this sequentially to $\{1,50\},\ \{2,25\},\ \{3,15\}$ shows that any $c \in [3,15]$ minimises:

$|1-c|+|2-c|+|3-c|+|15-c|+|25-c|+|50-c|$

and as the last point not accounted for is in this interval and $|5-c|$ is minimised when $c=5$ we have $c=5$ minimises:

$<br /> E(|X-c|)=(1/7) \sum |x_i-c|<br />$

CB
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 14, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8860378265380859, "perplexity_flag": "middle"}