CS395T/CAM383M Computational Statistics > HW 5 Hw5
 Register FAQ Calendar Search Today's Posts Mark Forums Read

#1
05-12-2011, 11:16 AM
 Yanan Member Join Date: Jan 2011 Posts: 15
Hw5

Proof for Problem 1 is attached. Code for Problem 2.
Code:
[N,M] = size(data);

% mu and sigma
mu = mean(data);
sigma = cov(data);

%chi-square and p-value
chi2 = zeros(N,1);
p = zeros(N,1);
for i = 1:N
chi2(i) = (data(i,:)-mu)*inv(sigma)*(data(i,:)-mu)';
p(i) = 1-chi2cdf(chi2(i),5);
end

%FDR
[rank, index] = sort(p);
alpha = 0.1;
rej = [];
j = 1;
for i = 1:N
if p(index(i)) < i*alpha/N
rej(j) = index(i);
j = j+1;
end
end
Attached Images
 hw5.sol.pdf (281.7 KB, 911 views)

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home CS395T/CAM383M (Spring 2011) Course Administration     Announcements (click here and read!)     Basic Course Information     Supplementary Materials CS395T/CAM383M (Spring 2011) Lectures and Student Participation     Lecture Slides     Other Topics and Student Contributions     Homework Assignments and Student Postings         HW 1         HW 2         HW 3         HW 4         HW 5         HW 6     Student Term Projects Previous year: Spring, 2010     Announcements     Basic Course Information     Supplementary Materials     Lecture Slides     Other Topics and Student Contributions     Homework Assignments and Student Postings         HW 1         HW 2         HW 3         HW 4         HW 5         HW 6     Student Term Projects Previous year: Spring, 2009     Basic Course Information     Supplementary Materials     Lecture Slides     Student Term Projects

All times are GMT -6. The time now is 01:24 PM.

 www.wpressutexas.net - Archive - Top