Dependent Events

Author

Eric W. Weisstein
September 1, 2026

This notebook downloaded from https://mathworld.wolfram.com/notebooks/Probability/DependentEvents.nb.

For more information, see Eric's MathWorld entry https://mathworld.wolfram.com/DependentEvents.html.

©2026 Wolfram Research, Inc. except for portions noted otherwise

Figure

An area model with P(A)=1/2, P(B)=2/5, and P(A intersection B)=1/4, so the events are dependent.

Module[
	{ink, paper, frame, eventA, eventB, overlap, formulas},
	ink = LightDarkSwitched[Black, White];
	paper = LightDarkSwitched[White, Black];
	frame = Graphics[
		{
			EdgeForm[{ink, AbsoluteThickness[2]}],
			FaceForm[paper],
			Rectangle[{0, 0}, {1, 1}]
		}
	];
	eventA = Graphics[{FaceForm[RGBColor[0.35, 0.35, 0.95, 0.55]], EdgeForm[None], Rectangle[{0, 0}, {1/2, 1}]}];
	eventB = Graphics[
		{
			FaceForm[RGBColor[1., 0.55, 0.15, 0.45]],
			EdgeForm[None],
			Polygon[{{0, 0}, {1, 0}, {1, 3/10}, {1/2, 3/10}, {1/2, 1/2}, {0, 1/2}}]
		}
	];
	overlap = Graphics[
		{
			Text[Style["A", 18, Italic, ink, FontFamily -> "Times"], {1/4, 3/4}],
			Text[Style["B", 18, Italic, ink, FontFamily -> "Times"], {3/4, 3/20}],
			Text[Style[TraditionalForm[HoldForm[Intersection[A, B]]], 15, Italic, ink, FontFamily -> "Times"], {1/4, 1/4}]
		}
	];
	formulas = Column[
		Map[Style[#, 17, ink, FontFamily -> "Times"] &,
			{
				TraditionalForm[HoldForm[P[A] == 1/2]],
				TraditionalForm[HoldForm[P[B] == 2/5]],
				TraditionalForm[HoldForm[P[Intersection[A, B]] == 1/4]],
				TraditionalForm[HoldForm[P[Intersection[A, B]] != P[A] P[B]]]
			}
		]
	];
	Grid[{{Show[frame, eventA, eventB, overlap], formulas}}, Alignment -> Center]
]