# What is the probability that none of the people call the same office and the probability that all of them call the same office?

Suppose there are $$n (n \ge 2)$$ offices in a city. Suppose that $$k (2 \le k \le n)$$ people each independently and randomly call one these $$n$$ offices for an appointment. What is the probability that (a) none of these $$k$$ people call the same office and (b) that all of these $$k$$ people call the same office?

My work:

(a) This is similar to saying $$P($$all calls are to unique locations$$)=\frac{{n \choose k}k!}{{n +k - 1\choose k}}$$. There are $${n \choose k}$$ ways to pick which offices will receive calls. For each of these scenarios, there are $$k!$$ ways to determine which caller goes to which office.

(b)$$P($$all the same office$$)=\frac{{n \choose 1}}{{n + k - 1 \choose k}},$$ since all people call one office, there are $${n \choose 1}$$ ways to choose that office, and $${n+k-1 \choose k}$$ total ways for the people to schedule appointments. However, I feel like I am missing additional arguments in the numerator. This answer seems too easy.

• Checking on your progress towards solving the rest. Added a line of R code. Sep 4, 2019 at 6:37
• Thank for checking on my progress. I left a comment with my answer for (b) given your great example. Is my answer for (a) correct, then? Thank you! Sep 4, 2019 at 20:31

Thank you for showing your work so far. It seems you can use a bit of help. Suppose there are $$n=7$$ offices and $$k=5$$ people.

For (b) we need to choose which office gets all the calls (7 ways) and then every one of the 5 people needs to choose that office (each with probability $$1/7),$$ so that the desired probability is $$7(1/7)^5 = (1/7)^4 = 0.000416.$$ (a) I will leave a combinatorial answer for this part to you.

A simple simulation in R for 10 million replications of this 5-call experiment in R is shown below: The vector d has 10 million numbers, each of them the number of distinctly different offices called at random by 5 people. Each of the 10 million entries of the logical vector d==1 is TRUE if everyone called the same office, otherwise FALSE; the mean of a logical vector is the proportion of its TRUEs.

set.seed(903)
d = replicate(10^7, length(unique(sample(1:7, 5, rep=T))))
mean(d==1)
[1] 0.0004186        # aprx 0.00416
7*(1/7)^5
[1] 0.0004164931     # exact
2*sd(d==1)/sqrt(10^7)
[1] 1.293715e-05     # aprx 95% margin of sim err: 0.000013

mean(d==5)
[1] 0.1497841        # aprx probability: 5 distinct offices
prod(7:3)/7^5
[1] 0.1499375        # hmm?

table(d)/10^7
d
1         2         3         4         5
0.0004186 0.0375117 0.3125584 0.4997272 0.1497841


Note: Steps within the replicate loop:

samp = sample(1:7, 5, rep=T);  samp   # sampling with replacement
[1] 3 3 6 1 4   # offices called by 5 people
unique(samp)
[1] 3 6 1 4     # uniquely different offices called
length(unique(samp))
[1] 4           # nr of different offices called

samp = sample(1:7, 5, rep=T);  samp
[1] 1 7 7 3 3
unique(samp)
[1] 1 7 3
length(unique(samp))
[1] 3

• Thank you for your work. Unfortunately, I am not too well-versed in R, but I think I understand the point that you're trying to make. I appreciate the effort, as well! I see my error in part (a). Sep 4, 2019 at 1:24
• Were you planning on leaving some work for part (a)? I think you may have switched the labeling. Sep 4, 2019 at 1:26
• First argument of sample is population sampled from (list of 7 offices), second argument is number of items sampled (five people calling), third argument changes from default 'without-replacement mode' to 'with-replacement' mode (same office can be called more than once). Sep 4, 2019 at 1:37
• I'm saying that for $n = 7$ offices and $k = 5$ people, $P(\text{5 distinct offices})$ $= (6/7)(5/7)(4/7)(3/7) = 0.1499375$ and that this method generalizes. Sep 4, 2019 at 22:46
• Combinatorial problems are always a challenge for beginners. Then you accumulate a battery of methods of approach. But even experts should probably be banned from writing answers on Monday before coffee. Sep 4, 2019 at 22:50