Question
Question: The variance of the first n natural numbers is A. \(\dfrac{{n\left( {n + 1} \right)}}{{12}}\) B....
The variance of the first n natural numbers is
A. 12n(n+1)
B. 12(n+1)(n+5)
C. 12(n+1)(n−1)
D. 12n(n−5)
Solution
Use the definition of variance and var(X)=E((X−μ)2) where μ=E(X). Use linearity of expression to prove that var(X)=E(X2)−[E(X)]2.
Using formula form the sum of squares of first n natural numbers and the sum of first n natural number to find the individual terms in the expression for var(X), r=1∑nr2=6n(n+1)(2n+1) and r=1∑nr=2n(n+1).
Complete step by step solution:
We know that
var(X)=E((X−μ)2)
Using the formula, (a−b)2=a2+b2−2ab, we get,
⇒var(X)=E(X2+μ2−2Xμ)
Now we know that
E(X+Y)=E(X)+E(Y)
Using the above formula, we get
⇒var(X)=E(X2)+E(μ2)+E(−2Xμ)
We know that E(aX)=aE(X) and E(a)=a, we get
⇒var(X)=E(X2)+μ2−2μE(X)
Substitute μ=E(X) in the above equation,
⇒var(X)=E(X2)+(E(X))2−2E(X)E(X)
Simplify the terms,
⇒var(X)=E(X2)−[E(X)]2 ….. (1)
We know that,
E(f(X))=r∈S∑P(X=r)f(r)
Substitute X in place of f(X),
⇒E(X)=r=1∑nP(X=r)r
Simplify the term,
⇒E(X)=r=1∑nn1×r
Take constant part out of the summation,
⇒E(X)=n1r=1∑nr
Use r=1∑nr=2n(n+1), we get
⇒E(X)=n1×2n(n+1)
Cancel out the common factors,
⇒E(X)=2(n+1) ….. (2)
Now, substitute X2 in place of f(X),
⇒E(X2)=r=1∑nP(X=r)r2
Simplify the term,
⇒E(X2)=r=1∑nn1×r2
Take constant part out of the summation,
⇒E(X2)=n1r=1∑nr2
Use r=1∑nr2=6n(n+1)(2n+1), we get
⇒E(X2)=n1×6n(n+1)(2n+1)
Cancel out the common factors,
⇒E(X2)=6(n+1)(2n+1) ….. (3)
Substitute the values from equation (2) and (3) in equation (1),
⇒var(X)=6(n+1)(2n+1)−(2n+1)2
Simplify the terms,
⇒var(X)=6(n+1)(2n+1)−4(n+1)2
Take LCM of the terms,
⇒var(X)=122(n+1)(2n+1)−3(n+1)2
Take 12n+1 common from both terms,
⇒var(X)=12(n+1)[2(2n+1)−3(n+1)]
Simplify the terms in the bracket,
⇒var(X)=12(n+1)[4n+2−3n−3]
Subtract the like terms,
⇒var(X)=12(n+1)(n−1)
Using (a+b)(a−b)=a2−b2, we get
⇒var(X)=12n2−1
Use the formula, a2−b2=(a+b)(a−b) to factor the numerator,
∴var(X)=12(n+1)(n−1)
So, the correct answer is “Option C”.
Note: Here in this type of question students get confused in the calculation parts of variance. Sometimes students take the series of n natural numbers as arithmetic progression and apply the formula of a sum of n natural numbers instead of doing variance. Solve the question step by step for getting the correct answer. In the second part of the variance there are squares, so do not forget to do the square at the end of the solution of the second part.