Uniform Random Variable I was given these two questions regarding Uniform Random Variable but I don't know how to think or approach these questions.

1) A stick of length 1 is uniformly distributed over [0,1]. There is a point 'p' on the stick, and we break the stick in two at a point 'u'. Determine the expected length of the piece that contains the point 'p'.

2) Your company must make a sealed bid for a construction project. If you succeed in winning the contract (by having the lowest bid), then you plan to pay another firm 100 thousand dollars to do the work. If you believe that the minimum bid (in thousands of dollars) of the other participating companies can be modeled as the value of a random variable that is uniformly distributed on (70, 140), how much should you bid to maximize your expected profit?

I was told these questions are similar, but I don't understand the approach. What type of questions are these regarded as?

Thank you!
A sensible interpretation of the first question is as follows. Let $0&lt;p&lt;1$ is a fixed point on the $[0,1]$ interval and let $U$ be uniformly distributed over $[0,1]$. Define $X$ like

$$X=\begin{cases}p&amp;\text{ if } &amp;U&lt;p\\
1-p&amp;\text{ if }&amp; U\ge p.\end{cases}$$

The expectation of $X$ is

$$E[X]=p^2+(1-p)^2.$$

This value is minimal if $p$ is at the middle of the "stick."



Another interpretation is (Did):

$$X=\begin{cases}1-U&amp;\text{ if } &amp;U&lt;p\\
U&amp;\text{ if }&amp; U\ge p.\end{cases}$$

In this case 

$$E[X]=E[X\mid U&lt;p]p+E[X\mid U\ge p](1-p)=$$
$$=E[1-U\mid U&lt;p]p+E[U\mid U\ge p](1-p)=$$
$$=p-E[U\mid U&lt;p]p+E[U\mid U\ge p]-E[U\mid U\ge p]p=$$
$$=p-p^2+\frac12$$

which takes its maximum at $\frac12$.



EDIT

As far as Question 2:

Let $x$ and $B$ denote our bid and the other bid, respectively. $B$ is uniformly distributed over $[70,140]$. Our profit is

$$PR=\begin{cases}
0&amp;\text{ if }&amp; B\leq x&amp;\\
x-100&amp;\text{ if }&amp; B&gt; x.&amp;\end{cases}$$

The expected profit is then

$$E[PR]=(x-100)P(B&gt;x)=(x-100)\frac{140-x}{70}$$
whose minimum can be easily calculated.
A sensible interpretation of the first question is as follows. Let $0&lt;p&lt;1$ is a fixed point on the $[0,1]$ interval and let $U$ be uniformly distributed over $[0,1]$. Define $X$ like

$$X=\begin{cases}p&amp;\text{ if } &amp;U&lt;p\\
1-p&amp;\text{ if }&amp; U\ge p.\end{cases}$$

The expectation of $X$ is

$$E[X]=p^2+(1-p)^2.$$

This value is minimal if $p$ is at the middle of the "stick."



Another interpretation is (Did):

$$X=\begin{cases}1-U&amp;\text{ if } &amp;U&lt;p\\
U&amp;\text{ if }&amp; U\ge p.\end{cases}$$

In this case 

$$E[X]=E[X\mid U&lt;p]p+E[X\mid U\ge p](1-p)=$$
$$=E[1-U\mid U&lt;p]p+E[U\mid U\ge p](1-p)=$$
$$=p-E[U\mid U&lt;p]p+E[U\mid U\ge p]-E[U\mid U\ge p]p=$$
$$=p-p^2+\frac12$$

which takes its maximum at $\frac12$.



EDIT

As far as Question 2:

Let $x$ and $B$ denote our bid and the other bid, respectively. $B$ is uniformly distributed over $[70,140]$. Our profit is

$$PR=\begin{cases}
0&amp;\text{ if }&amp; B\leq x&amp;\\
x-100&amp;\text{ if }&amp; B&gt; x.&amp;\end{cases}$$

The expected profit is then

$$E[PR]=(x-100)P(B&gt;x)=(x-100)\frac{140-x}{70}$$
whose minimum can be easily calculated.