Product Design, Manufacturing & Innovation Resources
Lar » Design de produto » Metodologias » Os 6 testes estatísticos essenciais para a engenharia de qualidade

Os 6 testes estatísticos essenciais para a engenharia de qualidade

testes estatísticos para qualidade e engenharia

Statistical tests are the only way in quality and manufacturing to provide objective evidence for decision-making. They help identify variations in processes and distinguish between random fluctuations and actual problems. In engineering, statistics help identify patterns, outliers, and sources of failure in system performance, ensuring data-driven decision-making. By rigorously analyzing experimental results, engineers can validate product designs and manufacturing processes, detecting potential problems before implementation. This systematic approach reduces the risk of unexpected failures and enhances overall safety by ensuring reliability and compliance with international safety padrões.

Este artigo analisará os principais testes estatísticos utilizados na indústria de manufatura e Gestão da Qualidade Total (TQM).

Nota: como também dizem respeito à engenharia, pesquisa e ciência, seguem os 2 testes e análises estatísticas.

  • Análise de correlação: mede a força e a direção da relação entre duas variáveis ​​(por exemplo, Pearson coeficiente de correlação).
  • Análise de regressão: Analisa a relação entre variáveis ​​(por exemplo, fatores de entrada e saída do processo), desde regressão linear simples até regressão múltipla.

Não estão incluídos aqui, mas sim em um artigo específico sobre os 10 principais algoritmos para engenharia.

Testes de normalidade

A well-lit laboratory setting, with a desk displaying various scientific equipment - beakers, pipettes, and a microscope. In the center, a whiteboard showcases a clear step-by-step process of hypothesis testing, with equations and diagrams explaining the fundamentals. The background features a bookshelf filled with technical manuals and industry-specific literature, conveying an atmosphere of academic rigor and attention to detail. The overall mood is one of scientific inquiry and problem-solving, with a focus on the systematic approach to quality control.
Liste os testes estatísticos mais utilizados para qualidade e engenharia.

No mundo dos testes estatísticos, muitos métodos comuns (testes t, ANOVA, regressão linear, etc.) pressupõem que os dados seguem uma distribuição normal/gaussiana (ou que os resíduos/erros seguem uma distribuição normal). Violar essa premissa pode tornar os resultados não confiáveis: os valores p podem ser enganosos, os intervalos de confiança podem estar incorretos e o risco de erros do Tipo I/II aumenta. Observe que alguns testes, como a ANOVA de uma via, podem lidar razoavelmente bem com uma distribuição não normal.

Observação: se seus dados não forem normalmente distribuídos (veja exemplos reais abaixo), talvez seja necessário usar testes não paramétricos (como o teste U de Mann-Whitney ou o teste de Kruskal-Wallis), que não pressupõem normalidade, ou transformar seus dados, o que está fora do escopo desta publicação.

Embora existam vários testes estatísticos para isso, detalharemos aqui o teste de Shapiro-Wilk, famoso especialmente para tamanhos de amostra pequenos, tipicamente n < 50, mas que pode ser usado até 2000.

Para sua informação, outros testes de normalidade comuns:

    • Teste de Kolmogorov-Smirnov (KS) (com correção de Lilliefors): apresenta melhor desempenho com amostras maiores, porém é menos sensível que o teste de Shapiro-Wilk, especialmente para conjuntos de dados pequenos.
    • O teste de Anderson-Darling é eficaz com todos os tamanhos de amostra e apresenta maior sensibilidade nas caudas (extremos) da distribuição, sendo também mais eficaz na detecção de desvios da normalidade nos extremos.

Como realizar o teste de normalidade de Shapiro-Wilk

1. Calcule ou determine a estatística do teste de Shapiro-Wilk (W):

(W = frac{left(sum_{i=1}^{n} a_i x_{(i)}right)^2}{sum_{i=1}^{n} (x_i – bar{x})^2})

Nota: como o cálculo dos coeficientes (a_i) não é trivial e geralmente requer uma tabela ou algoritmo, o teste de Shapiro-Wilk é quase sempre calculado por softwares como R, SciPy do Python ou MS Excel complementos ou outros softwares dedicados. Para um cálculo manual, consulte esta página. fornece todos os coeficientes (a_i) e o valor p para amostras de até 50.

O valor de W varia entre 0 e 1 (W = 1: normalidade perfeita. W < 1: quanto mais distante de 1, menos normais são os seus dados).

2. O valor de W não é suficiente. Ele funciona em conjunto com o seu respectivo valor p para determinar o nível de confiança. Na tabela de Shapiro-Wilk, em Na linha correspondente ao tamanho da amostra n, procure o valor mais próximo do valor calculado de W e obtenha o valor correspondente. valor p no topo

O numerador representa a soma ao quadrado dos valores da amostra ordenada ponderada.

O denominador é a soma dos quadrados dos desvios da média da amostra (ou seja, a variância da amostra, escalonada por (n-1)).

(x_{(i)}) = a i-ésima estatística de ordem (ou seja, o i-ésimo menor valor na amostra)

(x_i) = o i-ésimo valor observado

(bar{x}) = a média da amostra

(a_i) = constantes (pesos) calculadas a partir da média, variâncias e covariâncias das estatísticas de ordem de uma amostra de uma distribuição normal padrão ((N(0,1))), e dependem apenas de n (tamanho da amostra).

n = tamanho da amostra

3. Resultado: Se o valor p for maior que o nível alfa escolhido (exemplo: 0,05), há evidências estatísticas de que os dados testados têm distribuição normal.

Para testes de normalidade, é frequentemente aconselhável combinar um método numérico com um método gráfico, como a linha de Henry, gráficos QQ ou histogramas:

Atenção às distribuições não normais!

Embora a distribuição normal/gaussiana seja a mais frequente, não se deve assumi-la automaticamente. Alguns exemplos que contradizem essa tendência no dia a dia são:

  • Distribuição de riqueza e renda entre indivíduos. Segue uma distribuição de Pareto (lei de potência), assimétrica com uma "cauda longa" de indivíduos muito ricos.
  • O tamanho da população das cidades em um país segue a Lei de Zipf (lei de potência), com algumas cidades muito grandes e muitas cidades pequenas.
  • A magnitude e a frequência dos terremotos seguem uma distribuição de lei de potência/Gutenberg-Richter: terremotos de pequena magnitude são comuns, enquanto os de grande magnitude são raros.
  • Variações diárias de preços ou retornos nos mercados financeiros: distribuições com caudas pesadas, não gaussianas; grandes desvios ocorrem com mais frequência do que o previsto por uma distribuição normal.
  • A frequência das palavras em uma língua, como a população da cidade acima, segue a Lei de Zipf (lei de potência): poucas palavras são usadas com frequência, a maioria das palavras é rara.
  • Tráfego de internet/popularidade de sites: lei de potência/cauda longa: alguns sites têm milhões de acessos, a maioria tem muito poucos.
  • Tamanho dos arquivos em sistemas de computador: segue uma distribuição log-normal ou de lei de potência, com alguns arquivos muito grandes e muitos pequenos.
  • Expectativa de vida/longevidade humana: assimetria à direita (pode ser modelada com Weibull ou distribuições de Gompertz), não normais; mais pessoas morrem em idades mais avançadas.
  • As conexões em redes sociais seguem uma lei de potência: poucos usuários têm muitas conexões; a maioria tem poucas.

A maioria delas é caracterizada por "poucos valores grandes, muitos valores pequenos", uma assinatura de leis de potência, caudas pesadas, distribuições exponenciais ou log-normais, e não pela forma simétrica da distribuição gaussiana.

 

O teste t (teste t de Student)

O teste t (também conhecido como "t de Student"), desenvolvido por William Sealy Gosset sob o pseudônimo de "Student" em 1908, é um teste estatístico usado para comparar médias quando os tamanhos das amostras são pequenos e a variância da população é desconhecida. Com foco na comparação das médias de duas populações, é um dos testes mais utilizados na indústria.

A meticulously crafted laboratory setting, with an array of scientific instruments and test equipment laid out on a sleek, modern workbench. Beakers, test tubes, and digital displays cast a soft, ambient glow, illuminated by precise, directional lighting from overhead. In the foreground, a statistical analysis program is open on a computer screen, displaying complex graphs and charts. The middle ground features an engineer in a white lab coat carefully recording data, while the background showcases a wall of technical diagrams and engineering schematics. The overall atmosphere conveys a sense of analytical rigor, technical expertise, and a commitment to quality control.
Um ambiente de laboratório com uma variedade de instrumentos científicos para a realização de testes estatísticos.

Propósito: O teste t ajuda engenheiros e profissionais da qualidade a determinar se existe uma diferença estatisticamente significativa entre as médias de dois grupos ou entre a média de uma amostra e um padrão conhecido. É comumente usado em testes de hipóteses para avaliar se mudanças no processo ou modificações no produto têm impacto significativo. liderado para melhorias ou diferenças reais, além do que se poderia esperar pelo acaso.

Exemplos práticos na indústria:

  • Na fabricação de automóveis, um teste t pode ser usado para comparar a resistência à tração do aço de dois fornecedores diferentes, a fim de garantir uma qualidade consistente.
  • Na indústria farmacêutica, o teste t é utilizado para analisar se um novo processo de produção gera comprimidos com peso médio significativamente diferente do padrão.
  • Na área da eletrônica, os engenheiros podem usar o teste t para verificar se um mudança de design em um placa de circuito resulta em uma melhoria mensurável na resistência elétrica.

Como realizar o teste t de Student

Existem muitas variantes do teste t; o exemplo aqui se concentrará no chamado "teste t de duas amostras" em sua versão "não pareada", comparando as amostras de 2 lotes de produção diferentes.

  1. Enuncie suas hipóteses nula e alternativa; neste exemplo, "não há diferença entre as médias" versus "há diferenças".
  2. Reúna os dados dos dois lotes de produção que estão sendo comparados e calcule.
    • as 2 médias amostrais (bar{X} = frac{1}{n_1} sum_{i=1}^{n_1} X_i) e (bar{Y} = frac{1}{n_2} sum_{j=1}^{n_2} Y_j)
    • Calcule as duas variâncias amostrais: (S_X^2 = frac{1}{n_1-1} sum_{i=1}^{n_1} (X_i – bar{X})^2) e (S_Y^2 = frac{1}{n_2-1} sum_{j=1}^{n_2} (Y_j – bar{Y})^2)
    • tamanhos de amostra.
  3. Calcule a estatística de teste. Embora o método assuma que ambas as amostras são independentes e que ambas as amostras provêm de populações com distribuição normal, ainda existem dois casos:
    • se as variâncias forem iguais (teste t agrupado): Variância agrupada: (S_p^2 = frac{ (n_1-1)S_X^2 + (n_2-1)S_Y^2 }{ n_1 + n_2 – 2 })
      Estatística de teste: (t = frac{ bar{X} – bar{Y} }{ S_p sqrt{ frac{1}{n_1} + frac{1}{n_2} } })
    • se variâncias desiguais (Teste t de Welch): Estatística de teste: (t = frac{ bar{X} – bar{Y} }{ sqrt{ frac{S_X^2}{n_1} + frac{S_Y^2}{n_2} } }) Graus de liberdade (aproximados, Welch-Satterthwaite): (df = frac{left( frac{S_X^2}{n_1} + frac{S_Y^2}{n_2} right)^2}{ frac{ (S_X^2 / n_1)^2 }{ n_1 – 1 } + frac{ (S_Y^2 / n_2)^2 }{ n_2 – 1 } })
  4. Use o valor calculado (t) e os graus de liberdade ((n_1+n_2-2) para variâncias iguais, ou a fórmula de Welch) para consultar ou calcular o valor p da distribuição t (dependendo se é um teste unilateral ou bilateral).
  5. Resultado: Compare o valor t calculado com o valor t crítico das tabelas estatísticas, com base no seu nível de confiança e graus de liberdade escolhidos; alternativamente, utilize um software para calcular o valor p. Se a estatística t exceder o valor crítico ou o valor p for inferior ao seu limite (normalmente 0,05), rejeite a hipótese nula.

Link para tabela de valores críticos do teste t

The F-Test

The F-test, introduced by statistician Ronald A. Fisher in the early 20th century, is used to compare the variability (variance) between two sets of data, to assess if their population variances are significantly different. In quality and engineering, it often helps determine if process changes or different machines produce consistent results or if new methods affect product variability. Often a preliminary step before applying t-tests and ANOVA on larger comparisons.

Propósito: the F-Test is used to confirm if two processes or samples have the same level of variation, which supports quality control decisions and process improvements. It helps engineers identify if changes (e.g., new machines, suppliers, or materials) impact the consistency or quality of a product.

Industry Examples

  • Manufacturing: comparing the dimensional variances of parts produced by two different machines to ensure both machines produce consistently within quality standards.
  • Supplier Evaluation: comparing the strength variability of raw materials from two different suppliers to decide if one supplier provides more consistent quality.
  • Quality Improvement: testing if a process improvement (like a new calibration method) has reduced the variability in final product weight compared to the old method.

How-to the F-Test

  1. Collect two sets of sample data (e.g., measurements from process A and process B).
  2. Calculate the variance for each sample group A and B.
  3. Divide the larger variance by the smaller variance to get the F-value.
  4. Resultado: compare this F-value to a critical value from the F-distribution table based on sample sizes and the desired confidence level; if the calculated F-value is greater, the variances are significantly different. In statistical tests, the variance ratio tests, the degrees of freedom (DOF) associated with each group is the quantity of samples minus one (note that this is different for an ANOVA result comparison).

F-distribution table: link to the F-distribution table up to 15×15 DOF (and online F critical calculator for bigger DOF)

Análise de Variância (ANOVA)

While the F-test above refers broadly to any statistical test that uses the F-distribution and is used to compare variances or ratios of variances between two or more groups, the ANOVA is a variant that compares the means of three or more groups to see if at least one is significantly different. The ANOVA test was also developed by Ronald Fisher in the 1920s as a statistical tool for agricultural experiments.

Propósito: the Analysis of Variance (ANOVA) is to determine whether there are statistically significant differences between the means of three or more independent groups. In quality, engineering and particularly in Planejamento de Experimentos (DOE), it helps identify which factors or processes have a significant impact on product performance or output, aiding robust decision-making and process improvement.

Exemplos:

  • In pharmaceutical production, ANOVA can help compare the effects of different formulation processes on the efficacy of a drug.
  • In electronics, it is used to test if the variance in circuit board failure rates is due to different batches of raw materials.

How-to ANOVA in Brief

1. Define the groups or treatments you want to compare and collect data from each group. Calculate

  • the group means
  • overall mean
  • and the variance within and between the groups.

2. Use these values to calculate the F-statistic (see on the right), which is the ratio of variance between groups to the variance within groups.

3. Compare F-statistic to a critical value from the F-distribution table at a chosen significance level (like 0.05).

4. Result: if the F-statistic exceeds the critical value, you conclude that there are significant differences among group means.

The F-statistic:

The F corresponds to the Mean Square Between Groups (MSB) divided by Mean Square Within Groups (MSW)

Practically:

\(F = \frac{ \frac{SSB}{k-1} }{ \frac{SSW}{N-k} }\)

SSB = Sum of Squares Between Groups
SSW = Sum of Squares Within Groups
k = Number of groups
N = Total number of observations

The Chi-Square Test

The Chi-Square Test, introduced by Karl Pearson in 1900, revolutionized statistical hypothesis testing by providing a method to determine if there is a significant difference between expected and observed frequencies in categorical data. In quality and engineering, it helps assess whether deviations in a process or product attributes occur by chance or suggest a systemic issue.

Propósito: the Chi-Square Test checks if the differences between observed and expected results in quality measurements are due to random variation or indicate a specific problem that needs addressing.

Practical examples in industry

  • Manufacturing Defects: checking if the distribution of defective products across different shifts or machines is uniform, and whether certain shifts have a significantly higher defect rate.
  • Supplier Quality: comparing the quality performance (e.g., pass/fail rates) of components from multiple suppliers to determine if one supplier’s parts are statistically more likely to fail.
  • Customer Complaints: analyzing whether the types or frequency of customer complaints are randomly distributed throughout the year, or are associated with specific times, products, or regions.

How to do the chi-square test

  1. Collect observed data and determine the expected frequencies for each category under the null hypothesis.
  2. Use the Chi-Square formula: Χ² = Σ[(O – E)² / E] where O is observed, E is expected.
  3. Compare the calculated Chi-Square value against a critical value from the Chi-Square table with the appropriate degrees of freedom.
  4. Resultado: if the value exceeds the table value, conclude there is a statistically significant difference.

Link to the chi-square critical values table

Chi-Square Full Example: Fairness of a Dice

euOiEiOi−Ei(Oi−Ei)2
1510−525
2810−24
3910−11
4810−24
5101000
6201010100
Sum134

This full example is taken from Wikipedia Chi-square article.

Experience: a 6-sided die is thrown 60 times. The number of times it lands face up on 1, 2, 3, 4, 5, 6 is 5, 8, 9, 8, 10 and 20, respectively.

Question: is the die biased, according to the Pearson’s chi-squared test at a significance level of 95% and/or 99%?

The null hypothesis is that the die is unbiased, hence each number is expected to occur the same number of times, in this case, 60/n = 10.

The outcomes can be tabulated as on the right:

Degrees of freedomProbability less than the critical value
0.900.950.9750.990.999
59.23611.07012.83315.08620.515

Looking at an upper-tail critical values of chi-square distribution table (table linked in the how-to above), the tabular value refers to the sum of the squared variables each divided by the expected outcomes.

For the present example, this means   χ2=25/10+4/10+1/10+4/10+0/10+100/10=13.4

Conclusion of test: this 13.4 is the experimental result whose unlikeliness (with a fair die) we wish to estimate, with a significance or confidence between 97.5% and 99%

 

Process Capability (Cp, Cpk, Pp, Ppk)

A dimly lit, high-contrast image of a statistical analysis workspace. In the foreground, a laptop displays a chi-square test visualization, the data points represented as scattered dots on a grid. Surrounding the laptop, various scientific instruments - a microscope, a bunsen burner, and petri dishes - suggest a laboratory setting. Shelves in the background hold reference books and academic journals. Warm, focused lighting illuminates the scene, casting dramatic shadows. The overall atmosphere evokes a contemplative, academic mood suitable for analyzing categorical data.
A statistical analysis workspace, statistical tests for quality and engineering and anova

Not a statistical test per se, these 4 ratios assess how well a process meets specifications, thus becoming a critical tool for maintaining and improving quality standards in manufacturing.

Process capability analysis originated in the early 20th century alongside the rise of statistical quality control in manufacturing, pioneered by figures like Walter Shewhart. Its methods evolved through the growth of Seis Sigma and Total Quality Management (TQM) in the late 20th century as a cornerstone of modern quality engineering.

Propósito: process capability analysis assesses how well a process can produce output within specified limits (tolerances). It quantifies the variability of a process relative to design specifications and determines the likelihood of producing defective products. The analysis helps identify opportunities for process improvement and ensures products consistently meet customer requirements.

Cp, Cpk and Statistical Tests in Industry

  • Automotive manufacturing: statistical tests and these 4 ratios are used to check whether the diameter of engine pistons remains consistently within tight tolerance limits, ensuring compatibility and reducing engine failures.
  • Pharmaceutical industry: applied to verify that the fill weight of tablets or capsules consistently meets regulatory and quality standards, minimizing underdose or overdose risks.
  • Semiconductor manufacturing: employed to monitor the thickness of wafer coatings, ensuring reliability and performance in microchip production.

How to calculate Cp, Cpk, Pp and Ppk

Cp: Process Capability

\(Cp = \frac{USL – LSL}{6\sigma}\)

USL = Upper Specification Limit

LSL = Lower Specification Limit

σ = standard deviation (typically estimated from within-subgroup variation)

Cpk: Process Capability Index

\(Cpk = \min\left(\frac{USL – \mu}{3\sigma}, \frac{\mu – LSL}{3\sigma}\right)\)

\(\mu\) = process mean

Pp: Process Performance

\(Pp = \frac{USL – LSL}{6s}\)

\(s\) = overall standard deviation (includes both within and between subgroup variations; used over a longer period)

Ppk: Process Performance Index

\(Ppk = \min\left(\frac{USL – \bar{x}}{3s}, \frac{\bar{x} – LSL}{3s}\right)\)

\(\bar{x}\) = overall mean

How to Conclude with Cp, Cpk, Pp, Ppk Values

  • Cp, Pp: if >1, the process has the potential to meet specifications; values ≥1.33 are generally considered capable, depending o your industry and the criticality of your exact application
  • Cpk, Ppk: these reflect how centered the process is within specs; the closer Cpk/Ppk are to Cp/Pp, the more centered the process.
  • If Cpk or Ppk <1, a significant portion of output is likely outside the specification; process improvement is needed.
  • A higher index indicates a more capable (and usually, higher quality) process.

Conclusion & Pitfalls

Statistical tests are powerful tools in data analysis, but their use demands both strong theoretical understanding and critical real-world judgment and adaptation, far from just a statistical software installation or QMS rules.

  • Understanding assumptions & selecting the right test: every statistical test has a set of underlying assumptions (e.g., normality of data, equal variances, independence of observations). If these assumptions are violated or an inappropriate test chosen, the results of the test may be invalid or misleading.
  • Real-world messiness & business context matters: industrial data often violate test assumptions (e.g., non-normality, autocorrelation). Blindly applying textbook tests can result in completely misleading analyses.
  • Data quality issues: measurement errors, outliers, and missing data are common in industrial statistical tests and must be addressed and documented before testing.

Para design de produto so as for quality, put your effort where needed: “Sometimes, results are statistically significant but have negligible practical impact, or vice versa”

External Links on Statistical Tests for Quality

(Passe o cursor sobre o link para ver nossa descrição do conteúdo)

Glossário de termos utilizados

Analysis of Variance (ANOVA): Um método estatístico usado para determinar se existem diferenças significativas entre as médias de três ou mais grupos independentes, analisando a variância dentro e entre os grupos. Avalia o impacto de um ou mais fatores sobre uma variável dependente.

Degrees Of Freedom (DOF): Uma medida do número de parâmetros independentes que definem a configuração de um sistema mecânico ou modelo estatístico, indicando o número de maneiras pelas quais um sistema pode se mover ou variar sem violar as restrições.

Design of Experiment (DOE): a systematic method for planning, conducting, and analyzing controlled tests to evaluate the effects of multiple variables on a response variable, facilitating the identification of optimal conditions and interactions among factors.

Process Capability Index (Cpk): a statistical measure that quantifies how well a process can produce output within specified limits, indicating the relationship between the process mean and the nearest specification limit, adjusted for process variability.

Process Performance Index (Ppk): Uma medida estatística que quantifica o quão bem um processo atende aos limites de especificação, calculada usando a média e o desvio padrão do processo. Ela indica a capacidade de um processo produzir resultados dentro de limites definidos, levando em consideração tanto a variabilidade quanto o equilíbrio.

Quality Management System (QMS): Um sistema estruturado de processos, procedimentos e responsabilidades que visa garantir a qualidade consistente de produtos e serviços, facilitar a melhoria contínua e atender aos requisitos do cliente e às normas regulamentares.

Solid-State Battery (SSB): Uma tecnologia de baterias que utiliza eletrólitos sólidos em vez de eletrólitos líquidos ou em gel, oferecendo maior densidade de energia, segurança aprimorada e vida útil mais longa. Normalmente, apresenta maior estabilidade térmica e menor risco de vazamento ou combustão em comparação com as baterias tradicionais.

Total quality management (TQM): Uma abordagem de gestão focada no sucesso a longo prazo através da satisfação do cliente, envolvendo todos os membros de uma organização na melhoria contínua de processos, produtos e serviços para aprimorar a qualidade e o desempenho.

Tópicos abordados: Testes estatísticos, gestão da qualidade, processos de fabricação, evidências objetivas, tomada de decisão, testes de normalidade, teste de Shapiro-Wilk, testes não paramétricos, valor p, erro tipo I, erro tipo II, análise baseada em dados, análise de regressão, análise de correlação, Gestão da Qualidade Total (GQT), ANOVA, confiabilidade, ISO 9001, ISO 25010, ISO 31000, ISO 9000 e ISO 17025.

Contexto histórico

1974
1974
1978
1980
1980
1980
1980
1972
1974
1975-06-01
1980
1980
1980
1980
1980

(Caso a data seja desconhecida ou irrelevante, por exemplo, "mecânica dos fluidos", é fornecida uma estimativa aproximada de seu surgimento notável)

Imagens em tamanho real e downloads estão disponíveis apenas, 100% gratuitos, para membros registrados.