I have a quick question.

The problem:

3 numbers, say X, Y, and Z are chosen from a set of numbers (1 to n) where n is greater or equal to 1, in a uniform and independent manner.

Question 1

What's the chance that all these three numbers take on the same value, i.e. X=Y=Z?

*My intuition*

Let v equal to some value in the set (1 to n)

Let P (X = v) be the probability X equals v

Let P (Y = v) be the probability Y equals v

Let P (Z = v) be the probability Z equals v

P (X = Y = Z) = P (X = v) * P (Y = v) * P (Z = v)

P (X = Y = Z) = (1/n) * (1/n) * (1/n)

P (X = Y = Z) = (1/n)^3

Question 2

What's the chance that all these three numbers take on different values?

*My intuition*

Let v1, v2, v3 be values in the set (1 to n), such that v1 != v2 != v3

Let P (X = v1) be the probability X equals v1

Let P (Y = v2) be the probability Y equals v2

Let P (Z = v3) be the probability Z equals v3

P (X != Y != Z) = P (X = v1) * P (Y = v2) * P (Z = v3)

P (X != Y != Z) = (1/n) * (1 - (1/n)) * (1 - (1/n)^2)

Question 3

What's the expected number of different values?

*My intuition*

Let N be the number of different values X, Y, Z can take

Range of N = (1, 2,..., n)

E[N] = [N * P (X = v1)] + [(N - 1) * P (Y = v2)] + [(N - 2) * P (Z = v3)]

I'm not quite sure of the 2nd and 3rd, but I'm hoping that I'm not that far off.

Any help would be really appreciated.

Thanks a lot.