CS395T/CAM383M Computational Statistics > HW 5 Nathan Homework
 User Name Remember Me? Password
 Register FAQ Calendar Search Today's Posts Mark Forums Read

 Thread Tools Display Modes
#1
03-06-2011, 12:20 AM
 nclement Member Join Date: Jan 2011 Posts: 13
Nathan Homework

Attached is Problem 1

Here is the code for Problem 2:
Code:
```load hw5_data.txt;
mu = mean(hw5_data)'
sigma = cov(hw5_data)
chival = @(x) (x-mu)'*inv(sigma)*(x-mu);

for i=1:1010,
finChi(i) = chival(hw5_data(i,:)');
end

pvals = 1-chi2cdf(finChi,5);

[sorted_chi, sorted_idx] = sort(pvals);

alpha=0.1;
sorted_idx(sorted_chi<(1:1010)/1010*alpha)```
and the output:
Code:
```>> hw5_code

mu =

0.5778
-0.2151
-0.8231
1.1429
-1.0530

sigma =

4.4106    0.3001   -2.5004   -2.6993    0.2880
0.3001    3.3049   -0.7716   -0.2023    0.7496
-2.5004   -0.7716    4.2323    3.5909   -1.0843
-2.6993   -0.2023    3.5909    3.6902   -0.0307
0.2880    0.7496   -1.0843   -0.0307    4.4111

ans =

Columns 1 through 6

1004        1005        1007        1002        1003         495

Columns 7 through 8

1008        1001```
Attached Images
 hs5Response.pdf (37.6 KB, 391 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 06:48 AM.

 www.wpressutexas.net - Archive - Top

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