We have the following properties of a χ2:
Say X~χ2(n), Y~χ2(m) and X and Y are independent. Then

Say X1, .., Xn are iid N(μ,σ). The sample variance is defined by
Now

Note: we use "n-1" instead of "n" because then S2 is an unbiased estimator of σ2, that is E[S2]=σ2
Note: another important feature here is that
S2
Y. Then
Notation: Tn ~ t(n)
The importance of this distribution in Statistics comes from the following: Say X1, .., Xn are iid N(μ,σ). Then
Note: S is of course an estimate of the population standard deviation, so this formula tries to standardize the sample mean without knowing the exact standard deviation. If our sample is large (?) we would expect S to be close to σ and so we would expect a t(n) distribution to be close to a N(0,1). This is in fact true. The routine simt illustrates this point.
An important special case is X~t(1). This is also called the Cauchy distribution. Notice it has no finite mean (and of course then also no finite variance). It has density
Yj for all i and j. Then
One of the difficulties when dealing with order statistics are ties, that is the same observation appearing more than once. This should only occur for discrete data because for continuous data the probabiltity of a tie is zero. They may happen anyway because of rounding, but we will ignore them in what follows.
Say X1, .., Xn are iid with density f. Then X(i) is the ith order statistics if X(1)< ... < X(i) < ... <X(n)
Note X(1) = min {Xi} and X(n) = max {Xi}
Let's find the pdf of X(i). For this let Y be a r.v. that counts the number of Xj ≤ x for some fixed number x. We can think of Y as the number of "successes" of n independent Bernoulli trials with success probability p = P(Xi ≤ x) = F(x) for i=1,..,n. So Y~B(n,F(x)). Note also that the event {Y ≥i} means that more than i observations are less or equal to x, so the ith largest is less or equal to x. Therefore
with that we find
Example : Say X1, .., Xn are iid U[0,1]. Then for 0<x<1 we have f(x)=1 and F(x)=x. Therefore
The empirical distribution function of a sample X1, .., Xn is defined as follows:

so it is the sample equivalent of the regular distribution function:
• F(x)=P(X≤x) is the probability that the rv X≤x
• Fhat(x) is the proportion of X1, .., Xn ≤x
The empirical distribution function is very important in Statistics, in R it is drawn with the routine empcdf. In normal.emp we draw the true cdf and the empirical cdf for the N(0,1).
Note
In emp.ex we do the histograms for F=U[0,1] (which=1), F=Pois(1) (which=2) and F=Exp(1) (which=3)