Question: USING R Please help with 5A 6 and 7A I was able to do the other ones not listed but not these 5. (a) Use

USING R Please help with 5A 6 and 7A I was able to do the other ones not listed but not these

5. (a) Use simulations to find the minimum number of people that there needs to be in a room in order that there will be at least a 90% probability that at least two were born on the same weekday (of the seven days of the week: Monday, Tuesday, ..., Sunday). (b) Work out the answer to part (a) analytically. 6. Let x be the vector 1:366. Use a nested for loop to estimate, for each value of the vector x[i] = i, the corresponding probability y[i] that there will be at least one common birthday if there are i people in a room (ignore leap years, as usual). Your for loop should create a vector y of the same size as x. Now use the plot command plot(x,y) to draw the graph. Use google to see how to add some labels, change the color of the curve to green, make it thicker, and add a title to the graph. Make any other changes that you think will make the graph look nicer. Your assignement should include all of the code (for loop + the codes to make the graph nicer) as well as the final version of the graph. --- 7. Urn A contains 5 $10 bills, 5 $5 bills, and 5 $1 bills. Urn B contains 9 $20 bills, 3 $5 bills, and 3 $1 bills. A dice is thrown. If it lands on 1,2,3, or 4, two bills are drawn from Urn A (without replacement), Otherwise two bills are drawn from Urn B. Let X = the total value of the bills drawn. (a) Use simulations to estimate E[X]. (b) Use simulations to estimate the conditional probability that Urn B was drawn from if the total value X that was drawn is at most $6. (c) Work out the answers to part (a) and (b) analytically. 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!