# Proving that two events are dependent

From a group of 20 students, 8 of whom are computer science majors and 12 of whom are electrical engineering majors, one student is selected at random, and then a second student is selected at random from the remaining 19 students. Let A be the event that the first student is a computer science major,and let B be the event that the second student is a computer science major. Prove that A and B are dependent events.

I tried to use P(A|B)=P(A intersect B)/P(B) should not be equal to P(A), but I'm running into trouble with the numbers. Is P(A intersect B)=(8/20)(7/19)? And is P(B)=(8/19) or (7/19)? Very confused.

• @BruceET Sorry? The probability space is (finite and) perfectly well defined, which corresponds to selecting two students, ordering them, from 20 students, uniformly randomly. Thus one can very much prove or disprove independence...
– Did
Sep 20, 2016 at 22:26
• @Did. Changes here since my Comment, now deleted. Not least, what appears to be the TA's complaint. I'll have no further comment on this. Sep 21, 2016 at 2:04

Yes, $P(A\cap B)$ is correct. You need Bayes's formula to do $P(B)$: $$P(B) = P(B|A)P(A)+ P(B|\text{not }A)P(\text{not }A) = \frac7{19}\cdot\frac8{20} + \frac8{19}\cdot\frac{12}{20} = \frac25.$$ Note that $P(B|A)P(A) = P(A\cap B) = P(A|B)P(B)$.