There are 4 balls in a jar (2 black and 2 white). You randomly choose three balls (one by one with no replacement) and paint them according to one of the following methods (a-c) and replace them in the jar. You ask your friend to pick a ball. What is the probability that this ball is white? a. You paint them all black. b. You paint them all the same color as the first ball that is picked c. You look at the majority color (among the 3 selected ones) and paint them all that color. Write a MATLAB code to simulate each of the above 3 cases in MATLAB for 10,000 times and estimate the probability of getting a white ball in each of those cases

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter17: Markov Chains
Section: Chapter Questions
Problem 12RP
icon
Related questions
Question

There are 4 balls in a jar (2 black and 2 white). You randomly choose three balls (one by one with no replacement) and paint them according to one of the following methods (a-c) and replace them in the jar. You ask your friend to pick a ball. What is the probability that this ball is white?

a. You paint them all black.

b. You paint them all the same color as the first ball that is picked

c. You look at the majority color (among the 3 selected ones) and paint them all that color.

Write a MATLAB code to simulate each of the above 3 cases in MATLAB for 10,000 times and estimate the probability of getting a white ball in each of those cases

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Probability Problems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole