Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 {10 marks) Let 11' be the probability of success for a Bernoulli trial. Let X be the number of Wbtained to obtain 3*
Question 2 {10 marks) Let 11' be the probability of success for a Bernoulli trial. Let X be the number of Wbtained to obtain 3* successes. X is said to follow a negative binomial distribution with parameters 1' and 11'. i+rl rl Pr(X=i)=( )nruw)', i=0,1,2,... (a) Construct an algorithm to sample from the above distribution and implement it in R for 1r = 0.5 and r = 2. You should write the algorithm in your answer. (b) Generate 100, 000 samples and compute the sample mean. ((3) Rport the estimated Pr(X = i) from your sampled values for i = 0, . . . , 15
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started