Sign In
Consider using a Venn diagram.
Use Venn diagrams to find out how many times we are adding each region.
P(Aor BorC) = P(A) + P(B) + P(C)
P(A or BorC) = P(A) + P(B) + P(C)-P(A and B) - P(B and C) - P(A and C) + P(A and BandC)
We are asked to write a general rule to find P(Aor B orC) for disjoint events A, B, and C. Let's look at the Venn diagram of three disjoint events.
We can see that these events do not share any area in the Venn diagram. Therefore, similar to the probability of Aor B, we can find the probability of Aor BorC by adding each individual probability. P(Aor BorC) = P(A) + P(B) + P(C)
Now we are asked to write a general rule to find P(Aor B orC) for overlapping events A, B, and C. Let's look at the Venn diagram of three overlapping events.
We can see that there are several overlapping sections. To find the probability of P(Aor B orC), we need to add the probabilities of each region of the diagram only once. We know
We can see that P(A and BandC) has not been added yet. Therefore, we will add this probability to complete our rule. P(A or BorC) = P(A) + P(B) + P(C) -P(A and B)-P(B and C) -P(A and C) + P(A and BandC) Finally, let's add this to our diagram. <jsxgpre id="Solution_96823_3" static=0> var b = mlg.board([-6, 5, 6, -6], {desktopSize:'medium', style:'usa'}); var aux =0; var buttons = []; var txtA = b.txt(-1.5,4.4,"P(A)",{color:"transparent"}); var txtB = b.txt(0,4.4,"+P(B)",{color:"transparent"}); var txtC = b.txt(1.6,4.4,"+P(C)",{color:"transparent"}); var txtAB = b.txt(-3,3.7,"-P(A\\text{ and }B)",{color:"transparent"}); var txtBC = b.txt(0,3.7,"-P(B\\text{ and }C)",{color:"transparent"}); var txtCA = b.txt(3,3.7,"-P(A\\text{ and }C)",{color:"transparent"}); var txtABC = b.txt(0,3,"+P(A\\text{ and }B\\text{ and }C)",{color:"transparent"}); /* This is the part where all values can be set */
/* setting some values */
var fs = 1; /* fonsize */
var op = 0.2; /* fill opacity */
var borderColor = 'gray';
/* setting the colors of the regions
use 'transparent' if no color is needed */
var optionsA = {fillColor:'transparent',fillOpacity:op,borders:{visible:false}};
var optionsB = {fillColor:'transparent',fillOpacity:op,borders:{visible:false}};
var optionsC = {fillColor:'transparent',fillOpacity:op,borders:{visible:false}};
var optionsAB = {fillColor:'transparent',fillOpacity:op,borders:{visible:false}};
var optionsBC = {fillColor:'transparent',fillOpacity:op,borders:{visible:false}};
var optionsCA = {fillColor:'transparent',fillOpacity:op,borders:{visible:false}};
var optionsABC = {fillColor:'transparent',fillOpacity:op,borders:{visible:false}};
/* setting the values to be written in the regions */
var valueA = ;
var valueB = ;
var valueC = ;
var valueAB = ;
var valueBC = ;
var valueCA = ;
var valueABC = ;
var valueABCout = ;
/* setting the names of the circles */
var textA = 'A';
var textB = 'B';
var textC = 'C';
/* No need to change anything beyond this point.
The rest of the code uses the values set above */
/* frame */
b.rectangle([-5.5,-4.2],[5.5,2.5],{borders:{strokeColor:borderColor}});
b.txt(4,-3,valueABCout,{fontsize:fs});
/* drawing the circles */
b.circle([1,0],[-1,0],{strokeColor:borderColor, strokeWidth:2});
b.circle([-1,0],[1,0],{strokeColor:borderColor, strokeWidth:2});
b.circle([0,-1.732],[-2,-1.732],{strokeColor:borderColor, strokeWidth:2});
/* border curve definitions */
var Bu = b.func('(2^2-(x-1)^2)^(1/2)',{xMin:0,xMax:3,firstArrow:false,lastArrow:false,opacity:0});
var Bd = b.func('-(2^2-(x-1)^2)^(1/2)',{xMin:2,xMax:3,firstArrow:false,lastArrow:false,opacity:0});
var Au = b.func('(2^2-(x+1)^2)^(1/2)',{xMin:-3,xMax:0,firstArrow:false,lastArrow:false,opacity:0});
var Ad = b.func('-(2^2-(x+1)^2)^(1/2)',{xMin:-3,xMax:-2,firstArrow:false,lastArrow:false,opacity:0});
var ABu = b.func('(2^2-(x-1)^2)^(1/2)',{xMin:-1,xMax:0,firstArrow:false,lastArrow:false,opacity:0});
var ABd = b.func('-(2^2-(x-1)^2)^(1/2)',{xMin:-1,xMax:0,firstArrow:false,lastArrow:false,opacity:0});
var BAu = b.func('(2^2-(x+1)^2)^(1/2)',{xMin:0,xMax:1,firstArrow:false,lastArrow:false,opacity:0});
var BAd = b.func('-(2^2-(x+1)^2)^(1/2)',{xMin:0,xMax:1,firstArrow:false,lastArrow:false,opacity:0});
var CA = b.func('-(2^2-(x+1)^2)^(1/2)',{xMin:-2,xMax:0,firstArrow:false,lastArrow:false,opacity:0});
var CB = b.func('-(2^2-(x-1)^2)^(1/2)',{xMin:0,xMax:2,firstArrow:false,lastArrow:false,opacity:0});
var Cd = b.func('-(2^2-x^2)^(1/2)-1.732',{xMin:-2,xMax:2,firstArrow:false,lastArrow:false,opacity:0});
var Cu = b.func('(2^2-x^2)^(1/2)-1.732',{xMin:-1,xMax:1,firstArrow:false,lastArrow:false,opacity:0});
var AC = b.func('(2^2-x^2)^(1/2)-1.732',{xMin:-2,xMax:-1,firstArrow:false,lastArrow:false,opacity:0});
var BC = b.func('(2^2-x^2)^(1/2)-1.732',{xMin:1,xMax:2,firstArrow:false,lastArrow:false,opacity:0});
/* set A */
var setA = b.traceCurve([
[Au,-3], Au, [Au,0],
[ABu,0], ABu, [ABu,-1],
[AC,-1], AC, [AC,-2],
[Ad,-2], Ad, [Ad,-3],
], optionsA);
b.txt(-1.866,0.5,valueA,{fontsize:fs});
b.txt(-2.41,1.41,textA,{mathMode:false, fontsize:fs, anchorY:'bottom', anchorX:'right'});
/* set B */
var setB = b.traceCurve([
[Bu,3], Bu, [Bu,0],
[BAu,0], BAu, [BAu,1],
[BC,1], BC, [BC,2],
[Bd,2], Bd, [Bd,3],
], optionsB);
b.txt(1.866,0.5,valueB,{fontsize:fs});
b.txt(2.41,1.41,textB,{mathMode:false, fontsize:fs, anchorY:'bottom', anchorX:'left'});
/* set C */
var setC= b.traceCurve([
[Cd,-2], Cd, [Cd,2],
[CB,2], CB, [CB,0],
[CA,0], CA, [CA,-2],
], optionsC);
b.txt(0,-2.732,valueC,{fontsize:fs});
b.txt(-1.41,-3.15,textC,{mathMode:false, fontsize:fs, anchorY:'top', anchorX:'right'});
/* set AB */
var setAB = b.traceCurve([
[ABu,-1], ABu, [ABu,0],
[BAu,0], BAu, [BAu,1],
[Cu,1], Cu, [Cu,-1],
], optionsAB);
b.txt(0,0.8,valueAB,{fontsize:fs});
/* set BC */
var setBC = b.traceCurve([
[BAd,0], BAd, [BAd,1],
[BC,1], BC, [BC,2],
[CB,2], CB, [CB,0],
], optionsBC);
b.txt(1.25,-1.25,valueBC,{fontsize:fs});
/* set CA */
var setCA = b.traceCurve([
[ABd,0], ABd, [ABd,-1],
[AC,-1], AC, [AC,-2],
[CA,-2], CA, [CA,0],
], optionsCA);
b.txt(-1.25,-1.25,valueCA,{fontsize:fs});
/* set ABC */
var setABC = b.traceCurve([
[BAd,0], BAd, [BAd,1],
[Cu,1], Cu, [Cu,-1],
[ABd,-1], ABd, [ABd,0],
], optionsABC);
b.txt(0,-0.57,valueABC,{fontsize:fs});
/*****************************************************. */
var cntA = b.node(-2.41,0.5,{name:'0',label:{color:"black",position:"m",fontsize:fs}});
var cntB = b.node(2.41,0.5,{name:'0',label:{color:"black",position:"m",fontsize:fs}});
var cntC = b.node(0,-3.15,{name:'0',label:{color:"black",position:"m",fontsize:fs}});
var cntAB = b.node(0,0.8,{name:'0',label:{color:"black",position:"m",fontsize:fs}});
var cntBC = b.node(1.25,-1.25,{name:'0',label:{color:"black",position:"m",fontsize:fs}});
var cntCA = b.node(-1.25,-1.25,{name:'0',label:{color:"black",position:"m",fontsize:fs}});
var cntABC = b.node(0,-0.57,{name:'0',label:{color:"black",position:"m",fontsize:fs}});
var button1 = function(){
if(aux==0){
b.setAttribute(txtA,{color:"black"});
b.setAttribute(setA,{fillColor:"yellow",fillOpacity:0.3});
b.setAttribute(setAB,{fillColor:"yellow",fillOpacity:0.3});
b.setAttribute(setCA,{fillColor:"yellow",fillOpacity:0.3});
b.setAttribute(setABC,{fillColor:"yellow",fillOpacity:0.3});
b.setAttribute(cntA,{name:'1',label:{color:"black"}});
b.setAttribute(cntAB,{name:'1',label:{color:"black"}});
b.setAttribute(cntCA,{name:'1',label:{color:"black"}});
b.setAttribute(cntABC,{name:'1',label:{color:"black"}});
buttons[0].deselect();
}
if(aux==1){
b.setAttribute(txtB,{color:"black"});
b.setAttribute(setB,{fillColor:"blue",fillOpacity:0.3});
b.setAttribute(setAB,{fillColor:"green",fillOpacity:0.6});
b.setAttribute(setBC,{fillColor:"blue",fillOpacity:0.3});
b.setAttribute(setABC,{fillColor:"green",fillOpacity:0.6});
b.setAttribute(cntB,{name:'1',label:{color:"black"}});
b.setAttribute(cntAB,{name:'2',label:{color:"black"}});
b.setAttribute(cntBC,{name:'1',label:{color:"black"}});
b.setAttribute(cntABC,{name:'2',label:{color:"black"}});
}
if(aux==2){
b.setAttribute(txtC,{color:"black"});
b.setAttribute(setA,{fillColor:"yellow",fillOpacity:0.3});
b.setAttribute(setB,{fillColor:"blue",fillOpacity:0.3});
b.setAttribute(setC,{fillColor:"red",fillOpacity:0.3});
b.setAttribute(setAB,{fillColor:"green",fillOpacity:0.6});
b.setAttribute(setBC,{fillColor:"purple",fillOpacity:0.6});
b.setAttribute(setCA,{fillColor:"orange",fillOpacity:0.6});
b.setAttribute(setABC,{fillColor:"grey",fillOpacity:0.9});
b.setAttribute(cntC,{name:'1',label:{color:"black"}});
b.setAttribute(cntCA,{name:'2',label:{color:"black"}});
b.setAttribute(cntBC,{name:'2',label:{color:"black"}});
b.setAttribute(cntABC,{name:'3',label:{color:"black"}});
}
if(aux==3){
b.setAttribute(txtAB,{color:"black"});
b.setAttribute(setAB,{fillColor:"green",fillOpacity:0.3});
b.setAttribute(setABC,{fillColor:"grey",fillOpacity:0.6});
b.setAttribute(cntAB,{name:'1',label:{color:"black"}});
b.setAttribute(cntABC,{name:'2',label:{color:"black"}});
}
if(aux==4){
b.setAttribute(txtBC,{color:"black"});
b.setAttribute(setBC,{fillColor:"purple",fillOpacity:0.3});
b.setAttribute(setABC,{fillColor:"grey",fillOpacity:0.3});
b.setAttribute(cntBC,{name:'1',label:{color:"black"}});
b.setAttribute(cntABC,{name:'1',label:{color:"black"}});
}
if(aux==5){
b.setAttribute(txtCA,{color:"black"});
b.setAttribute(setCA,{fillColor:"orange",fillOpacity:0.3});
b.setAttribute(setABC,{fillColor:"grey",fillOpacity:0});
b.setAttribute(cntCA,{name:'1',label:{color:"black"}});
b.setAttribute(cntABC,{name:'0',label:{color:"black"}});
}
if(aux==6){
b.setAttribute(txtABC,{color:"black"});
b.setAttribute(setABC,{fillColor:"grey",fillOpacity:0.3});
b.setAttribute(cntABC,{name:'1',label:{color:"black"}});
}
aux = aux + 1;
buttons[1].enable();
if(aux==7){
buttons[0].disable();
}
};
var button2 = function(){ aux = 0;
buttons[0].enable();
buttons[1].disable();
b.setAttribute(txtA,{color:"transparent"});
b.setAttribute(txtB,{color:"transparent"});
b.setAttribute(txtC,{color:"transparent"});
b.setAttribute(txtAB,{color:"transparent"});
b.setAttribute(txtBC,{color:"transparent"}); b.setAttribute(txtCA,{color:"transparent"});
b.setAttribute(txtABC,{color:"transparent"});
b.setAttribute(setA,{fillColor:"transparent"});
b.setAttribute(setB,{fillColor:"transparent"});
b.setAttribute(setC,{fillColor:"transparent"});
b.setAttribute(setAB,{fillColor:"transparent"});
b.setAttribute(setBC,{fillColor:"transparent"});
b.setAttribute(setCA,{fillColor:"transparent"});
b.setAttribute(setABC,{fillColor:"transparent"});
b.setAttribute(cntA,{name:'0',label:{color:"black"}});
b.setAttribute(cntB,{name:'0',label:{color:"black"}});
b.setAttribute(cntC,{name:'0',label:{color:"black"}});
b.setAttribute(cntAB,{name:'0',label:{color:"black"}});
b.setAttribute(cntCA,{name:'0',label:{color:"black"}});
b.setAttribute(cntBC,{name:'0',label:{color:"black"}});
b.setAttribute(cntABC,{name:'0',label:{color:"black"}});
};
buttons.push(b.button(-3,-5,'Next',button1,{mathMode:false, width:110}));
buttons.push(b.button(3,-5,'Reset', button2,{mathMode:false, width:110}));
buttons[1].disable();
</jsxgpre>