Читать книгу Industrial Data Analytics for Diagnosis and Prognosis - Yong Chen - Страница 41
3.4 Hypothesis Testing on Mean Vectors
ОглавлениеIn this section, we study how to determine if the population mean μ is equal to a specific value μ0 when the observations follow a normal distribution. We start by reviewing the hypothesis testing results for univariate data. Suppose X1, X2,…, Xn are a random sample of independent univariate observations following the normal distribution N(μ, σ2). The test on μ is formulated as
where H0 is the null hypothesis and H1 is the (two-sided) alternative hypothesis. For this test, we use the following test statistic:
(3.18)
where X̄ is the sample mean and s2 is the sample variance . The sample mean X̄ follows N(μ, σ2/n) and (n − 1)s2/σ2 follows a χ2 distribution with n − 1 degrees of freedom. Consequently, under H0 the t statistic in (3.18) follows a Student’s t-distribution with n − 1 degrees of freedom. We reject H0 at significance level α and conclude that μ is not equal to μ0 if |t|>tα/2,n−1, where tα/2,n−1 denotes the upper 100(α/2)th percentile of the t-distribution with n − 1 degrees of freedom. Intuitively, |t|>tα/2,n−1 indicates that we only have a small probability to observe |t| if we sample from the Student’s t-distribution with n − 1 degrees of freedom. Thus, it is very likely the null hypothesis H0 is not correct and we should reject H0.
The test based on a fixed significance level α, say α = 0.05, has the disadvantage that it gives the decision maker no idea about whether the observed value of the test statistic is just barely in the rejection region or if it is far into the region. Instead, the p-value can be used to indicate how strong the evidence is in rejecting the null hypothesis H0. The p-value is the probability that the test statistic will take on a value that is at least as extreme as the observed value when the null hypothesis is true. The smaller the p-value, the stronger the evidence we have in rejecting H0. If the p-value is smaller than α, H0 will be rejected at the significance level of α. The p-value based on the t statistic in (3.18) can be found as
where T(n − 1) denotes a random variable following a t distribution with n − 1 degrees of freedom.
We can define the 100(1 − α)% confidence interval for μ as
It is easy to see that the null hypothesis H0 is not rejected at level α if and only if μ0 is in the 100(1 − α)% confidence interval for μ. So the confidence interval consists of all those “plausible” values of μ0 that would not be rejected by the test of H0 at level α.
To see the link to the test statistic used for a multivariate normal distribution, we consider an equivalent rule to reject H0, which is based on the square of the t statistic:
(3.19)
We reject H0 at significance level α if t2>(tα/2,n−1)2.
For a multivariate distribution with unknown mean μ and known Σ, we consider testing the following hypotheses:
(3.20)
Let X1, X2,…, Xn denote a random sample from a multivariate normal population. The test statistic in (3.19) can be naturally generalized to the multivariate distribution as
(3.21)
where X̄ and S are the sample mean vector and the sample covariance matrix of X1, X2,…, Xn. The T2 statistic in (3.19) is called Hotelling’s T2 in honor of Harold Hotelling who first obtained its distribution. Assuming H0 is true, we have the following result about the distribution of the T2-statistic:
where Fp,n−p denotes the F-distribution with p and n − p degrees of freedom. Based on the results on the distribution of T2, we reject H0 at the significance level of α if
(3.22)
where Fp,n−p denotes the upper (100α)th percentile of the F-distribution with p and n − p degrees of freedom. The p-value of the test based on the T2-statistic is
where F(p,n − p) denotes a random variable distributed as Fp,n−p.
The T2 statistic can also be written as
which can be interpreted as the standardized distance between the sample mean X̄ and μ0. The distance is standardized by S/n, which is equal to the sample covariance matrix of X̄. When the standardized distance between X̄ and μ0 is beyond the critical value given in the right-hand side of (3.22), the true mean is not likely equal to be μ0 and we reject H0.
The concept of univariate confidence interval can be extended to multivariate confidence region. For p-dimensional normal distribution, the 100(1 − α)% confidence region for μ is defined as
It is clear that the confidence region for μ is an ellipsoid centered at x̄. Similar to the univariate case, the null hypothesis H0 :μ = μ0 is not rejected at level α if and only if μ0 is in the 100(1 − α)% confidence region for μ.
The T2-statistic can also be derived as the likelihood ratio test of the hypotheses in (3.20). The likelihood ratio test is a general principle of constructing statistical test procedures and having several optimal properties for reasonably large samples. The detailed study of the likelihood ratio test theory is beyond the scope of this book.
Substituting the MLE of μ and Σ in (3.16) and (3.17), respectively, into the likelihood function in (3.13), it is easy to see
where is the MLE of Σ given in (3.17). Under the null hypothesis H0 : μ = μ0, the MLE of Σ with μ = μ0 fixed can be obtained as
It can be seen that is the same as except that X̄ is replaced by μ0.
The likelihood ratio test statistic is the ratio of the maximum likelihood over the subset of the parameter space specified by H0 and the maximum likelihood over the entire parameter space. Specifically, the likelihood ratio test statistic of H0 : μ = μ0 is
(3.23)
The test based on the T2-statistic in (3.21) and the likelihood ratio test is equivalent because it can be shown that
(3.24)
Example 3.2: Hot rolling is among the key steel-making processes that convert cast or semi-finished steel into finished products. A typical hot rolling process usually includes a melting division and a rolling division. The melting division is a continuous casting process that melts scrapped metals and solidifies the molten steel into semi-finished steel billet; the rolling division will further squeeze the steel billet by a sequence of stands in the hot rolling process. Each stand is composed of several rolls. The side_temp_defect
data set contains the side temperature measurements on 139 defective steel billets at Stand 5 of a hot rolling process where the side temperatures are measured at 79 equally spaced locations spread along the stand. In this example, we focus on the three measurements at locations 2, 40, and 78, which correspond to locations close to the middle and the two ends of the stands. The nominal mean temperature values at the three locations are 1926, 1851, and 1872, which are obtained based on a large sample of billets without defects. We want to check if the defective billets have significantly different mean side temperature from the nominal values. We can, therefore, test the hypothesis
The following R
codes calculate the sample mean, sample covariance matrix, and the T2-statistic for the three side temperature measurements.
side.temp.defect <- read.csv("side_temp_defect.csv",
header = F) X <- side.temp.defect[, c(2, 40, 78)] mu0 <- c(1926, 1851, 1872) x.bar <- apply(X, 2, mean) # sample mean S <- cov(X) # sample var-cov matrix n <- nrow(X) p <- ncol(X) alpha = 0.05 T2 <- n*t(x.bar-mu0)%*%solve(S)%*%(x.bar -mu0) F0 <- (n-1)*p/(n-p)*qf(1-alpha, p, n-p) p.value <- 1 - pf((n-p)/((n-1)*p)*T2, p, n-p)
Using the above R
codes, the sample mean and sample covariance matrix are obtained as
The T2-statistic is obtained by (3.21) as T2 = 19.71. The right-hand side of (3.22) at α = 0.05 is obtained as F0 = 8.13. Since the observed value of T2 exceeds the critical value F0, we reject the null hypothesis H0 and conclude that the mean vector of the three side temperatures of the defective billets is significantly different from the nominal mean vector. In addition, the p-value is 0.0004 < α =0.05, which further confirms that H0 should be rejected.