#1




HW5 solutions
Thanks for any comments in advance!

#2




Meiyen,
Nice job! A couple comments about your matlab code: * corr(data) produces a correlation matrix. Instead, you want cov(data). Apparently there are a couple uses of inv(corr(data)) [1], but it's not what you want. * A more elegant decision loop might be: Code:
for j = 1:nData if(pV(j) >= (j/nData)*alpha) break end end rejected = pI(1:j1); By the way, fprintf without a file identifier prints to screen. Personally, I like it more than using sprintf. Last edited by ilevy; 03062011 at 08:28 PM. 
#3




Meiyen, could you explain why you mentioned "moment generation function" in your proof? How did you get them? Are they useful for proving the result? since I think the proof is good even without it... Thanks

#4




Correction of my code
Thanks for pointing out the bug in my code. I have corrected it and resubmit the corrected version of answer. In addition, I've done the Bonferroni correction and it detected these 6 data points that may be impostered:
495 1002 1003 1004 1005 1007 
#5




I was thinking to use the moment generation function to prove that the sum of y^2 is a chisquare distribution with N degree of freedom since the function is unique for every distribution.... That's why I included it.

#6




Oh, I see what you tried to say is slide 8 and 9 in lecture 10, proof for the "statistic" chisquare is distributed as Chisquare. Thanks for reminding me this...
But there is a mistake in stating that "squared normal random variable is distributed as Chisquare". I mean, the "statistic" chisquare is the sum of squares of n independent tvalues, instead of the random variables. i.e. here y_i should be seen as tvalue of y_i since it's from N(0,1). 
Thread Tools  
Display Modes  

