Thus, for all buckets,

Given:

- n elements, uniformly distributed over all possible values
- n buckets

What is the probability that an element will be inserted into some bucket i?

**Answer:** p = 1/n.

Given n trials consisting of putting elements into buckets, how many elements
will be inserted into bucket i?

= Binomial(n,p)

with mean = np = 1

and variance = np(1-p) = 1 - 1/n

= 1 - 1/n +

= 2 - 1/n

=

Therefore, =

and = 4n + n + 3 = O(n) for the average case.
In the worst case, the run time is .