The p.m.f. of a random variable \( X \) is:
\[
P(X) = \frac{2x}{n(n+1)}, \quad x = 1, 2, 3, \ldots, n
\]
\[
P(X) = 0, \quad \text{Otherwise.}
\]
Then \( E(X) \) is:
Show Hint
For discrete random variables, calculate \( E(X) \) by summing \( x \cdot P(X = x) \), and use known summation formulas for efficiency.
The expected value \( E(X) \) is given by:
\[
E(X) = \sum_{x=1}^n x \cdot P(X = x).
\]
Substitute \( P(X = x) = \frac{2x}{n(n+1)} \):
\[
E(X) = \sum_{x=1}^n x \cdot \frac{2x}{n(n+1)}.
\]
Simplify:
\[
E(X) = \frac{2}{n(n+1)} \sum_{x=1}^n x^2.
\]
Step 1: Use the sum of squares formula
The sum of squares of the first \( n \) natural numbers is:
\[
\sum_{x=1}^n x^2 = \frac{n(n+1)(2n+1)}{6}.
\]
Substitute this into the equation for \( E(X) \):
\[
E(X) = \frac{2}{n(n+1)} \cdot \frac{n(n+1)(2n+1)}{6}.
\]
Simplify:
\[
E(X) = \frac{2(2n+1)}{6}.
\]
\[
E(X) = \frac{2n+1}{3}.
\]
Final Answer:
\[
\boxed{\frac{2n+1}{3}}
\]