Industrial Data Analytics for Diagnosis and Prognosis. Yong Chen

Чтение книги онлайн.

Читать онлайн книгу Industrial Data Analytics for Diagnosis and Prognosis - Yong Chen страница 24

Industrial Data Analytics for Diagnosis and Prognosis - Yong Chen

Скачать книгу

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

      The test based on the T2-statistic in (3.21) and the likelihood ratio test is equivalent because it can be shown that

table row cell H subscript 0 colon bold mu equals open parentheses table row 1926 row 1851 row 1872 end table close parentheses end cell end table

      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

table row cell top enclose bold x equals open parentheses table row 1930 row 1848 row 1864 end table close parentheses comma space bold S equals open parentheses table row cell 2547.4 end cell cell negative 111.0 end cell cell 133.7 end cell row cell negative 111.0 end cell cell 533.1 end cell cell 300.7 end cell row cell 133.7 end cell cell 300.7 end cell cell 562.5 end cell end table close parentheses end cell end table

      3.5 Bayesian Inference for Normal Distribution

      Let D = {x1, x2,…, xn} denote the observed data set. In the maximum likelihood estimation, the distribution parameters are considered as fixed. The estimation errors are obtained by considering the random distribution of possible data sets D. By contrast, in Bayesian inference, we treat the observed data set D as the only data set. The uncertainty in the parameters is characterized through a probability distribution over the parameters.

      In this subsection, we focus on Bayesian inference of normal distribution when the mean μ is unknown and the covariance matrix Σ is assumed as known. The Bayesian inference is based on the Bayes’ theorem. In general, the Bayes’ theorem is about the conditional probability of an event A given that an event B occurs:

table row cell text Pr end text left parenthesis A vertical line B right parenthesis equals fraction numerator text Pr end text left parenthesis B vertical line A right parenthesis text Pr end text left parenthesis A right parenthesis over denominator text Pr end text left parenthesis B right parenthesis end fraction. end cell end table

      Applying Bayes’ theorem for Bayesian inference of μ, we have

      where g(μ) is the prior distribution of μ, which is the distribution before observing the data, and f(μ|D) is called as the posterior distribution, which is the distribution after we have observed D. The function f(D|μ) on the right-hand side of (3.25) is the density function for the observed data set D. If it is viewed as a function of the unknown parameter μ, f(D|μ) is exactly the likelihood function of μ. Therefore the Bayes’ theorem can be stated in words as

Скачать книгу