# Thread: Probability that X restaurants will be visited if Y people choose independently

1. ## Probability that X restaurants will be visited if Y people choose independently

I am trying to determine for Y people selecting from X restaurants (with an equal probability) what the expected value of the number of restaurants chosen would be. All decisions are independent.

Ex: 2 people and 2 restaurants - E(X) = 1(.5) + 2(.5) = 1.5 restaurants will be visited on average
EX: 3 people and 3 restaurants - E(X) = 1(1/9) + 2(6/9) + 3(2/9) = 2.11 restaurants will be visited on average

This is simple enough for small values like these. However, I would like to be able to do this for any combination of X and Y and create a table of expected values. For larger numbers I am having trouble determining the probabilities to plug into the expected value formula. When calculating the probabilities, I know that the denominator will always be X^Y but I am really struggling to find a way to calculate the numerator without writing down every possible combination.

My ultimate goal would be to create a table in excel that for any given number of restaurants and people, returns the expected value.

I'm running into a major road block so any help would be appreciated.

2. ## Re: Probability that X restaurants will be visited if Y people choose independently

Let
be the total number of restaurants.
be the number of restaurants visited by at least 1 person
be the total number of people
be the indicators of the -th restaurant being visited by at least 1 person

If you are only interested in the expected value , we can try to calculate it without actually calculating the pmf of . The trick is to consider the following decomposition, having the same spirit as the one we do in calculating the expected value of hypergeometric distribution:

Note those are not independent; but this does not matter - all we need is the linearity of the expectation. Further note that

and therefore

3. ## Re: Probability that X restaurants will be visited if Y people choose independently

That worked perfectly. Thank you! Glad I asked because I was not headed in the right direction.

 Tweet