Magic bag

A weekly challenge concerning combinatorical probability.
Exploring and noticing Working systematically Conjecturing and generalising Visualising and representing Reasoning, convincing and proving
Being curious Being resourceful Being resilient Being collaborative

Problem



A magic bag contains some black and white balls, all of the same size and shape.

I put my hands in the bag and simultaneously and randomly pull out two balls. They are both the same colour and the magic bag tells me that the chance of this occurring was exactly $0.5$.

I wonder to myself how this condition constrains the numbers of black and white balls.

At the same time, the bag, who can read minds, says "I'll give you a hint: it's got something nice to do with triangle numbers." 

 
Did you know ... ?

Probability theory has many overlaps with the study of combinatorics. Is it fascinating how beautiful and tricky the consequences of counting become!