Normal Distribution
Basic Concepts
The probability density function of the normal distribution is defined by:
π(π₯) = 1
πβ2ππβ12(π₯βππ )
2
where e is the constant 2.7183..., and Οis the constant 3.1415β¦
The normal distribution is completely determined by the parameters ΞΌ and Ο. It turns out that ΞΌ is the mean of the normal distribution and Ο is the standard deviation.
The graph of the normal distribution has the shape of a bell curve as shown in Figure 25:
Figure 25: Normal curve
Some characteristics of the normal distribution are as follows:
ο· Mean = median = mode = ΞΌ
ο· Standard deviation = Ο
ο· Skewness = kurtosis = 0
The function is symmetric about the mean with inflection points (i.e., the points where the curve changes from concave up to concave down, or from concave down to concave up) at π₯ = π Β± π.
Normal Curve
ΞΌ ΞΌ+Ο ΞΌ+2Ο
ΞΌ-3Ο ΞΌ-2Ο ΞΌ-Ο ΞΌ+3Ο
68.3%
95.4%
99.7%
As can be seen from Figure 25, the area under the curve in the interval π β π < π₯ < π + π is approximately 68.26 percent of the total area under the curve. The area under the curve in the interval π β 2π < π₯ < π + 2π is approximately 95.44 percent of the total area under the curve, and the area under the curve in the interval π β 3π < π₯ < π + 3π is approximately 99.74 percent of the area under the curve.
As we shall see, the normal distribution occurs frequently and is very useful in statistics.
Excel Functions
Excel provides the following functions regarding the normal distribution:
NORM.DIST(x, ΞΌ, Ο, cum) where cum takes the values TRUE and FALSE
NORM.DIST(x, ΞΌ, Ο, FALSE) = probability density function value at x for the normal distribution with mean ΞΌ and standard deviation Ο
NORM.DIST(x, ΞΌ, Ο, TRUE) = cumulative probability distribution function value at x for the normal distribution with mean ΞΌ and standard deviation Ο
NORM.INV(p, ΞΌ, Ο) is the inverse of NORM.DIST(x, ΞΌ, Ο, TRUE), that is, NORM.INV(p, ΞΌ, Ο) = the value x such that NORM.DIST(x, ΞΌ, Ο, TRUE) = p
These functions are not available in versions of Excel prior to Excel 2010. Instead, these versions of Excel provide NORMDIST which is equivalent to NORM.DIST and NORMINV, which is equivalent to NORM.INV.
Example
Create a graph of the distribution of IQ scores using the Stanford-Binet Intelligence Scale.
This distribution is known to have a normal distribution with mean 100 and standard deviation 16. To create the graph, we first must create a table with the values of the probability density function π(π₯) for π₯ = 50, 51, β¦, 150. This table begins as shown on the left side of Figure 26:
Figure 26: Distribution of IQ scores
We only show the first 20 entries but, in total, there are 101 entries occupying the range A4:B104. The values in column B are calculated using the NORM.DIST function. For example, the formula in cell B4 is:
=NORM.DIST(A4,100,16,FALSE)
We can draw the chart on the right side of Figure 26 by highlighting the range B4:B104 and then selecting Insert > Charts|Line. The display of the chart can be improved as described
elsewhere in this book.
Standard Normal Distribution
The standard normal distribution is a normal distribution with a mean of 0 and a standard deviation of 1.
To convert a random variable π₯ with normal distribution with mean ΞΌ and standard deviation Ο to standard normal form, you use the following linear transformation:
π§ = π₯ β π π
The resulting random variable is called a z-score. Excel provides the following function for calculating the value of π§ from π₯, ΞΌ and Ο:
STANDARDIZE(π₯, π, π) = π₯βπ
π
In addition, Excel provides the following functions regarding the standard normal distribution:
NORM.S.DIST(z, cum) = NORM.DIST(z,0,1,cum)
NORM.S.INV(p) = NORM.INV(p,0,1)
These functions are not available in versions of Excel prior to Excel 2010. Instead, these versions of Excel provide NORMSDIST(z) which is equivalent to NORM.S.DIST(z, TRUE), and NORMSINV(p) which is equivalent to NORM.S.INV(p). For the pdf, the formula equivalent to NORM.S.DIST(z, FALSE) is NORMDIST(z, 0, 1, FALSE).
Lognormal Distribution
A random variable π₯ is lognormally distributed provided the natural log of π₯, ln π₯, is normally distributed.
Note that the lognormal distribution is not symmetric but is skewed to the right. If you have data that is skewed to the right that fits the lognormal distribution, you may be able to access various tests described elsewhere in this book that require data to be normally distributed.
Excel provides the following two functions:
LOGNORM.DIST(x, ΞΌ, Ο, cum) = the lognormal cumulative distribution function with mean ΞΌ and standard deviation Ο at x if cum = TRUE, that is, NORMDIST(LN(x), ΞΌ, Ο, cum), and the probability density function of the lognormal distribution if cum = FALSE.
LOGNORM.INV(p, ΞΌ, Ο) = EXP(NORM.INV(p, ΞΌ, Ο)
These functions are not available in versions of Excel prior to Excel 2010. Instead, these
versions of Excel provide LOGNORMDIST(x, ΞΌ, Ο) which is equivalent to LOGNORM.DIST(x, ΞΌ, Ο, TRUE), and LOGINV(p, ΞΌ, Ο) which is equivalent to LOGNORM.INV(p, ΞΌ, Ο).
Sample Distributions
Basic Concepts
Consider a random sample π₯1, π₯2, β¦ , π₯π from a population. As previously described, the mean of the sample (called the sample mean) is defined as:
π₯Μ =1 πβ π₯π
π
π=1
π₯Μ can be considered to be a number representing the mean of the actual sample taken but it can also be considered as a random variable representing the mean of any sample of size n from the population.
If π₯1, π₯2, β¦ , π₯π is a random sample from a population with mean ΞΌ and standard deviation Ο, then it turns out that the mean of the random variable π₯Μ is ΞΌ and the standard deviation of π₯Μ is π βπβ . When the population is normal, we have the following stronger result, namely, that the sample mean π₯Μ is normally distributed with mean ΞΌ and standard deviation π βπβ .
Central Limit Theorem
Provided n is large enough (generally about 30 or more), even for samples not coming from a population with a normal distribution, the sample mean π₯Μ is approximately normally distributed with mean ΞΌ and standard deviation π βπβ .
This result is called the Central Limit Theorem and is one of the most important and useful results in statistics.
Hypothesis Testing
We will now briefly introduce the concept of hypothesis testing using the following example.
Example: A company selling electric motors claims that the average life for its motors is at least 120 months. One of its clients wanted to verify this claim by testing a random sample of 48 motors as described in range A3:F10 of Figure 27. Is the companyβs claim correct?
Figure 27: One-sample testing of the mean
We first note that the average life of the motors in the sample is 125.9375, which is more than 120 months. But is this a statistically significant result or merely due to chance? Keep in mind that, even if the companyβs claim is false, any given sample may have a mean larger than 120 months.
Now, letβs assume that the population of motors is distributed with mean ΞΌ and standard deviation Ο. To perform the analysis, we first define the null hypothesis as follows:
H0: ΞΌ < 120
The complement of the null hypothesis (called the alternative hypothesis) is therefore:
H1: ΞΌ β₯ 120
Usually in an analysis, we are actually testing the validity of the alternative hypothesis by testing whether or not to reject the null hypothesis. When performing such analyses, there is some chance that we will reach the wrong conclusion. There are two types of errors:
ο· Type I β H0 is rejected even though it is true (false positive)
ο· Type II β H0 is not rejected even though it is false (false negative)
The acceptable level of a Type I error (called the significance level) is designated by alpha (Ξ±) while the acceptable level of a Type II error is designated beta (Ξ²).
Typically, a significance level of Ξ± = .05 is used (although, sometimes other levels such as Ξ± = .01 may be employed). This means that we are willing to tolerate up to five percent of type I errors, that is, we are willing to accept the fact that, in 1 out of every 20 samples, we reject the null hypothesis even though it is true.
For our analysis, we use the Central Limit Theorem. Since the sample size is sufficiently large, we can assume that the sample means have a normal distribution, with mean ΞΌ and standard deviation π βπβ , as depicted in Figure 28:
Figure 28: Right-tailed critical region
Keep in mind that this curve represents the distribution of all possible values for the sample mean. We need to perform our test based on the observed sample mean of 125.9375.
Ξ± critical
value
The next step in the analysis is to determine the probability that the observed sample mean has a value of 125.9375 or higher, under the assumption that the null hypothesis is true. If this probability is low (i.e., less than Ξ±), then we will have grounds for rejecting the null hypothesis.
Otherwise, we would not reject the null hypothesis (which is also called retaining the null hypothesis).
Retaining the null hypothesis is not the same as positing that it is true. It merely means that based on the one observed sample, we donβt have sufficient evidence for rejecting it.
The p-value (that is, the probability value) is the value p of the statistic used to test the null hypothesis. If p < Ξ±, then we reject the null hypothesis. For our problem, the p-value is the probability that the observed sample mean has a value of 125.9375 or higher, under the
assumption that the null hypothesis is true. This is the same as testing whether the p-value falls in the shaded area of Figure 28 (i.e., the critical region) in what is called a one-tailed test.
The p-value for our example is calculated in cell I8 of Figure 28. Since p-value = .042998 < .05
= Ξ±, we see that the observed value does fall in the critical region, and so we reject the null hypothesis. Therefore, we can show that we have sufficient grounds for accepting the companyβs claim that their motors last at least 120 months on average.
Note that the population standard deviation Ο is unknown. For the analysis shown in Figure 28, we made the assumption that the sample standard deviation is a good estimate of the
population standard deviation. For large enough samples, this is a reasonable assumption, although it introduces additional error. In Chapter 6, we show how to perform the same type of analysis using the t distribution without having to make this assumption.
To solve this problem, we could also use Excelβs Z.TEST function (called ZTEST for versions of Excel prior to Excel 2010). See cell I10 in Figure 27.
Z.TEST(R, π0, π) = 1 β NORM.DIST(π₯Μ , π0, π/βπ,TRUE) where π₯Μ = AVERAGE(R) = the sample mean of the data in range R and π = COUNT(R) = sample size. The third parameter is optional. When it is omitted, the value of the sample standard deviation of R is used instead; that is, Z.TEST(R, π0) = Z.TEST(R, π0, STDEV.S(R)).
We make one final observation. If we had tried to test the null hypothesis H0: ΞΌ = 120, then the alternative hypothesis would become H0: ΞΌ β 120. In this case, we would have two critical regions where we would reject the null hypothesis as shown in Figure 29:
Figure 29: Two-tailed hypothesis testing Ξ±/2
This is called a two-tailed test, which is more commonly used than the one-tailed test.