locked
Computing expectation of the largest number RRS feed

  • Question

  • I've recently come across a puzzle. There is an urn with N balls, numbered from 1 to N. I pick n < N balls without a replacement. What is the expectation of the largest number in my pick?

    My first idea was to simulate the process but I remembered that it could perhaps be elegantly solved with Infer.NET. Is Infer.NET the right tool for the job? I am wondering about this Max operation which can pose problems for the sampler.

    I saw somebody posting analytic solution to the problem that I didn't study yet. I want to think about it first before looking at a solution and verifying with a Infer.NET program.

    Are there any Infer.NET examples where an expectation of a random variable is computed?

    Friday, February 23, 2018 12:07 AM

All replies

  • Every example does this.  When you infer a variable you get its distribution, from which its expectation can be extracted.
    Friday, February 23, 2018 8:27 PM
    Owner