William L. answered 06/01/21
MA in Organizational Psychology with 3 Years Experience
Our first question is pretty straightforward. The basic rule of probability is to look at the number of ways something could occur and divide by the total number of things. So for question 1, we only need to look at the base rates of each of the welds.
Question 1: P(cylinder | ~barrel) = P(cylinder) / (P(cylinder) + P(hourglass))
.03 / (.03 + .12) We substitute the values from our base rate
.03 / .15 Combine the terms in parenthesis
1/5 = .20 or 20% Simplify the fraction
For the other questions, it can be really helpful to make a joint-probabilities table. This allows us to account for Bayesian base rates directly rather than at the equation level.
STEP 1: We can figure out the probability of each type not being cracked by subtracting its given value from 1.
Barrel Cylinder Hourglass
Cracked .002 .004 .005
Notcracked .998 .996 .995
STEP 2: We multiply each of the columns by the by type base rate to figure out the joint percentages
Barrel Cylinder Hourglass
Cracked (.002*.85) (.004*.03) (.005 * .12)
Notcracked (.998*.85) (.996*.03) (.995 * .12)
Barrel Cylinder Hourglass
Cracked .0017 .00012 .0006
Notcracked .8483 .02988 .1194
Step 3: find the sum of the rows in order to figure out the probabilities of being cracked vs not cracked
.0017 + .00012 + .0006 = .00242
.8483 + .02988 + .1194 = .99758
Our final table looks like this
Barrel Cylinder Hourglass Prob of Cracked/NotCracked
Cracked .0017 .00012 .0006 .00242
Notcracked .8483 .02988 .1194 .99758
Prob of Type .85 .03 .12
APPLICATION FOR Q2-3
Now I'll show you how to use this table to solve your problems
Question 2: Probability that weld is barrel shaped if it is cracked. Using the rule we established before, the odds of barrel shaped if cracked is the odds of barrel given cracked / odds of being cracked
P(barrel) = (value on the table where cracked and barrel intersect) / (row total for cracked)
P(barrel) = .0017 / .00242
P(barrel) ≈ .70248 or 70.248%
If you'd prefer the more traditional way of solving this it would look something like this.
P(A|B) / (P(A|B) + P(A|~B))
(.85 * .0002) / ((.85 *.0002) + (.03*.004) + (.12 *.005))
(.0017) / (.0017 + .00012 + .0006)
.0017 / .00242
.70248 or 70.248
Question 3: Probability a weld is not cracked.
Question three is one you already answered in making the joint probability table. It's the sum of the probabilities not cracked row. So you could simply take the row margin of .99758 or 99.758%.
Alternatively you can calculate it as the sum of each base rate times 1 - it's probability of being cracked.
Question 4 is solved using the same method as Question 2. You can choose if you want to use the traditional Bayesian Method, or the Joint Probabilities table.