116k views
2 votes
The n candidates for a job have been ranked 1, 2, 3,..., n. Let X 5 the rank of a randomly selected candidate, so that X has pmf p(x)551yn x51,2,3,...,n 0 otherwise (this is called the discrete uniform distribution). Compute E(X) and V(X) using the shortcut formula. [Hint: The sum of the first n positive integers is n(n 1 1)y2, whereas the sum of their squares is n(n 1 1)(2n 1 1)y6.]

1 Answer

7 votes

Question:

The n candidates for a job have been ranked 1, 2, 3,..., n. Let x = rank of a randomly selected candidate, so that x has pmf:


p(x) = \left \{ {{(1)/(n)\ \ x=1,2,3...,n} \atop {0\ \ \ Otherwise}} \right.

(this is called the discrete uniform distribution).

Compute E(X) and V(X) using the shortcut formula.

[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)

Answer:


E(x) = (n+1)/(2)


Var(x) = (n^2 -1)/(12) or
Var(x) = ((n+1)(n-1))/(12)

Explanation:

Given

PMF


p(x) = \left \{ {{(1)/(n)\ \ x=1,2,3...,n} \atop {0\ \ \ Otherwise}} \right.

Required

Determine the E(x) and Var(x)

E(x) is calculated as:


E(x) = \sum \limits^(n)_(i) \ x * p(x)

This gives:


E(x) = \sum \limits^(n)_(x=1) \ x * (1)/(n)


E(x) = \sum \limits^(n)_(x=1) (x)/(n)


E(x) = (1)/(n)\sum \limits^(n)_(x=1) x

From the hint given:


\sum \limits^(n)_(x=1) x =(n(n +1))/(2)

So:


E(x) = (1)/(n) * (n(n+1))/(2)


E(x) = (n+1)/(2)

Var(x) is calculated as:


Var(x) = E(x^2) - (E(x))^2

Calculating:
E(x^2)


E(x^2) = \sum \limits^(n)_(x=1) \ x^2 * (1)/(n)


E(x^2) = (1)/(n)\sum \limits^(n)_(x=1) \ x^2

Using the hint given:


\sum \limits^(n)_(x=1) \ x^2 = (n(n +1)(2n+1))/(6)

So:


E(x^2) = (1)/(n) * (n(n +1)(2n+1))/(6)


E(x^2) = ((n +1)(2n+1))/(6)

So:


Var(x) = E(x^2) - (E(x))^2


Var(x) = ((n+1)(2n+1))/(6) - ((n+1)/(2))^2


Var(x) = ((n+1)(2n+1))/(6) - (n^2+2n+1)/(4)


Var(x) = (2n^2 +n+2n+1)/(6) - (n^2+2n+1)/(4)


Var(x) = (2n^2 +3n+1)/(6) - (n^2+2n+1)/(4)

Take LCM


Var(x) = (4n^2 +6n+2 - 3n^2 - 6n - 3)/(12)


Var(x) = (4n^2 - 3n^2+6n- 6n +2 - 3)/(12)


Var(x) = (n^2 -1)/(12)

Apply difference of two squares


Var(x) = ((n+1)(n-1))/(12)

User Nubela
by
4.4k points