# Power Quality Impact and Its Assessment: A Review and a Survey of Lithuanian Industrial Companies
## 3 Materials and Methods
### Comparison of Two Samples  
#### 3.3.1 Statistical Hypothesis Test  
The first method for determining similarity between the representative samples is a statistical hypothesis test. It is a qualitative method of comparison. It must be assumed that both populations are independent and are normally distributed. The basics of the methodology can be found in [115]. The \(z\)-value, which is calculated if both sample sizes are equal or greater than 30, is given by:  
\[z=\frac{\overline{x}_{1}-\overline{x}_{2}-\Delta_{0}}{\sqrt{\frac{\sigma_{1} ^{2}}{n_{1}}+\frac{\sigma_{2}^{2}}{n_{2}}}}, \tag{16}\]  
where \(\overline{x}\)--sample mean; \(\sigma^{2}\)--variance; \(n\)--sample size; \(\Delta_{0}\)--specified value. Two significance levels are chosen--the most commonly used 0.05 and more tolerant 0.10. The latter is probably more suitable due to insufficient knowledge and competencies of the companies, and non-ideally prepared questionnaire. The significance level is the probability to incorrectly accept the alternative hypothesis (see Table 9). Therefore, the probability of the correct decision is:  
\[P\left(-z_{\alpha/2}\leq\frac{\overline{x}_{1}-\overline{x}_{2}-(\mu_{1}-\mu _{2})}{\sqrt{\frac{\sigma_{1}^{2}}{n_{1}}+\frac{\sigma_{2}^{2}}{n_{2}}}}\leq z _{\alpha/2}\right)=1-\alpha. \tag{17}\]  
where \(\overline{x}\)--sample mean; \(\mu\)--population mean; \(\sigma^{2}\)--variance; \(n\)--sample size; \(\alpha\)--significance level; \(z_{\alpha/2}\)--critical value for a two-tailed \(z\)-test. If at least one sample size is lower than 30, the t-value is calculated according to the following equation:  
\[t=\frac{\overline{x}_{1}-\overline{x}_{2}-\Delta_{0}}{\sqrt{\frac{\sigma_{1} ^{2}}{n_{1}}+\frac{\sigma_{2}^{2}}{n_{2}}}}, \tag{18}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Null Hypothesis** & **True** & **False** \\ \hline \multirow{2}{*}{Rejected} & Type I error & Correct decision \\  & \(P=\alpha\) & \(P=1-\beta\) \\ \hline \multirow{2}{*}{Not rejected} & Correct decision & Type II error \\  & \(P=1-\alpha\) & \(P=\beta\) \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Error types. the degrees of freedom of which are determined by:  
\[\
u=\frac{\left(\frac{s_{1}^{2}}{n_{1}}+\frac{s_{2}^{2}}{n_{2}}\right)^{2}}{ \frac{\left(s_{1}^{2}/n_{1}\right)^{2}}{n_{1}-1}+\frac{\left(s_{2}^{2}/n_{2} \right)^{2}}{n_{2}-1}}\, \tag{19}\]  
where \(\overline{x}\)--sample mean; \(s^{2}\)--variance; \(n\)--sample size; \(\Delta_{0}\)--specified value. In all cases, the selected specified value \(\Delta_{0}\) is equal to 0, although slightly softer thresholds can be used in such studies as well, for example, equal to half of the smallest severity value of the table. Standard deviations are calculated as follows:  
\[\sigma=\sqrt{\frac{1}{n}{\sum\limits_{i=1}^{n}}{\left(x_{i}-\overline{x} \right)^{2}}}, \tag{20}\]  
\[s=\sqrt{\frac{1}{n-1}{\sum\limits_{i=1}^{n}}{\left(x_{i}-\overline{x} \right)^{2}}}, \tag{21}\]  
where \(n\)--sample size; \(\overline{x}\)--sample mean. The statistical hypothesis test will determine whether the difference in population means is significant or not, which in engineering terms means whether the impact of PQ is different or not. The null hypothesis \(H_{0}\) states that there is no significant difference between the variables of interest, i.e., the means either are equal or their difference is smaller than the specified value. The alternative hypothesis \(H_{1}\) states that the difference is significant, i.e., larger than the specified value. Thus, a right-tailed test will be performed. Mathematically this is written as follows:  
\[H_{0}: \quad\left|\mu_{1}-\mu_{2}\right|\leq\Delta_{0}. \tag{22}\] \[H_{1}: \quad\left|\mu_{1}-\mu_{2}\right|>\Delta_{0}.\]  
The null hypothesis can be rejected if:  
\[z_{0}>z_{a}, \tag{23}\]  
where \(z_{0}\)--test statistic value; \(z_{a}\)--critical value for a right-tailed \(z\)-test.