Question: Using Matlab, code for the following objectives. We are to calculate a probability problem using the classical approach and also simulate the problem and verify

 Using Matlab, code for the following objectives. We are to calculate

Using Matlab, code for the following objectives.

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 1. 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) 0.5), and then 3 balls are randomly taken from that box with replacement. P(B2) 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)-) 2. 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.5% error? 3. Use at least 5 or more different and increasing number of trials and plot the computed probabilities (for P(2R n 1 G) only) versus the number of trials to view the corresponding trend. The number of trials can be: 1,000, 2,000, 5,000, 10,000, 20,000, 50,000, 100,000, 200,000, 500,000. 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!