How can I calculate $E[max ( X,1-X)]$ if $Xsim U(0,1)$? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Given $ X sim U(0,1) $ and $Y=max X,1-X$, how can I calculate $E[Y]$ ?










share|cite|improve this question















closed as off-topic by Did, amWhy, José Carlos Santos, StubbornAtom, Theoretical Economist Sep 9 at 14:54


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, amWhy, José Carlos Santos, StubbornAtom, Theoretical Economist
If this question can be reworded to fit the rules in the help center, please edit the question.












  • What did you try?
    – StubbornAtom
    Sep 9 at 10:40










  • Actually the question is just a special case of the more general version: How can I calculate $mathbb Eg(X)$ if $X$ is a random variable that has a PDF. IMHO the knowledge of how to do that in general has more value than the knowledge how to do that in some special case.
    – drhab
    Sep 9 at 10:56










  • @drhab Yes, this is just about evaluating an integral.
    – StubbornAtom
    Sep 9 at 11:00






  • 2




    @StubbornAtom Then why not directly asking for evaluation of $int_0^1max(x,1-x) dx$?
    – drhab
    Sep 9 at 11:02














up vote
0
down vote

favorite












Given $ X sim U(0,1) $ and $Y=max X,1-X$, how can I calculate $E[Y]$ ?










share|cite|improve this question















closed as off-topic by Did, amWhy, José Carlos Santos, StubbornAtom, Theoretical Economist Sep 9 at 14:54


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, amWhy, José Carlos Santos, StubbornAtom, Theoretical Economist
If this question can be reworded to fit the rules in the help center, please edit the question.












  • What did you try?
    – StubbornAtom
    Sep 9 at 10:40










  • Actually the question is just a special case of the more general version: How can I calculate $mathbb Eg(X)$ if $X$ is a random variable that has a PDF. IMHO the knowledge of how to do that in general has more value than the knowledge how to do that in some special case.
    – drhab
    Sep 9 at 10:56










  • @drhab Yes, this is just about evaluating an integral.
    – StubbornAtom
    Sep 9 at 11:00






  • 2




    @StubbornAtom Then why not directly asking for evaluation of $int_0^1max(x,1-x) dx$?
    – drhab
    Sep 9 at 11:02












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Given $ X sim U(0,1) $ and $Y=max X,1-X$, how can I calculate $E[Y]$ ?










share|cite|improve this question















Given $ X sim U(0,1) $ and $Y=max X,1-X$, how can I calculate $E[Y]$ ?







probability probability-distributions uniform-distribution expected-value






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Sep 9 at 10:40









StubbornAtom

4,11711136




4,11711136










asked Sep 9 at 10:31









Software_t

1184




1184




closed as off-topic by Did, amWhy, José Carlos Santos, StubbornAtom, Theoretical Economist Sep 9 at 14:54


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, amWhy, José Carlos Santos, StubbornAtom, Theoretical Economist
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Did, amWhy, José Carlos Santos, StubbornAtom, Theoretical Economist Sep 9 at 14:54


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, amWhy, José Carlos Santos, StubbornAtom, Theoretical Economist
If this question can be reworded to fit the rules in the help center, please edit the question.











  • What did you try?
    – StubbornAtom
    Sep 9 at 10:40










  • Actually the question is just a special case of the more general version: How can I calculate $mathbb Eg(X)$ if $X$ is a random variable that has a PDF. IMHO the knowledge of how to do that in general has more value than the knowledge how to do that in some special case.
    – drhab
    Sep 9 at 10:56










  • @drhab Yes, this is just about evaluating an integral.
    – StubbornAtom
    Sep 9 at 11:00






  • 2




    @StubbornAtom Then why not directly asking for evaluation of $int_0^1max(x,1-x) dx$?
    – drhab
    Sep 9 at 11:02
















  • What did you try?
    – StubbornAtom
    Sep 9 at 10:40










  • Actually the question is just a special case of the more general version: How can I calculate $mathbb Eg(X)$ if $X$ is a random variable that has a PDF. IMHO the knowledge of how to do that in general has more value than the knowledge how to do that in some special case.
    – drhab
    Sep 9 at 10:56










  • @drhab Yes, this is just about evaluating an integral.
    – StubbornAtom
    Sep 9 at 11:00






  • 2




    @StubbornAtom Then why not directly asking for evaluation of $int_0^1max(x,1-x) dx$?
    – drhab
    Sep 9 at 11:02















What did you try?
– StubbornAtom
Sep 9 at 10:40




What did you try?
– StubbornAtom
Sep 9 at 10:40












Actually the question is just a special case of the more general version: How can I calculate $mathbb Eg(X)$ if $X$ is a random variable that has a PDF. IMHO the knowledge of how to do that in general has more value than the knowledge how to do that in some special case.
– drhab
Sep 9 at 10:56




Actually the question is just a special case of the more general version: How can I calculate $mathbb Eg(X)$ if $X$ is a random variable that has a PDF. IMHO the knowledge of how to do that in general has more value than the knowledge how to do that in some special case.
– drhab
Sep 9 at 10:56












@drhab Yes, this is just about evaluating an integral.
– StubbornAtom
Sep 9 at 11:00




@drhab Yes, this is just about evaluating an integral.
– StubbornAtom
Sep 9 at 11:00




2




2




@StubbornAtom Then why not directly asking for evaluation of $int_0^1max(x,1-x) dx$?
– drhab
Sep 9 at 11:02




@StubbornAtom Then why not directly asking for evaluation of $int_0^1max(x,1-x) dx$?
– drhab
Sep 9 at 11:02










4 Answers
4






active

oldest

votes

















up vote
4
down vote













Well, observe that $Y=X$ if $X>frac12$ and $Y=1-X$ otherwise.



Therefore $$mathbbE[Y] = int_0^frac12 (1-x) dx + int_frac12^1 x dx = frac12 - frac18 + frac12 - frac18 = frac34 $$






share|cite|improve this answer




















  • +1 This is in my view the best answer to the need of OP. Especially because it is direct and only requires basic knowledge of the OP.
    – drhab
    Sep 9 at 11:23

















up vote
2
down vote













$Y$ is uniform in $[0.5,1]$. So, $mathbbE[Y]$ is $0.75$






share|cite|improve this answer






















  • Can you explain that?
    – Software_t
    Sep 9 at 10:33










  • if you have X = 0.1, or 0.9, both contributes to Y = 0.9. So, for each Y, you have two X contributors. This leads to uniform distribution among Y.
    – gunes
    Sep 9 at 10:35










  • For each $yinleft(frac12,1right)$, one can find the distribution function of $Y$ as beginalign P(Yle y)&=1-P(Y>y) \&=1-Pleft[X>ycup1-X>yright] \&=1-P(X>y)-P(X<1-y) \&=cdots endalign , which would prove that $Ysim Uleft(frac12,1right)$.
    – StubbornAtom
    Sep 9 at 10:47


















up vote
1
down vote













In general if $X$ is a random variable having a PDF $f_X$ then for Borel-measurable function $g:mathbb Rtomathbb R$ we have:$$mathbb Eg(X)=int g(x)f_X(x);dx$$if the expectation exists.



That can be applied here on function $g$ prescribed by $xmapstomax(x,1-x)$.






share|cite|improve this answer






















  • I know that, but how you will define the function $g(x)$ in this case?
    – Software_t
    Sep 9 at 10:36










  • I have added that.
    – drhab
    Sep 9 at 10:37

















up vote
1
down vote













$$mathbb E[Y] = mathbb Eleft[Y mid X>tfrac12right]mathbb Pleft(X>tfrac12right) + mathbb Eleft[Y mid Xle tfrac12right]mathbb Pleft(Xletfrac12right)$$ $$= tfrac12 mathbb Eleft[X mid X>tfrac12right] + tfrac12 mathbb Eleft[1-X mid 1-Xge tfrac12right] $$ $$= frac12 times frac34 + frac12 times frac34 = frac34 $$






share|cite|improve this answer




















  • Always a bit odd to see solutions based on the premise that conditional probabilities/expectations would be simpler to grasp than absolute probabilities/expectations.
    – Did
    Sep 9 at 14:08

















4 Answers
4






active

oldest

votes








4 Answers
4






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
4
down vote













Well, observe that $Y=X$ if $X>frac12$ and $Y=1-X$ otherwise.



Therefore $$mathbbE[Y] = int_0^frac12 (1-x) dx + int_frac12^1 x dx = frac12 - frac18 + frac12 - frac18 = frac34 $$






share|cite|improve this answer




















  • +1 This is in my view the best answer to the need of OP. Especially because it is direct and only requires basic knowledge of the OP.
    – drhab
    Sep 9 at 11:23














up vote
4
down vote













Well, observe that $Y=X$ if $X>frac12$ and $Y=1-X$ otherwise.



Therefore $$mathbbE[Y] = int_0^frac12 (1-x) dx + int_frac12^1 x dx = frac12 - frac18 + frac12 - frac18 = frac34 $$






share|cite|improve this answer




















  • +1 This is in my view the best answer to the need of OP. Especially because it is direct and only requires basic knowledge of the OP.
    – drhab
    Sep 9 at 11:23












up vote
4
down vote










up vote
4
down vote









Well, observe that $Y=X$ if $X>frac12$ and $Y=1-X$ otherwise.



Therefore $$mathbbE[Y] = int_0^frac12 (1-x) dx + int_frac12^1 x dx = frac12 - frac18 + frac12 - frac18 = frac34 $$






share|cite|improve this answer












Well, observe that $Y=X$ if $X>frac12$ and $Y=1-X$ otherwise.



Therefore $$mathbbE[Y] = int_0^frac12 (1-x) dx + int_frac12^1 x dx = frac12 - frac18 + frac12 - frac18 = frac34 $$







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Sep 9 at 10:36









LucaMac

1,694116




1,694116











  • +1 This is in my view the best answer to the need of OP. Especially because it is direct and only requires basic knowledge of the OP.
    – drhab
    Sep 9 at 11:23
















  • +1 This is in my view the best answer to the need of OP. Especially because it is direct and only requires basic knowledge of the OP.
    – drhab
    Sep 9 at 11:23















+1 This is in my view the best answer to the need of OP. Especially because it is direct and only requires basic knowledge of the OP.
– drhab
Sep 9 at 11:23




+1 This is in my view the best answer to the need of OP. Especially because it is direct and only requires basic knowledge of the OP.
– drhab
Sep 9 at 11:23










up vote
2
down vote













$Y$ is uniform in $[0.5,1]$. So, $mathbbE[Y]$ is $0.75$






share|cite|improve this answer






















  • Can you explain that?
    – Software_t
    Sep 9 at 10:33










  • if you have X = 0.1, or 0.9, both contributes to Y = 0.9. So, for each Y, you have two X contributors. This leads to uniform distribution among Y.
    – gunes
    Sep 9 at 10:35










  • For each $yinleft(frac12,1right)$, one can find the distribution function of $Y$ as beginalign P(Yle y)&=1-P(Y>y) \&=1-Pleft[X>ycup1-X>yright] \&=1-P(X>y)-P(X<1-y) \&=cdots endalign , which would prove that $Ysim Uleft(frac12,1right)$.
    – StubbornAtom
    Sep 9 at 10:47















up vote
2
down vote













$Y$ is uniform in $[0.5,1]$. So, $mathbbE[Y]$ is $0.75$






share|cite|improve this answer






















  • Can you explain that?
    – Software_t
    Sep 9 at 10:33










  • if you have X = 0.1, or 0.9, both contributes to Y = 0.9. So, for each Y, you have two X contributors. This leads to uniform distribution among Y.
    – gunes
    Sep 9 at 10:35










  • For each $yinleft(frac12,1right)$, one can find the distribution function of $Y$ as beginalign P(Yle y)&=1-P(Y>y) \&=1-Pleft[X>ycup1-X>yright] \&=1-P(X>y)-P(X<1-y) \&=cdots endalign , which would prove that $Ysim Uleft(frac12,1right)$.
    – StubbornAtom
    Sep 9 at 10:47













up vote
2
down vote










up vote
2
down vote









$Y$ is uniform in $[0.5,1]$. So, $mathbbE[Y]$ is $0.75$






share|cite|improve this answer














$Y$ is uniform in $[0.5,1]$. So, $mathbbE[Y]$ is $0.75$







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Sep 9 at 10:38









LucaMac

1,694116




1,694116










answered Sep 9 at 10:33









gunes

1943




1943











  • Can you explain that?
    – Software_t
    Sep 9 at 10:33










  • if you have X = 0.1, or 0.9, both contributes to Y = 0.9. So, for each Y, you have two X contributors. This leads to uniform distribution among Y.
    – gunes
    Sep 9 at 10:35










  • For each $yinleft(frac12,1right)$, one can find the distribution function of $Y$ as beginalign P(Yle y)&=1-P(Y>y) \&=1-Pleft[X>ycup1-X>yright] \&=1-P(X>y)-P(X<1-y) \&=cdots endalign , which would prove that $Ysim Uleft(frac12,1right)$.
    – StubbornAtom
    Sep 9 at 10:47

















  • Can you explain that?
    – Software_t
    Sep 9 at 10:33










  • if you have X = 0.1, or 0.9, both contributes to Y = 0.9. So, for each Y, you have two X contributors. This leads to uniform distribution among Y.
    – gunes
    Sep 9 at 10:35










  • For each $yinleft(frac12,1right)$, one can find the distribution function of $Y$ as beginalign P(Yle y)&=1-P(Y>y) \&=1-Pleft[X>ycup1-X>yright] \&=1-P(X>y)-P(X<1-y) \&=cdots endalign , which would prove that $Ysim Uleft(frac12,1right)$.
    – StubbornAtom
    Sep 9 at 10:47
















Can you explain that?
– Software_t
Sep 9 at 10:33




Can you explain that?
– Software_t
Sep 9 at 10:33












if you have X = 0.1, or 0.9, both contributes to Y = 0.9. So, for each Y, you have two X contributors. This leads to uniform distribution among Y.
– gunes
Sep 9 at 10:35




if you have X = 0.1, or 0.9, both contributes to Y = 0.9. So, for each Y, you have two X contributors. This leads to uniform distribution among Y.
– gunes
Sep 9 at 10:35












For each $yinleft(frac12,1right)$, one can find the distribution function of $Y$ as beginalign P(Yle y)&=1-P(Y>y) \&=1-Pleft[X>ycup1-X>yright] \&=1-P(X>y)-P(X<1-y) \&=cdots endalign , which would prove that $Ysim Uleft(frac12,1right)$.
– StubbornAtom
Sep 9 at 10:47





For each $yinleft(frac12,1right)$, one can find the distribution function of $Y$ as beginalign P(Yle y)&=1-P(Y>y) \&=1-Pleft[X>ycup1-X>yright] \&=1-P(X>y)-P(X<1-y) \&=cdots endalign , which would prove that $Ysim Uleft(frac12,1right)$.
– StubbornAtom
Sep 9 at 10:47











up vote
1
down vote













In general if $X$ is a random variable having a PDF $f_X$ then for Borel-measurable function $g:mathbb Rtomathbb R$ we have:$$mathbb Eg(X)=int g(x)f_X(x);dx$$if the expectation exists.



That can be applied here on function $g$ prescribed by $xmapstomax(x,1-x)$.






share|cite|improve this answer






















  • I know that, but how you will define the function $g(x)$ in this case?
    – Software_t
    Sep 9 at 10:36










  • I have added that.
    – drhab
    Sep 9 at 10:37














up vote
1
down vote













In general if $X$ is a random variable having a PDF $f_X$ then for Borel-measurable function $g:mathbb Rtomathbb R$ we have:$$mathbb Eg(X)=int g(x)f_X(x);dx$$if the expectation exists.



That can be applied here on function $g$ prescribed by $xmapstomax(x,1-x)$.






share|cite|improve this answer






















  • I know that, but how you will define the function $g(x)$ in this case?
    – Software_t
    Sep 9 at 10:36










  • I have added that.
    – drhab
    Sep 9 at 10:37












up vote
1
down vote










up vote
1
down vote









In general if $X$ is a random variable having a PDF $f_X$ then for Borel-measurable function $g:mathbb Rtomathbb R$ we have:$$mathbb Eg(X)=int g(x)f_X(x);dx$$if the expectation exists.



That can be applied here on function $g$ prescribed by $xmapstomax(x,1-x)$.






share|cite|improve this answer














In general if $X$ is a random variable having a PDF $f_X$ then for Borel-measurable function $g:mathbb Rtomathbb R$ we have:$$mathbb Eg(X)=int g(x)f_X(x);dx$$if the expectation exists.



That can be applied here on function $g$ prescribed by $xmapstomax(x,1-x)$.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Sep 9 at 10:36

























answered Sep 9 at 10:34









drhab

89.3k541123




89.3k541123











  • I know that, but how you will define the function $g(x)$ in this case?
    – Software_t
    Sep 9 at 10:36










  • I have added that.
    – drhab
    Sep 9 at 10:37
















  • I know that, but how you will define the function $g(x)$ in this case?
    – Software_t
    Sep 9 at 10:36










  • I have added that.
    – drhab
    Sep 9 at 10:37















I know that, but how you will define the function $g(x)$ in this case?
– Software_t
Sep 9 at 10:36




I know that, but how you will define the function $g(x)$ in this case?
– Software_t
Sep 9 at 10:36












I have added that.
– drhab
Sep 9 at 10:37




I have added that.
– drhab
Sep 9 at 10:37










up vote
1
down vote













$$mathbb E[Y] = mathbb Eleft[Y mid X>tfrac12right]mathbb Pleft(X>tfrac12right) + mathbb Eleft[Y mid Xle tfrac12right]mathbb Pleft(Xletfrac12right)$$ $$= tfrac12 mathbb Eleft[X mid X>tfrac12right] + tfrac12 mathbb Eleft[1-X mid 1-Xge tfrac12right] $$ $$= frac12 times frac34 + frac12 times frac34 = frac34 $$






share|cite|improve this answer




















  • Always a bit odd to see solutions based on the premise that conditional probabilities/expectations would be simpler to grasp than absolute probabilities/expectations.
    – Did
    Sep 9 at 14:08














up vote
1
down vote













$$mathbb E[Y] = mathbb Eleft[Y mid X>tfrac12right]mathbb Pleft(X>tfrac12right) + mathbb Eleft[Y mid Xle tfrac12right]mathbb Pleft(Xletfrac12right)$$ $$= tfrac12 mathbb Eleft[X mid X>tfrac12right] + tfrac12 mathbb Eleft[1-X mid 1-Xge tfrac12right] $$ $$= frac12 times frac34 + frac12 times frac34 = frac34 $$






share|cite|improve this answer




















  • Always a bit odd to see solutions based on the premise that conditional probabilities/expectations would be simpler to grasp than absolute probabilities/expectations.
    – Did
    Sep 9 at 14:08












up vote
1
down vote










up vote
1
down vote









$$mathbb E[Y] = mathbb Eleft[Y mid X>tfrac12right]mathbb Pleft(X>tfrac12right) + mathbb Eleft[Y mid Xle tfrac12right]mathbb Pleft(Xletfrac12right)$$ $$= tfrac12 mathbb Eleft[X mid X>tfrac12right] + tfrac12 mathbb Eleft[1-X mid 1-Xge tfrac12right] $$ $$= frac12 times frac34 + frac12 times frac34 = frac34 $$






share|cite|improve this answer












$$mathbb E[Y] = mathbb Eleft[Y mid X>tfrac12right]mathbb Pleft(X>tfrac12right) + mathbb Eleft[Y mid Xle tfrac12right]mathbb Pleft(Xletfrac12right)$$ $$= tfrac12 mathbb Eleft[X mid X>tfrac12right] + tfrac12 mathbb Eleft[1-X mid 1-Xge tfrac12right] $$ $$= frac12 times frac34 + frac12 times frac34 = frac34 $$







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Sep 9 at 11:01









Henry

94.4k473150




94.4k473150











  • Always a bit odd to see solutions based on the premise that conditional probabilities/expectations would be simpler to grasp than absolute probabilities/expectations.
    – Did
    Sep 9 at 14:08
















  • Always a bit odd to see solutions based on the premise that conditional probabilities/expectations would be simpler to grasp than absolute probabilities/expectations.
    – Did
    Sep 9 at 14:08















Always a bit odd to see solutions based on the premise that conditional probabilities/expectations would be simpler to grasp than absolute probabilities/expectations.
– Did
Sep 9 at 14:08




Always a bit odd to see solutions based on the premise that conditional probabilities/expectations would be simpler to grasp than absolute probabilities/expectations.
– Did
Sep 9 at 14:08


這個網誌中的熱門文章

Why am i infinitely getting the same tweet with the Twitter Search API?

Is there any way to eliminate the singular point to solve this integral by hand or by approximations?

Strongly p-embedded subgroups and p-Sylow subgroups.