Couple exercises from Sampling Distributions (Part One)

Statistics and Sample Properties, Sampling Distribution of the Mean, Chebyshev's Inequality, Weak Law of Large Numbers (WLLN), Central Limit Theorem (CLT), Sample Distribution with Finite Population and Without Replacement.

Some author5 min read

Couple exercises from Sampling Distributions by Xiaojing Ye (Department of Mathematics & Statistics, Georgia State University) (p1-15)

Let's consider a number of i.i.d random variables X1,X2,...,XnX_1, X_2,...,X_n, then we want to estimate some property underlying with the distribution. This estimate is called statistics. For example the mean and the sample variance are two statistics for random variables.

We can define them as

Xˉ=1n∑iXi\bar{X} = \frac{1}{n} \sum_i X_i σ(X)=1n−1∑iXi\sigma(X) = \frac{1}{n-1} \sum_{i}X_i

Sampling distribution of the mean

Theorem. If X1,…,XnX_1, \ldots, X_n is a random sample of a distribution with mean μ\mu and variance σ2\sigma^2, then the sample mean Xˉ\bar{X} satisfies

E[Xˉ]=μ,var⁡[Xˉ]=σ2n\mathbb{E}[\bar{X}]=\mu, \quad \operatorname{var}[\bar{X}]=\frac{\sigma^2}{n}

Proof.

E[Xˉ]=E[1n∑iXi]=1nE[∑iXi]=1n∑iE[Xi]\mathbb{E}[\bar{X}]= \mathbb{E}\left[\frac{1}{n} \sum_i X_i\right] = \frac{1}{n} \mathbb{E}\left[ \sum_i X_i\right]=\frac{1}{n} \sum_i\mathbb{E}\left[ X_i\right]

Since X1,X2,...,XnX_1, X_2, ... , X_n are i.i.d, we will have

E[Xi]=μ\mathbb{E}[X_i] = \mu

and then E[Xˉ]=μ.\mathbb{E}[\bar{X}] = \mu.

var⁡[Xˉ]=var⁡[1n∑iXi]=1n2var⁡[∑iXi]=1n2∑ivar⁡[Xi]\operatorname{var}\left[\bar{X}\right] = \operatorname{var}\left[\frac{1}{n}\sum_i X_i\right]=\frac{1}{n^2} \operatorname{var}\left[\sum_i X_i\right]= \frac{1}{n^2} \sum_i\operatorname{var}\left[ X_i\right]

Since var⁡[Xi]=σ\operatorname{var}[X_i] = \sigma, then we will have var⁡[Xˉ]=σn.\operatorname{var}\left[\bar{X}\right] =\frac{\sigma}{n}.

We can denote E[Xˉ]=μXˉ\mathbb{E}[\bar{X}] = \mu_{\bar{X}} and var⁡[X]=σXˉ2\operatorname{var}[X] = \sigma_{\bar{X}}^2 and σxˉ\sigma_{\bar{x}} is called the sample error.

Theorem (Chebyshev's inequality). Let XX be a RV with mean μ\mu and variance σ2\sigma^2, then for any c>0c>0, there is

P(∣X−μ∣≥c)≤σ2c2\mathrm{P}(|X-\mu| \geq c) \leq \frac{\sigma^2}{c^2}

Proof.

P(∣X−μ∣≥c)=∫∣x−μ∣≥cf(x) dx≤∫∣x−μ∣≥c∣x−μ∣2c2f(x) dx=1c2∫∣x−μ∣≥c∣x−μ∣2f(x) dx≤1c2∫∣x−μ∣2f(x) dx=σ2c2.\mathrm{P}(|X-\mu| \geq c) = \int_{|x-\mu| \ge c} f(x) \, dx \le \int_{|x-\mu| \ge c} \frac{|x-\mu|^2}{c^2} f(x)\, dx = \frac{1}{c^2}\int_{|x-\mu| \ge c} |x-\mu|^2 f(x)\, dx \le \frac{1}{c^2}\int |x-\mu|^2 f(x) \, dx = \frac{\sigma^2}{c^2}.

Example. By Chebyshev's inequality, we have for any fixed c>0c>0 that

P(∣Xˉ−μ∣≥cσ)≤1nc2.\mathrm{P}(|\bar{X}-\mu| \ge c \sigma) \le \frac{1}{n c^2} . P(∣Xˉ−μ∣≤cσ)≥1−1nc2\mathrm{P}(|\bar{X}-\mu| \le c \sigma) \ge 1- \frac{1}{n c^2}

as nn goes to infinity, we will have P(∣Xˉ−μ∣≤cσ)=1\mathrm{P}(|\bar{X}-\mu| \le c \sigma) = 1, which is weak law of large number.

Central Limit Theorem. Let X1,…,XnX_1, \ldots, X_n be a random sample from a distribution with mean μ\mu and variance σ2\sigma^2. Denote Xˉn\bar{X}_n their sample mean. Define

Zn=Xˉn−μσ/nZ_n=\frac{\bar{X}_n-\mu}{\sigma / \sqrt{n}}

Then the limiting distribution of ZnZ_n as n→∞n \rightarrow \infty is the standard normal distribution.

We know the following properties of moment generating function:

Let MX(t)M_X(t) be moment generating function and a,ba,b are constants.

MX+a(t)=E[exp⁡((X+a)t)]=exp⁡(at)E[exp⁡(Xt)]=exp⁡(at)MX(t)M_{X+a}(t) = \mathbb{E}[\exp((X+a)t)] = \exp(at) \mathbb{E}[\exp(Xt)] = \exp(at) M_{X}(t) MbX(t)=E[exp⁡(bXt)]=E[exp⁡(Xbt)]=MX(bt)M_{bX}(t) = \mathbb{E}[\exp(bXt)] = \mathbb{E}[\exp(Xbt)]=M_X(bt) MX+ab(t)=exp⁡(ab)MXb(t)=exp⁡(ab)MX(tb)M_{\frac{X+a}{b}}(t) = \exp\left(\frac{a}{b}\right) M_{\frac{X}{b}}(t) = \exp\left(\frac{a}{b}\right) M_{X}\left(\frac{t}{b}\right)

Proof of CLT.

Let's consider MZn(t)=MXnˉ−μσ/n(t)=exp⁡(−μnσt)MXnˉ(tnσ)M_{Z_n}(t) = M_{\frac{\bar{X_n}-\mu}{\sigma/\sqrt{n}}}(t) = \exp\left(-\frac{\mu\sqrt{n}}{\sigma}t\right) M_{\bar{X_n}}\left(\frac{t \sqrt{n}}{\sigma }\right)

MZn(t)=exp⁡(−μnσt)MnXnˉ(tσn)M_{Z_n}(t) = \exp\left(-\frac{\mu\sqrt{n}}{\sigma}t\right) M_{n\bar{X_n}}\left(\frac{t }{\sigma \sqrt{n}}\right)

Since nXnˉ=X1+X2+...+Xnn\bar{X_n} = X_1 + X_2+...+X_n, we will have

MZn(t)=exp⁡(−μnσt)∏iMXi(tσn)=exp⁡(−μnσt)(MX(tσn))nM_{Z_n}(t) = \exp\left(-\frac{\mu\sqrt{n}}{\sigma}t\right) \prod_{i} M_{X_i}\left(\frac{t }{\sigma \sqrt{n}}\right) = \exp\left(-\frac{\mu\sqrt{n}}{\sigma}t\right) \left(M_{X}\left(\frac{t}{\sigma \sqrt{n}}\right)\right)^n

Since we know that MX(t)=1+mX(1)t+mX(2)2t2+....M_X(t) = 1+ m_X(1) t + \frac{m_X(2)}{2} t^2 + ...., where mX(n)m_X(n) is the n-th moment of XX. then we will have

MX(tσn)=1+mX(1)tσn+mX(2)2(tσn)2+...M_X\left(\frac{t}{\sigma \sqrt{n}}\right) = 1 +m_X(1) \frac{t}{\sigma \sqrt{n}} + \frac{m_X(2)}{2}\left(\frac{t}{\sigma \sqrt{n}}\right)^2 +...

We will denote

h(t)=mX(1)tσn+mX(2)2(tσn)2+...h(t) = m_X(1) \frac{t}{\sigma \sqrt{n}} + \frac{m_X(2)}{2}\left(\frac{t}{\sigma \sqrt{n}}\right)^2 +...

Then if we take ln⁡\ln on MZn(t)M_{Z_n}(t), we will have

ln⁡MZn(t)=−μnσt+nln⁡MX(tσn)=−μnσt+nln⁡(1+h(t))=−μnσt+n×(h(t)−(h(t))2/2+(h(t))3/6....)\ln M_{Z_n}(t) = -\frac{\mu\sqrt{n}}{\sigma}t + n \ln M_X\left(\frac{t}{\sigma \sqrt{n}}\right) = -\frac{\mu\sqrt{n}}{\sigma}t + n \ln (1+h(t)) = -\frac{\mu\sqrt{n}}{\sigma}t + n \times (h(t)-(h(t))^2/2+(h(t))^3 / 6 ....) =t22+O(1n1/2)=\frac{t^2}{2} + O\left(\frac{1}{n^{1/2}}\right)

Therefore, we have ln⁡MZn(t)=t22\ln M_{Z_n}(t) = \frac{t^2}{2} as nn goes to infinity, which coincides with the guassian distribution's moment generating function.

Sample distribution with finite population and without replacement

Suppose that we have a population of NN, we want to draw nn sample out of our NN population and also, the sample is ordered. Then the probability of drawing nn sample with a fixed configuration is equal to 1PNn=1N!(N−n)!=(N−n)!N!\frac{1}{P_{N}^n} = \frac{1}{\frac{N!}{(N-n)!}} = \frac{(N-n)!}{N!}

If we want to know the probability of having one specific sample in our drawing where its position is fixed, then we will have

PN−1n−1PNn=(N−1)!(N−n)!N!(N−n)!=1N\frac{P_{N-1}^{n-1}}{P_{N}^{n}} = \frac{\frac{(N-1)!}{(N-n)!}}{\frac{N!}{(N-n)!}} = \frac{1}{N}

Let's denote the position as rr and our selected element as xx, then we will have the following pmf

fr(x)=1Nf_r(x) =\frac{1}{N}

where xx can take any value from the population and rr can take any value from 11 to nn.

μr=∑ixifr(xi)=1N∑ixi:=μ\mu_r = \sum_{i}x_i f_r(x_i) = \frac{1}{N} \sum_i x_i := \mu σr2=E[(Xr−μr)2]=∑i(xi−μr)2fr(xi)=1N∑i(xi−μr)2:=σ2\sigma^2_r = \mathbb{E}[(X_r-\mu_r)^2] = \sum_i (x_i -\mu_r)^2f_r(x_i) = \frac{1}{N} \sum_i(x_i - \mu_r)^2 := \sigma^2

For joint pmf of (xr,xs)(x_r, x_s) for position r,sr,s, we will have

grs(xr,xs)=PN−2n−2PNn=(N−2)!(N−n)!N!(N−n)!=1N(N−1)g_{rs}(x_r, x_s) = \frac{P_{N-2}^{n-2}}{P_{N}^n} = \frac{\frac{(N-2)!}{(N-n)!}}{\frac{N!}{(N-n)!}} = \frac{1}{N(N-1)}

Then the covariance of (xr,xs)(x_r,x_s) will be

Cov⁡(xr,xs)=E[(Xr−μ)(Xs−μ)]\operatorname{Cov}(x_r, x_s) = \mathbb{E}[(X_r -\mu)(X_s -\mu)] =∑r≠s(xr−μ)(xs−μ)grs(xr,xs)= \sum_{r\not =s} (x_r - \mu) (x_s -\mu) g_{rs}(x_r, x_s) =1N(N−1)∑r≠s(xr−μ)(xs−μ)= \frac{1}{N(N-1)}\sum_{r\not =s} (x_r - \mu) (x_s -\mu) =1N(N−1)∑r=1N(xr−μ)∑s=1,s≠rN(xs−μ)= \frac{1}{N(N-1)}\sum_{r=1}^N (x_r - \mu) \sum_{s=1, s\not = r}^N (x_s -\mu)

Since we have ∑s=1Nxs=Nμ=∑s=1Nμ\sum_{s=1}^N x_s = N\mu = \sum_{s=1}^N \mu, then we will have

∑s=1,s≠rN(xs−μ)=−(xr−μ)\sum_{s=1, s\not = r}^N (x_s -\mu) = -(x_r - \mu)

So, we will have

Cov⁡(xr,xs)=−1N(N−1)∑r=1N(xr−μ)2=−σ2N−1\operatorname{Cov}(x_r, x_s) = -\frac{1}{N(N-1)}\sum_{r=1}^N (x_r - \mu)^2 = -\frac{\sigma^2}{N-1}

Now let's find the mean and variance of Xnˉ=1n∑i=1nXi\bar{X_n} =\frac{1}{n} \sum_{i=1}^n X_i,

E[Xnˉ]=1n∑i=1nE[Xi]=μ\mathbb{E}[\bar{X_n}] = \frac{1}{n} \sum_{i=1}^n \mathbb{E}[X_i] = \mu

.

Var⁡[Xnˉ]=1n2Var⁡[∑i=1nXi]\operatorname{Var}[\bar{X_n}] = \frac{1}{n^2}\operatorname{Var}[\sum_{i=1}^n X_i] =1n2(∑Var⁡[Xi]+∑i≠jCov⁡(Xi,Xj))= \frac{1}{n^2}\left(\sum \operatorname{Var}[X_i]+\sum_{i \not=j} \operatorname{Cov}(X_i, X_j)\right) =1n2(nσ2−(n(n−1))σ2N−1)= \frac{1}{n^2}\left(n \sigma^2-(n(n-1)) \frac{\sigma^2}{N-1}\right) =σ2n(1−n−1N−1)= \frac{\sigma^2}{n} (1-\frac{n-1}{N-1}) =σ2nN−nN−1= \frac{\sigma^2}{n} \frac{N-n}{N-1}