Solving a probabilistic problem
- by ????????????
So I am interested in Computational Investing and came across this problem on a wiki page:
Write a program to discover the answer to this puzzle:"Let's say men
and women are paid equally (from the same uniform distribution). If
women date randomly and marry the first man with a higher salary, what
fraction of the population will get married?"
I don't have much knowledge in probability theory, so I'm not really sure how to implement this in code.
My thinking:
Populate two arrays(female,male) with random salary values from a uniform
distribution.
Randomly pair one female and one male array element and see if
condition of higher salary is met.
If it is, increment a counter.
Divide counter by population and get percentage.
Is this the correct logic? Do woman continually date until there is no males left with higher salaries than women?