DA 2 - Probability and Simulation

.docx

School

Oregon State University, Corvallis *

*We aren’t endorsed by this school

Course

314

Subject

Geology

Date

Feb 20, 2024

Type

docx

Pages

3

Uploaded by MajorFlowerShark29

Report
ST 314 Data Analysis 2 Probability and Simulation Question 1 heads tails 57 43 Question 2 sim_unfair_coin heads tails 22 78 Question 3 > die <- c("one", "two", "three", "four", "five", "six") > roll <- sample(die, 10, replace=TRUE) > table(roll) roll five four one six three two 2 1 1 3 2 1 Question 4 > sim_uf_die <- sample(die, size=10, replace=TRUE, prob=c(.1,.2,.3,.1,.2,.1)) > sim_uf_die [1] "six" "three" "three" "two" "three" "three" "five" "four" "two" [10] "three" > table(sim_uf_die + ) sim_uf_die five four six three two 1 1 1 5 2 one=10%, two=20%, three=30%, four= 10%, five= 20%, six=10% Question 5
ST 314 Data Analysis 2 a. .2125 > P_Ordering2_Granite <- .25 > P_Ordering2_Basalt <- .2 > P_Granite <- .25 > P_Basalt <- .75 > P_Ordering2 <- P_Ordering2_Granite * P_Granite + P_Ordering2_Basalt * P_Basalt > print(P_Ordering2) [1] 0.2125 b. .7059 P(B|Ordering 2)= (P(Ordering 2|B) * P(B))/P(Ordering 2) P(B|Ordering 2)= (.2x.75)/.2125 P(B|Ordering 2)= .7059 c. .225, .6667,.3333 P(Ordering 1) = P(Ordering 1|G) * P(G) + P(Ordering 1|B) * P(B) P(Ordering 1)= .6*.25+.1*.75 P(Ordering 1) = .225 P(G|Ordering 1)= (P(Ordering 1|G) * P(G))/P(Ordering 1) P(G|Ordering 1)= (.6*.25)/.225 P(G|Ordering 1)= .6667 P(B| Ordering 1) = (P(Ordering 1|B) * P(B))/P(Ordering 1) P(B| Ordering 1) = .1*.75/.225 P(B|Ordering 1)= .3333 Question 6 a. .75 b. .25 c. .45 d. .1 e. .3077
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help