Mathematics

Probability distribution
Let U be discrete characteristic values, u1, u2,..., um
Corresponding probability p(u1), p(u2),..., p(um)

Then the average of u is given by

And, usually the sum of the proability is equal to unity,

Then, the mean of any function of u, f(u) is given by

If f(u) = um then, f(u) is m-th moment of distribution.
If f(u) = (u - )m then, f(u) is m-th central moment of p(u).

If m = 2, then

is called variance. The square root of variance is standard deviation.

One can make distribution to be continuous

An example of continuous distribution is Gaussian distribution, and it has a form,

Stirling's approximation
Factorials of very large numbers are often encountered in statistical mechanics, in connection between discrete molecules to macroscopic properties that are in order of Avogadro's number. The factorial of N is,

and it can be written as

Since we are dealing with a very very large number, we can approximate the sum in the above equation with integral,

It follows that,

This is called Stirling's approximation.

Binomial and Multinomial Distribution
We wish to know how many ways to divide N distinguishable systems into groups of n1, n2,... The total number of ways to put systems in different positions are,

As you can see below, first pear can be placed in any of the six box position.

Once one pear is in a box (it doesn't matter where), there are N - 1 ways to put the second pear in.

If we keep going, we would get N! ways.

If we divide N into two groups, 1 - N1 and (N1 + 1) - N. Therefore, we have

Then the total number of ways to put particles in two groups are,

Since it doesn't matter for the order to which we place N1 particles into first group or N2 particles into second group, therefore we must have overcounted. The correct result is,

Above equation is called a binomial coefficient, since it appears in the binomial expansion,

The asterisk in the summation denotes the restiriction that N1 + N2 = N.

We can generalize the binomial coefficient to the division of N into r groups,

where N1 + N2 + ... + Nr = N. This is called a multinomial coefficient, which appears in multinomial expansion.