<s>[INST] Probability of Maximum Value 
Let $X$ and $Y$ be independent, each uniformly distributed on $\{1, 2, ..., n\}$. Find $P(\max(X, Y) = k)$ for $1 \le k \le n$.

$P(\max(X, Y) = k) $
$= P(X = k \cap X > Y) + P(Y = k \cap Y > X)$
$= P(X=k)P(X>Y|X=k) + P(Y=k)P(Y>X|Y=k)$
$= \frac{1}{n} \cdot \frac{k-1}{n} + \frac{1}{n} \cdot \frac{k-1}{n}$
$= \frac{2(k-1)}{n^2}$
Textbook Answer: $\,\,\,  \frac{2k-1}{n^2}$
 [/INST] $P(\max(X, Y) = k)$
$= P(X = k \cap X > Y) + P(Y = k \cap Y > X) + P(X = Y = k)$
$= P(X=k)P(X>Y|X=k) + P(Y=k)P(Y>X|Y=k) +  P(X = Y = k)$
$= \frac{1}{n} \cdot \frac{k-1}{n} + \frac{1}{n} \cdot \frac{k-1}{n} + \frac1{n^2}$
$= \frac{2k-1}{n^2}$
</s>