86.9k views
3 votes
The n candidates for a job have been ranked 1, 2, 3, . . . , n. Let X be the rank of a randomly selected candidate, so the X has the pmf p(x) =    1/n, if x = 1, 2, 3 . . . n, 0, otherwise. This is called the discrete uniform distribution. Compute E(X) and Var(X). (Hint: the sum of the first n positive integers is n(n + 1)/2, whereas the sum of their squares is n(n + 1)(2n + 1)/6.)

User Chochim
by
7.6k points

2 Answers

4 votes

By definition of expectation,


\displaystyle E[X]=\sum_xx\,P(X=x)=\sum_(x=1)^n\frac xn=(n(n+1))/(2n)=\boxed{\frac{n+1}2}

and variance,


V[X]=E[(X-E[X])^2]=E[X^2-2X\,E[X]+E[X]^2]=E[X^2]-E[X]^2

Also by definition, we have


E[f(X)]=\displaystyle\sum_xf(x)\,P(X=x)

so that


E[X^2]=\displaystyle\sum_(x=1)^n\frac{x^2}n=(n(n+1)(2n+1))/(6n)=\frac{(n+1)(2n+1)}6

and finally,


V[X]=\frac{(n+1)(2n+1)}6-\frac{(n+1)^2}4=\boxed{(n^2-1)/(12)}

User Lightlike
by
8.0k points
6 votes

Answer:


(n^(2) - 1 )/(12)

Explanation:

Data:

We collect the variables and simplify the result:

E[X] =
\SIGMA \\Σ x · p(x) =
(1)/(n)= ....

E[X²] =∑ x²· p(x) = ∑x²·
(1)/(n) = ....

Var [X] = E[X²] - E[X]² = ...

We then use the identities:

∑x =
(n(n+1))/(2) and ∑ x² =
(n(n+1)(2n+1))/(6)

simplifying the identities above gives:


(n^(2-1) )/(12)

User Crismely
by
8.4k points