Imagine a population of people where $x\%$ have blue hats and $(100-x)\%$ have green hats where every year some people are awarded prizes. The rule is that everyone should have an equal chance of being awarded a prize every year. The village bosses would like to decide if this rule is being followed as they suspect there may be some prejudice based on hat color. They count the number of people with blue hats who get a prize and call it $A$ and also the number of people with green hats who get a prize and call that $B$. The total population size of green and blue hats is $P$.
What is a good method to determine if the prize awarding has indeed been fair?