{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assignment 3 solutions v2-3_minusProb4

Assignment 3 solutions v2-3_minusProb4 - CE93-Engineering...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CE93-Engineering Data Analysis Mark Hansen, Fall 2009 Assignment 3 Solutions 1. Problem 3.5 in Ross. a) Outcomes: b) {1100,1101,1110,1111,0011,0111,1011}= c) {0000,0101,0001,0100}= 2. Problem 3.12 in Ross. P(E)=0.9, P(F)=0.9 Show that the is at a minimum when event E and event F overlap as little as possible, i.e. . Therefore the minimum that can be is 1-0.2=0.8. when is at a maximum when event E and event F overlap as much as possible, i.e. when . Therefore the maximum that can be is 1-0.1=0.9. Generally, ↔ , where S is the sample space. ↔ 1 CE93-Engineering Data Analysis Mark Hansen, Fall 2009 3. Container ships direction and speed. a. Draw the sample space for the ships’ speeds and directions. b. Identify the following events within the sample space in (a). i. ii. iii. ; ; ; CE93-Engineering Data Analysis iv. , and v. . c. Make new drawings to show the following: i. ; Mark Hansen, Fall 2009 CE93-Engineering Data Analysis ii. , and iii. Among , and Mark Hansen, Fall 2009 - null. , and , which pairs of events are mutually exclusive? are mutually exclusive because their spaces do not overlap. Alternatively, you can use the polar coordinate system to express the sample space or each event. For example, sample space in the polar coordinate is as below: 5. Travel between cities A and B a. Sample space of travel conditions Event E includes situations 1, 2, 3, 4, 5, 6, 7, 9, 12 in S. b. c. Travel from city A to city B is not available when at least one among Highway 1, Tunnel and Highway 2 is closed and Highway 3 is closed. CE93-Engineering Data Analysis Mark Hansen, Fall 2009 6. Code in Assignment 3 solution_q6. S S5 A A B B C, S C C, S A B AC BC CC C), S AB C, S A C B C, S1=find((density>2430|strength>55)|ratio>25000) S2=find(density>2430|(strength>55|ratio>25000)) S3=find((density>2430&strength>55)|ratio>25000) S4= find((density>2430| ratio>25000)&( strength>55| ratio>25000)) S5= [4;30;39] (<- complement of S1) S6= find(density<=2430& strength<=55& ratio<=25000) compare.m %% comapre two vectors and return comparison result. %% Two vectors are same When the number of matches of two vectors are equal to the length of each vector function [result]=compare(a,b) myCount=0; % variable to record number of matches result='0'; for n=1:length(a), myCount=myCount+sum(b==a(n)); end if((myCount==length(a))&(myCount==length(b))) result='two vectors are same'; else result='two vectors are different'; end If we apply compare.m for (S1,S2), (S3,S4) and (S5,S6), then The results are as follows: >> compare(S1,S2) ans = two vectors are same >> compare(S3,S4) CE93-Engineering Data Analysis ans = two vectors are same >> compare(S5,S6) ans = two vectors are same Another code to find matches: B=0 for n=1:length(S1), for m=1:length(S2), if S1(n,1)-S2(m,1)==0 B=B+1; else B=B+0; end; end; end; Mark Hansen, Fall 2009 ...
View Full Document

{[ snackBarMessage ]}