Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago