CS395T/CAM383M Computational Statistics  

Go Back   CS395T/CAM383M Computational Statistics > Previous year: Spring, 2010 > Homework Assignments and Student Postings > HW 5

Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2010, 03:42 PM
johnwoods johnwoods is offline
Member
 
Join Date: Jan 2010
Posts: 30
Default John Woods HW5

Compute the expected value of V.

I like thinking of this in terms of the code I wrote in Octave (Matlab). Here it is:

Code:
N = 25
X = randsample(N,N,true)

Yi = @(i) (sum(X == i));

Y = zeros(1,N);
for i=1:N
  Y(i) = Yi(i);
end

V = @() ( sum(Y > 0) );
U = @() ( sum(Y == 0) );

Yi(5)
V()
U()
As you can see, U is the sum of the indicator variables Ij (as defined in the homework assignment). Thus, .

What is the expectation of that indicator variable? It's a boolean, so the expression is . Thus we define .

What is the value for this probability of Aj? The probability of some value i not showing up in a set of 1...N is , so the probability of Aj is that to the Nth power.

Thus, we get .

Since U+V=N, E[U+V]=E[N]=N, and from that, E[U]+E[V]=N. This leaves us with E[V]=N-E[U], which we can write out in its entirety as:


Compute var[V]
First of all, we know from before that . It should also be clear that , unless i=j, in which case it's just P[Aj].

We note that .

Further, we know U, so we can figure out that .

From that, let's get an expectation, and note that .



is trivial to calculate. We can now give an expression for the variance of V:



Bonus
This is the easy part. First of all, 1/N times E[V] is . As N approaches infinity, the term approaches 1 (approach is made more rapid by the exponent). Thus, the limit of the entire expression will be 0.

Last edited by johnwoods; 03-04-2010 at 03:45 PM. Reason: Wanted to save before I added bonus answer.
Reply With Quote
  #2  
Old 05-10-2010, 11:37 AM
jhussmann jhussmann is offline
TA
 
Join Date: Jan 2009
Posts: 76
Default

You should reconsider your reasoning for the bonus question.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:25 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.