The sample space may consist of categories.
When the sample space consists of numbers we may calculate statistics summarizing the properties of the random variable x.
Let f(x) be any function of x. The expected value E[f(x)] of f(x) is defined to be
E[f(x)] = p(x1).f(x1) + ... + p(xn).f(xn).The mean is the expected value of x:
mu = E[x] = p(x1).x1 + ... + p(xn).xn.The variance Var(x) is the expected value of (x - mu)2:
sigma2 = Var(x) = E[(x - mu)2] = p(x1).(x1 - mu)2 + ... + p(xn).(xn - mu)2.
p(k) = C(n,k).pk.(1 - p)n-k,where C(n,k) = n!/k!(n - k)!, and p = mu/n.
The expected value of k is: E[k] = mu = n.p.
The variance is: sigma2 = Var(k) = n.p.(1 - p).
The standard deviation is therefore: sigma = sqrt[n.p.(1 - p)].
For example, if n = 7 and mu = 4, then we have the probabilities in Table 1, and sigma = 1.309. These values are shown in Fig. 1.
| k: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| p(k): | .003 | .025 | .099 | .220 | .294 | .235 | .104 | .020 |
Fig. 1. The Binomial distribution with mu = 4.
The mean and standard deviation are shown above the diagram.
p(n) = (mun/n!).exp(-mu).The expected value of n is: E[n] = mu.
The variance is: sigma2 = Var(n) = mu.
The standard deviation is therefore: sigma = sqrt(mu).
For example, if mu = 1.5, then we have the probabilities in Table 2, and sigma = 1.225. These values are shown in Fig. 2.
| n: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | . . . . . |
| p(n): | .223 | .335 | .251 | .126 | .047 | .014 | .004 | .001 | . . . . . |
Fig. 2. The Poisson distribution with mu = 1.5.
The mean and standard deviation are shown above the diagram.
p(a < x < b) = Integral(a, b): phi(x).dx,and
Integral(-infinity, +infinity): phi(x).dx = 1.The expected value of a function f(x) is given by:
E[f(x)] = Integral(-infinity, +infinity): f(x).phi(x).dx.The mean of the random variable is:
mu = E[x] = Integral(-infinity, +infinity): x.phi(x).dx,and the variance is:
sigma2 = Var(x) = E[(x - mu)2] = Integral(-infinity, +infinity): (x - mu)2.phi(x).dx
= Integral(-infinity, +infinity): x2.phi(x).dx - mu2.
phimu,sigma(x) = [sigma.sqrt(2.pi)]-1.exp[-(x - mu)2/(2.sigma2)].By putting z = (x - mu)/sigma we get the standard normal random variable, which has the probability density function:
phi0,1(z) = [sqrt(2.pi)]-1.exp[-(½).z2],where mu = 0 and sigma = 1.
The graph of phi(z) and the probabilities for the values of z in the intervals of width sigma about the mean mu are shown in Fig. 3. The normal random variable arises when observations of a quantity are disturbed by a large number of random fluctuations which are independent of each other.
Fig. 3. The standard normal probability density function; mu = 0, and sigma = 1. Numbers above the intervals are the probabilities for z to be in the intervals.
p(mu -n.sigma < x < mu + n.sigma) > 1 - 1/n2,where n > 1.
A comparison between these probabilities and the corresponding probabilities for the standard normal random variable is given in Table 3. Of all possible random variables with the same variance, the normal random variable is the most concentrated about the mean value.
| n | Any random variable | Normal random variable |
|---|---|---|
| 1 | > 0 | 0.68 |
| 2 | >0.75 | 0.95 |
| 3 | >0.89 | 0.997 |
| 4 | >0.94 | 0.99994 |
By R. H. B. Exell, 1998. King Mongkut's University of Technology Thonburi.