{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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)
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 you’ve 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 different values over which to plot the function ( curve(myfunc,a,b) for different a and b ). Do you notice anything interesting? Explain....
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern