Two six-sided dice are rolled (associated with the random variables $X$ and $Y$) . Find the probability distribution of $X | \max\{X,Y\} = z$. By definition,
$$ P( X = x \mid \max\{X,Y\} = z ) = \frac{P(X = x, \max\{X,Y\} = z )}{P(\max\{ X,Y \} = z)}.$$ (am I right?)
I've found that
$$P(\max\{X,Y \} = z) = \frac{2z - 1}{36},$$
but I can't find the other expression. I've tried to use Bayes' theorem
and it has lead me to nothing.
 A: Assuming X and Y are independent and have a uniform distribution $\mathbf X, \mathbf Y \sim \mathcal{U\{1,6\}}$ (which makes sense for two six-sided dices) we should start with the most immediate conclusions we can make:
$$\eqalign{
P(\mathbf X = x, \mathbf Y = y) &= P(\mathbf X = x) P(\mathbf Y = y) \\
                                &= \left( {1 \over 6}\right)^2 \\
                                &= {1 \over 36}}$$
for all $x, y \in \{1, 2, \ldots, 6\}$.
And all possible values for $max \{ \mathbf X, \mathbf Y \}$ given $\mathbf X$ and $\mathbf Y$ are:
X\Y  ||  1    2    3    4    5    6
====================================
 1   ||  1    2    3    4    5    6
 2   ||  2    2    3    4    5    6
 3   ||  3    3    3    4    5    6
 4   ||  4    4    4    4    5    6
 5   ||  5    5    5    5    5    6
 6   ||  6    6    6    6    6    6

And we know that by definition
$$P( \mathbf X = x \mid max \{ \mathbf X, \mathbf Y \} = z) = {{P(\mathbf X = x, max \{ \mathbf X ,\mathbf Y \} = z)} \over {P(max \{ \mathbf X , \mathbf Y \} ) = z}}$$
I'll show a solution with intuition and a purely analytical one.
Solution with intuition
From the table we can calculate the probability of an event $A$ by counting all the possible occurences of $(\mathbf X, \mathbf Y)$ in which the event $A$ occurs and divide this by 36 since each $(x, y)$ has a probability of ${1 \over 36}$ to occur.
If $max \{ \mathbf X , \mathbf Y \} = z$ we can see that if $\mathbf X = z$ then $\mathbf Y$ can have any of the $z$ values in $\{ 1, \ldots, z \}$ and if $\mathbf X$ has any of the $z-1$ values in $\{1, \ldots, z-1 \}$ then $\mathbf Y = z$. So these are $z + (z - 1) = 2z - 1$ combinations of $( \mathbf X , \mathbf Y )$ such that $max \{ \mathbf X , \mathbf Y \} = z$ and therefore $P(max \{ \mathbf X , \mathbf Y \} = z) = {2z-1 \over 36}$.
Now lets check $P( \mathbf X = x, max \{ \mathbf X , \mathbf Y \} = z )$.
Clearly if $x \geq z$ then $P( \mathbf X = x, max \{ \mathbf X , \mathbf Y \} = z) = 0$.
From the table we can see that whenever $x \lt z$, then we will have just one combination where $max \{ \mathbf X , \mathbf Y \} = z$ because $\mathbf Y = z$ is the only possible value of $\mathbf Y$. So $P( \mathbf X = x, max \{ \mathbf X , \mathbf Y \} = z) = {1 \over 36}$ for $x \lt z$.
And when $x = z$ then $\mathbf Y$ can take any of the $z$ values where $y \leq z$. So $P(\mathbf X = x, max \{ \mathbf X , \mathbf Y \} = z) = {z \over 36}$ for $x = z$.
In conclusion:
$$P(max \{ \mathbf X , \mathbf Y \} = z) = {2z - 1 \over 36}$$
and
$$P( \mathbf X = x, max \{ \mathbf X , \mathbf Y \} = z) =
\begin{cases} 
  {1 \over 36} & x \lt z \\
  {z \over 36} & x = z 
\end{cases}
$$
therefore
$$P( \mathbf X = x \mid max \{ \mathbf X , \mathbf Y \} = z) =
\begin{cases} 
  {1 \over 2z - 1} & x \lt z \\
  {z \over 2z - 1} & x = z 
\end{cases}
$$
Purely analytical solution
Since $\mathbf X$ and $\mathbf Y$ are independent
$$P(max \{ \mathbf X , \mathbf Y \} = z) = P( \mathbf X = z, \mathbf Y \leq z) + P( \mathbf X \lt z, \mathbf Y = z)$$
and calculating each summand separately we can see that
$$\eqalign{
P( \mathbf X = z, \mathbf Y \leq z) &= P(\mathbf X = z, \mathbf Y = 1) + \cdots + P( \mathbf X = z, \mathbf Y = z) \\
                                &= {z \over 36}
}$$
and
$$\eqalign{
P( \mathbf X \lt z, \mathbf Y = z) &= P( \mathbf X = 1, \mathbf Y = z) + \cdots + P( \mathbf X = z-1, \mathbf Y = z) \\
                               &= {z-1 \over 36}
}$$
So
$$\eqalign{
P(max\{ \mathbf X , \mathbf Y \} = z) &= P( \mathbf X = z, \mathbf Y \leq z) + P( \mathbf \lt z, \mathbf Y = z) \\
                                  &= {z \over 36} + {z-1 \over 36} \\
                                  &= {2z - 1 \over 36}
}$$
For $P( \mathbf X = x, max \{\mathbf X, \mathbf Y\} = z)$ we can see different cases.
If $x \lt z$ then
$$\eqalign{
P( \mathbf X = x, max \{ \mathbf X , \mathbf Y \} = z) &= P( \mathbf X = x, \mathbf Y = z) \\
                                                   &= {1 \over 36}
}$$
If $x = z$ then
$$\eqalign{
P( \mathbf X = x, max \{ \mathbf X , \mathbf Y \} = z) &= P( \mathbf X = z, \mathbf Y = 1) + \cdots + P(\mathbf X = z, \mathbf Y = z) \\
                                                   &= {z \over 36}
}$$
So
$$ P( \mathbf X = x, max \{ \mathbf X , \mathbf Y \} = z) =
\begin{cases} 
  {1 \over 36} & x \lt z \\
  {z \over 36} & x = z 
\end{cases}
$$
therefore
$$P( \mathbf X = x \mid max \{ \mathbf X , \mathbf Y \} = z) =
\begin{cases} 
  {1 \over 2z - 1} & x \lt z \\
  {z \over 2z - 1} & x = z 
\end{cases}
$$
A: For $x\gt z,\ P=0$. 
For $x\lt z,\ P=\frac{1}{2z-1}$. 
For $x=z, P=\frac{z}{2z-1}$. 
Here $P=P(X=z,max(X,Y)=z)$.
This is a result of noting that for each $x\lt z$, there is exactly one possibility, while for $x=z$, there are exactly $z$ possibilities leading to $2z-1$ possibilities for $max(X,Y)=z$.
A: You need to condition the numerator over $Y$, then enumerate. For example if $y=6$, then $z=6$, and $X\sim U(0,6)$. If $y=1$ and $z=1$, then $P(X=1)=1$. The basic formula you want is
$$
P(X=x\mid\max(X,Y)=z) = \sum_y P(X=x\mid\max(X,Y)=z,Y=y)P(Y=y).
$$
Conceptually, if $y<z$ you already know exactly what $x$ is.
