Register to reply 
What is Var(X) for my defined X? 
Share this thread: 
#1
Jan1113, 01:20 PM

P: 26

This applies to natural numbers [itex]n[/itex] and [itex]N[/itex] where [itex]n<N[/itex].
We have [itex]N[/itex] balls representing numbers [itex]1,2,...,N[/itex]. We randomly choose [itex]n[/itex] of those balls which happen to represent numbers [itex]{k_1},{k_2},...,{k_n}[/itex]. We then define a random variable [itex]X = {k_1} + {k_2} + ... + {k_n}[/itex]. What is the mean and variation of [itex]X[/itex]? Well there are [itex]\left( {\begin{array}{*{20}{c}}N\\n\end{array}} \right)[/itex] equally likely combinations and every one of them brings [itex]n[/itex] summands. So we get [itex]\left( {\begin{array}{*{20}{c}} N\\ n \end{array}} \right) \cdot n[/itex] summands overall. Since there is no bias towards any particular number it means that every number is added [itex]\left( {\begin{array}{*{20}{c}} N\\ n \end{array}} \right) \cdot \frac{n}{N}[/itex] times hence our mean: [itex]E\left( X \right) = \frac{{\left( {\begin{array}{*{20}{c}} N\\ n \end{array}} \right) \cdot \frac{n}{N} \cdot \left( {1 + 2 + ... + N} \right)}}{{\left( {\begin{array}{*{20}{c}} N\\ n \end{array}} \right)}} = \frac{n}{N} \cdot \frac{{N\left( {N + 1} \right)}}{2} = \frac{{n\left( {N + 1} \right)}}{2}[/itex]. Unfortunately variance seems to be an entirely different animal since I cannot just rip sums apart and add numbers in a different order. Any ideas? 


#2
Jan1113, 03:28 PM

Sci Advisor
P: 6,039

It is a straightforward, but messy, calculation.
Let X = ∑ k_{i}. mean = E(X), var = E(X^{2})  (E(X))^{2} To compute E(X) all you need is E(k_{i}) = N/2. To compute E(X^{2}), some work is required. You need (a) E(k_{i}k_{j}) for i ≠ j, and (b) E(k_{i}^{2}). For (a) I got N(N+1)/4  (2N+1)/6, for (b) I got (N+1)(2N+1)/6. To get the final answers you need to multiply the mean by n. For the second moment {E(X^{2})}, there are n(n1) (a) terms and n (b) terms. Good luck! 


#3
Jan1413, 04:18 PM

Sci Advisor
P: 6,039

In case you weren't able to work it out, I got the following:
E(X) = n(N+1)/2 Var(X) = n(N+1)(Nn)/12 See if you get same. 


#4
Jan1713, 09:16 AM

P: 26

What is Var(X) for my defined X?
So for i≠j you apparently got E(kikj) = N(N+1)/4  (2N+1)/6. Meanwhile I got [tex]E({k_i}{k_j}) = \frac{1}{{\left( {\begin{array}{*{20}{c}} N\\ 2 \end{array}} \right)}}\sum\limits_{i = 1}^{N  1} {i \cdot \sum\limits_{j = i + 1}^N j } = \frac{2}{{N(N  1)}}\sum\limits_{i = 1}^{N  1} {i \cdot \frac{{(N + i + 1)(N  i)}}{2}} = \frac{{N(N + 1)}}{2} + \frac{{1  2N}}{6} + \frac{{N(1  N)}}{4}[/tex] Is my logic flawed here? Also I checked the literature for answers and can confirm that your conclusion about mean and variation is correct. 


#5
Jan1713, 03:57 PM

Sci Advisor
P: 6,039

i(Ni+1)(Ni)/2. I'll let you finish from there. In any case I got E(X^{2}) = n(n1)(N+1)(3N+2)/12 + n(N+1)(2N+1)/6, where the first term is the contribution of all products of different numbers and the second term is the contribution of all the squares. 


#6
Jan1713, 04:58 PM

P: 26

(i+1)+(i+2)+(i+3)...+(N2)+(N1)+N = (N+i+1)(Ni)/2 Sorry if I missed something. P.S. http://www.wolframalpha.com/input/?i...i%3D1%2CN1%29 it gives the same result as mine so I'm confused now, is it the wrong way to calculate E(kikj) ? 


#7
Jan1813, 07:10 PM

Sci Advisor
P: 6,039

Sorry  I sometimes get sloppy in my arithmetic (Jan. 11  my error was in dividing by N(N+1) when I should have
divided by (N1)N), including my comment saying you had an error. However the calculation on Jan. 14 was done very carefully (where I divided by N(N1)). This included the result I mentioned yesterday. I can't figure out why yours comes out differently. My calculation  E(X_{i}X_{j}) = {(∑i)^{2}  ∑i^{2}}/N(N1), where the sums are i = (1,N). 


#8
Jan1813, 07:35 PM

Sci Advisor
P: 6,039

One quick check, for N = 2, the product of different x's ≡ 2, so the expectation is obviously 2.
In any case, your result is the same as mine. 


#9
Jan2013, 03:22 PM

P: 26

Thanks for all the help.
To sum things up I'd just like to say that I almost got it right after your first post. Unfortunately I made a very silly mistake at the very end. Which in turn led to a whole phase of contemplation and doubts. I attach that almostcorrect handwritten solution just for fun. Differences in notation: E(X)=M(X), Var(X)=D(X), X=W. 


Register to reply 
Related Discussions  
How is 12 am defined?  General Discussion  9  
Show that matrices of defined form have inverse of the same same defined form  Calculus & Beyond Homework  2  
Welldefined map  Calculus & Beyond Homework  2  
How is 0^0 defined?  General Math  15  
1/0 defined  General Math  2 