Question: Matlab coding problem with statistics. with replacement means the balls are put back after they get taken out We are to calculate a probability problem

Matlab coding problem with statistics. "with replacement" means the balls are put back after they get taken out

Matlab coding problem with statistics. "with replacement" means the balls are put

We are to calculate a probability problem using the classical approach and also simulate the problem and verify the results using the frequency or empirical approach. Suppose there are two boxes; in box 1 there are 3 times more green balls than red balls, and in box 2 there are 5 red balls and 8 green ones, we choose one of the boxes at random (P(B1) = P(82) = 0.5), and then 3 balls are randomly taken from that box with replacement. 1. Compute the following probabilities: a) The probability that 2 red balls and 1 green ball are selected (P(2R n 1G) -?) b) If all 3 balls are green what is the probability that box 1 was chosen (P(B113G)-?) To verify your calculations in part 1, simulate each of the scenarios using Matlab. Start with smaller (1000) trials and increase exponentially (10000, 100000, and 1000000) to determine the trend of the results. Find which large number or higher gives less than 0.005% error? 2. Use at least 10 or more different and increasing number of trials and plot the computed probabilities versus the number of trials to view the corresponding trend. 3. Include your calculations, scripts, graphs, and a brief conclusion in your report We are to calculate a probability problem using the classical approach and also simulate the problem and verify the results using the frequency or empirical approach. Suppose there are two boxes; in box 1 there are 3 times more green balls than red balls, and in box 2 there are 5 red balls and 8 green ones, we choose one of the boxes at random (P(B1) = P(82) = 0.5), and then 3 balls are randomly taken from that box with replacement. 1. Compute the following probabilities: a) The probability that 2 red balls and 1 green ball are selected (P(2R n 1G) -?) b) If all 3 balls are green what is the probability that box 1 was chosen (P(B113G)-?) To verify your calculations in part 1, simulate each of the scenarios using Matlab. Start with smaller (1000) trials and increase exponentially (10000, 100000, and 1000000) to determine the trend of the results. Find which large number or higher gives less than 0.005% error? 2. Use at least 10 or more different and increasing number of trials and plot the computed probabilities versus the number of trials to view the corresponding trend. 3. Include your calculations, scripts, graphs, and a brief conclusion in your report

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!