Assign 3 - approxprob = 1 - 1/exp(1) approxprob (a) Plot...

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

View Full Document Right Arrow Icon
Math 151, Spring 2011 Jo Hardin HW #3 Homework due on Thursday, February, 3rd, start of class. 1. DeGroot (3 rd or 4 th ed.), section 1.9: # 1, 4, 6, 7, 9 2. DeGroot (3 rd or 4 th ed.), section 1.10: # 4, 5, 7, 9(explain) 3. Additional problem in R: Consider the matching problem discussed in class (also in section 1.10 of your book). We’d like to see how quickly the probability of at least one match converges to the approximate probability: (1 - 1 /e ). myfun = function(x){ prob=c() for (i in 1:length(x)) { prob[i]=sum(exp(-lfactorial(1:x[i]))*(-1)^((1:x[i])+1)) } return(prob) } curve(myfun, 1, 10)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: approxprob = 1 - 1/exp(1) approxprob (a) Plot the probability of at least one match for n = 1 to 100. Comment on your plot and the convergence. (b) Explain why I say approximate to describe the quantity (1-1 /e ) and why the plot youve created is exact for each value of n . That is, explain what is approximating what. (c) Investigate the behavior of the function by zooming in on the plot. Try dierent values over which to plot the function ( curve(myfunc,a,b) for dierent a and b ). Do you notice anything interesting? Explain....
View Full Document

Ask a homework question - tutors are online