1

If the population is size N, and the sample size is n, how can I generalize this case:
I want to find the number of distinct samples of size n that can be selected from the population, WITH replacement.

Lou
  • 13
  • 3

1 Answers1

3

To be found is the cardinality of the set of tuples $(n_1,\dots,n_N)$ where the $n_i$ are nonnegative integers that satisfy: $$n_1+\cdots+n_N=n$$

With stars and bars we find that this cardinality equals:$$\binom{n+N-1}{N-1}$$

drhab
  • 153,781
  • Aren't tuples order-preserving meaning $(1,2)$ is not the same as $(2,1)$, and if so then then aren't you counting some samples multiple times? – lidlbobbytables Oct 04 '19 at 14:44
  • 1
    @BurhanuddinSalman Indeed tuples are order-preserving. If e.g. we have populatione $(a,b)$ then $(1,2)$ stands for the sample of once $a$ and twice $b$ while $(2,1)$ stands for the sample of twice $a$ and once $b$. Here $a$ and $b$ are distinguishable (e.g. persons). – drhab Oct 04 '19 at 14:47
  • I don't understand this condition n1+⋯+nN=n. if n is just the sample size in question, why isn't the solution just N^n?

    i.e. N ways to choose each element in the sample, taken over a sample of size n. N ways to choose the first element * N ways to choose the second * ... * N ways the choose the nth element...

    – Lou Oct 04 '19 at 15:00
  • further, does this method double count the tuple (1,1), say? – Lou Oct 04 '19 at 15:02
  • Suppose $N=3$ in the sense that the population has $3$ distinguishable objects A,B,C. If e.g. $n=2$ then what samples are possible with replacement? $(2,0,0),(0,2,0),(0,0,2),(1,1,0),(1,0,1),(0,1,1)$ I would say where the first coördinate stands for the number of times object A is chosen, the second for the number of times object B is chosen and the third for the number of times object C is chosen. So there are $6$. Do you agree with this? – drhab Oct 04 '19 at 15:09
  • @drhab thank you – Lou Oct 04 '19 at 15:21